-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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] PostMessage failed ; is the messages queue full? #10546
Comments
What is this problem? |
This problem often occurs |
Do you have a minimal reproduction example for us? If not, something not-minimal is okay too, but we need something to work on since you're the first one to report this. |
This issue mostly occurs when using tauri SQL and http plugins, But the frequency of occurrence is very low, Is it because the interaction between JS and Rust is too frequent? |
PanicInfo { payload: Any { .. }, message: Some(called the new error |
Same issue here. It should be occurred frequentlly while close window in dev mode. Any solutions could be shared here? |
I haven't found any solution |
@FabianLars Maybe we could modify the the #[inline]
unsafe fn dispatch_handler<F>(hwnd: HWND, function: F)
where
F: FnMut() + 'static,
{
// We double-box because the first box is a fat pointer.
let boxed = Box::new(function) as Box<dyn FnMut()>;
let boxed2: Box<Box<dyn FnMut()>> = Box::new(boxed);
let raw = Box::into_raw(boxed2);
let res = PostMessageW(hwnd, *EXEC_MSG_ID, WPARAM(raw as _), LPARAM(0));
assert!(
res.is_ok(),
"PostMessage failed ; is the messages queue full?"
);
} And I see this dispatcher should call when current thread is not the main thread. If I create the webview window in |
Tauri should take care of the thread requirements internally already.
Yeah, that sounds reasonable - @lucasfernog ?
hmm, idk i personally would prefer to try to prevent these before looking into some retry mechanism but don't have any hard feelings about it. |
@FabianLars @lucasfernog We may have to manually catch this crash using panic::take_hook, and then display an option to ignore the error. |
@FabianLars @lucasfernog @amrbashir any clues from the stack trace? #11120 |
@wonfen It seem that Tauri do not impl cancelable ipc or send barrier(block ipc while the window is closing), and it just panic while ipc is failed -- That's why the ignore in panic hook is useful. |
But the process is still crashed after ignore the panic? I don't know what else we can do in our end. |
Are you using the In this way, the program will exit immediately after hook executed, and there is no chance for cleanup logic defined in Drop trait. You'd better use the Here is a dialogue describing the behavior of panic. https://zhuanlan.zhihu.com/p/687092686 |
I got what you mean, you’re saying that we can use a panic hook to help identify the cause of a panic, but it doesn’t directly solve the panic itself. |
Hi @FabianLars @lucasfernog |
Is there any progress on this issue? I also frequently encounter this problem in my project |
@FabianLars @lucasfernog @amrbashir Can this issue be fixed as soon as possible |
@FabianLars @lucasfernog @amrbashir |
@wonfen do you have a minimal reproducible example I can test with? or steps to reproduce. |
I just wanted to confirm that I get this same error. So far it doesn't actually seem like it causes any problems but I will trace my code and update if I find out where it happens. |
@amrbashir please look at #10893 |
@Fly-Potato that's not the same issue and the blocking of |
@amrbashir Okay, the above problem probably occurs in multi window situations. After the current window processes the data, it sends multiple events to the main window. The main window receives the message and performs further processing. At this time, it will concurrently call the HTTP plugin, causing the main process to freeze |
I am not sure how the freezing is related to this issue, I am specifically asking for repro about |
@amrbashir I reproduced the issue in my repo tauri-app, this is a simple tauri app example. |
ref: tauri-apps/tauri#10546 This problem only occurs in windows
ref: tauri-apps/tauri#10546 This problem only occurs in windows fix: update panic strategy
Still not solved? I'm ready to give up on using tauri. The community is too inactive and the problem solving is so slow. I'm going to switch to a more stable framework. |
Describe the bug
PanicInfo { payload: Any { .. }, message: Some(PostMessage failed ; is the messages queue full?), location: Location { file: "C:\Users\Potato\.cargo\registry\src\mirrors.aliyun.com-8754fae0eb2f08f1\wry-0.41.0\src\webview2\mod.rs", line: 974, col: 5 }, can_unwind: true, force_no_backtrace: false }
Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: