-
Notifications
You must be signed in to change notification settings - Fork 948
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
Message boxes hang on Windows #1698
Comments
Does your program hang indefinitely if you do the following instead? fn main() {
let event_loop = winit::event_loop::EventLoop::new();
event_loop.run(|_, _, control_flow| {
tinyfiledialogs::message_box_ok("", "", tinyfiledialogs::MessageBoxIcon::Info);
*control_flow = ControlFlow::Exit;
})
} |
Yep. It also hangs regardless of whether or not a winit window is open and handling events at the same time. |
I'd assume the dialog itself actually works? So you can interact with it and click it? |
The message box actually doesn't display at all on master (sorry, should have mentioned that). In addition, it seems to even lock up the program that it was run from (VSCode, cmd, etc). On 0.22.2 the message box displays and you can interact with it, but winit panics after it closes. |
I did some bisecting, and dd866a7 (#1615) introduces the hang and makes the message box not show itself, which is consistent with what you've reported, @branpk. The lock-up of parent applications that happens when you experience the hang is likely due to how |
Because 0.22.2 will crash after the open file dialog is finished. It seems to be this issue: rust-windowing/winit#1698
I tried attaching a debugger after the bug was triggered and it seems like it always gets stuck inside A temporary fix would be to spawn your message boxes on a background thread. |
I had similar problem with |
Pressing Alt seems to make the message box appear. This requires that you either don't change the focus after creating the message box or have a Winit window in focus. |
Removing the |
The bug seems resolved on master and 0.24.0. Thanks all! |
Using a different library to open a message box after creating a winit event loop results in a hang.
I've tested this with both tinyfiledialogs and nfd on Windows 10. Other dialogues like open/save file work fine (except when an existing file is chosen, since it brings up a confirmation message box).
This is on winit master d103dc2. It seems like 0.22.2 is okay with the message box, but panics afterward due to #1611.
The text was updated successfully, but these errors were encountered: