You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running BeforeDevCommand (yarn dev)
yarn run v1.22.19
warning ../../package.json: No license field
$ vite
VITE v4.3.9 ready in 408 ms
➜ Local: http://127.0.0.1:1420/
➜ Network: use --host to expose
Info Watching /Users/kyandesutter/development/FileExplorer/src-tauri for changes...
Compiling file-explorer v0.0.0 (/Users/kyandesutter/development/FileExplorer/src-tauri)
Finished dev [unoptimized + debuginfo] target(s) in 4.08s
thread 'main' panicked at 'called Result::unwrap() on an Err value: Error("EOF while parsing a value", line: 1, column: 0)', src/filesystem.rs:176:63
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Note from @conaticus for developers:
I have implemented a mechanism to stop the program from crashing if it is unable to deserialize the cache, but it leads to the program recaching every time it is re-run. Look out for a log message to see if the deserialization failed. There is also a panic on this line in the search.rs when searching on MacOS:
This is likely a string mismatch causing the program to fail when retrieving the volume from the cache.
hey, can you try deleting your cache and trying again and tell me whether it worked for you or not? There has been some changes to the cache format that would render your cache invalid. Your cache is stored in src-tauri/system_cache.json.
The cache issue should come up again as we're working on changing to a binary format.
@FormalSnake yes that's by design. the window freezes for a minute or two while caching cause we haven't implemented the loading screen and the caching is for now blocking.
wait for a lil bit and you should see the file explorer working. you can expect the long wait to be gone in the future.
it should only take a couple minutes at best. something must be going wrong here. I'll see what we can do, I don't have a mac tho so I'll have to relying on other people's help.
This is likely a string mismatch causing the program to fail when retrieving the volume from the cache.
mount_pnt is actually an empty string "" on mac os, not sure why it would not be in the cache
Something about windows and unix having different file systems
This is likely a string mismatch causing the program to fail when retrieving the volume from the cache.
mount_pnt is actually an empty string "" on mac os, not sure why it would not be in the cache Something about windows and unix having different file systems
I'm on linux so it's definitely not a unix thing as it works for me and someone else on linux has tried it and it works as well. We're using a cross platform crate to retrieve mountpoints which are then stored in the cache. I'm not exactly sure whether this is an error on our part or if there's a bug on the crate itself.
[...] where a mutex is considered poisoned whenever a thread panics while holding the mutex. Once a mutex is poisoned, all other threads are unable to access the data by default as it is likely tainted (some invariant is not being upheld).
I've tested it, it works for me as well.
I think the issue is that the code keeps triggering the recaching without checking if the previous caching routine is done or not. If the caching takes more than 30 seconds it will spawn a new routine that will try to lock the mutex and panic causing the poisoning.
@conaticus to fix this we could use a channel to decide when to restart the caching if necessary.
Even on slower systems this shouldn't take longer than 5 minutes. As mentioned it will likely be an infinite loop happening here. Thanks for your help and I apologise that this isn't working for you currently.
thread 'tokio-runtime-worker' panicked at 'called Option::unwrap() on a None value', src/search.rs:85:59
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/filesystem/cache.rs:139:49
thread 'notify-rs fsevents loop' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/filesystem/cache.rs:48:48
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/search.rs:82:34
We should probably wait for the upcoming work on the search stuff before checking that I think.
I think this issue can now be closed as you've already managed to build and run the program.
Please create an issue if you get this error after the search refactor/rewrite is merged.
Activity
RaphGL commentedon Jun 29, 2023
hey, can you try deleting your cache and trying again and tell me whether it worked for you or not? There has been some changes to the cache format that would render your cache invalid. Your cache is stored in
src-tauri/system_cache.json.The cache issue should come up again as we're working on changing to a binary format.
FormalSnake commentedon Jun 29, 2023
The problem with that is the window becomes blank
FormalSnake commentedon Jun 29, 2023
and unresponsive.
RaphGL commentedon Jun 29, 2023
@FormalSnake yes that's by design. the window freezes for a minute or two while caching cause we haven't implemented the loading screen and the caching is for now blocking.
wait for a lil bit and you should see the file explorer working. you can expect the long wait to be gone in the future.
FormalSnake commentedon Jun 29, 2023
I have let it run for an hour now and it still isn't done, and didn't write anything.
RaphGL commentedon Jun 29, 2023
it should only take a couple minutes at best. something must be going wrong here. I'll see what we can do, I don't have a mac tho so I'll have to relying on other people's help.
HenryRoutson commentedon Jun 30, 2023
mount_pnt is actually an empty string "" on mac os, not sure why it would not be in the cache
Something about windows and unix having different file systems
RaphGL commentedon Jun 30, 2023
I'm on linux so it's definitely not a unix thing as it works for me and someone else on linux has tried it and it works as well. We're using a cross platform crate to retrieve mountpoints which are then stored in the cache. I'm not exactly sure whether this is an error on our part or if there's a bug on the crate itself.
jokorone commentedon Jun 30, 2023
it seems to me the current code is trying to call
.unwrap()on a poisened mutex when accessing state in therun_cache_intervalloop.did the trick (honestly feels dirty tho 👀 ).
EDIT: tested on MacOS M1 Ventura
FormalSnake commentedon Jun 30, 2023
If this works please make a pr, I am not familiar with rust so I do not know where to put this modification.
jokorone commentedon Jun 30, 2023
I'll look into the other issue you mentioned in the OP.
jokorone commentedon Jun 30, 2023
@HenryRoutson at first I experienced the same, but deleting the
system_cache.jsonand resolved the issue.From the docs:
RaphGL commentedon Jun 30, 2023
I've tested it, it works for me as well.
I think the issue is that the code keeps triggering the recaching without checking if the previous caching routine is done or not. If the caching takes more than 30 seconds it will spawn a new routine that will try to lock the mutex and panic causing the poisoning.
@conaticus to fix this we could use a channel to decide when to restart the caching if necessary.
26 remaining items
FormalSnake commentedon Jun 30, 2023
I do not have any errors
conaticus commentedon Jun 30, 2023
Even on slower systems this shouldn't take longer than 5 minutes. As mentioned it will likely be an infinite loop happening here. Thanks for your help and I apologise that this isn't working for you currently.
FormalSnake commentedon Jun 30, 2023
No need to apologize. I hope we figure it out
fixes conaticus#26 - add task_running flag, don't spawn new thread wh…
FormalSnake commentedon Jun 30, 2023
After a few hours it did manage to cache!
FormalSnake commentedon Jun 30, 2023
searching is bad tho:
thread 'tokio-runtime-worker' panicked at 'called
Option::unwrap()on aNonevalue', src/search.rs:85:59note: run with
RUST_BACKTRACE=1environment variable to display a backtracethread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/filesystem/cache.rs:139:49thread 'notify-rs fsevents loop' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/filesystem/cache.rs:48:48thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: PoisonError { .. }', src/search.rs:82:34FormalSnake commentedon Jun 30, 2023
And restarting the app makes it go back to Loading...
RaphGL commentedon Jun 30, 2023
@FormalSnake if you start searching before entering a disk/volume you'll get a panic, is that what u did?
FormalSnake commentedon Jun 30, 2023
it also doesnt work inside a volume
RaphGL commentedon Jun 30, 2023
We should probably wait for the upcoming work on the search stuff before checking that I think.
I think this issue can now be closed as you've already managed to build and run the program.
Please create an issue if you get this error after the search refactor/rewrite is merged.
FormalSnake commentedon Jun 30, 2023
No problem! Thanks for all the support!
conaticus commentedon Jul 1, 2023
This still needs addressing in future
Merge pull request #26 from CodeMarco05/feature/preview