-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug][v2] @tauri-apps/plugin-shell's open called twice while the Explorer is still open freezes the app #1137
Comments
I can't reproduce at all, try running |
Sorry for the late reply, here is a reproduction: https://github.com/martpie/tauri-shell-open-freeze-repro
|
Not really sure if that can help, but I see the following after hard killing the app:
|
Nope, that one can be ignored, it's just a consequence of closing the webview. |
A PR is open upstream Byron/open-rs#98 |
try it by adding the following in [patch.crates-io]
open = { git = "https://github.com/amrbashir/open-rs", branch = "fix/windows/shell-execute-freeze" } |
PR is merged and released, run |
Thank you! |
Now that we've resolved this issue and encountered a similar one before, can we make error details clearer for next time? It seems you've identified the root cause. As for the other issue causing the app to hang, is there a way for regular users or the app itself to gather crash or event logs? btw, I updated |
Unfortunately this bug doesn't have any errors, it is just that the win32 native API I know that we have useless error messages in the past but we are trying to change that one step at a time, if there is any unclear error messages, please let us know. |
I mean that i'm encountering another bug that's causing hang crash like this one, and I'm wondering if tauri can capture crash logs so I can pinpoint where they're occurring for users. I've set up a panic hook, but it doesn't log anything in cases of hang crashes. Regarding the fix for this issue: The newer version of the open library opens new Explorer windows even when opening the same path, whereas previously it just focused on the already opened Explorer path. |
Unfortunately no, at least I am not aware of one. Freezes usually mean a thread is probably in an infinite loop waiting for something, for example, a mutex deadlock. Now when a thread is frozen, usually the main thread, Windows will still send messages to that thread but since the thread is frozen, it won't respond in time and Windows will deem this application Not Responding and will try to kil it. There is no actual crash involved. You migt find some info in Windows Event Logger but it won't pin point what caused the freeze of thread.
Yes, that's expected, otherwise it will block and freeze |
There was a similar freeze recently when trying to pop a native context menu. I have not seen this kind of issues in Electron or QT for example. Pardon my ignorance, I'm a thread-noob:
|
It is possible they might have had these issues long time ago and got fixed or they are super developers who are aware of these issues. I myself make mistakes and discover new things as more bug reports come along, so I can't guarantee this will be the last bug.
Generally when a thread is frozen, other threads can still operate just fine. It is also possible to timeout a thread and abort it. Anyways, we were calling |
Thank you for your work! I was just curious how things could work under the hood :) |
Describe the bug
WTTS, this happens on Windows only. The URL in question is a directory, not a file (for example:
C:\Users\<user>\AppData\Roaming\<identifier>
)Here is a screencast:
8mb.video-kcW-fMkvaf8w.mp4
Reproduction
From any Tauri UI, calls
import { open } from '@tauri-apps/plugin-shell';
and try to open the same link twice.When the Explorer is closed, the link works flawlessly. When the explorer is already opened, the app will freeze.
Expected behavior
No response
Full
tauri info
outputThe text was updated successfully, but these errors were encountered: