-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
eframe: "App quit unexpectedly" on macOS #2768
Comments
Thanks for the minimal reproduce! We should be able to get a callstack by installing a signal handler (similar to https://github.com/rerun-io/rerun/blob/main/crates/rerun/src/crash_handler.rs) |
Thanks for making this issue. I have something similar.
|
The approach of emilk#1889 may remove the observer of a view twice, which produces the Obj-C Exception: Cannot remove an observer <...> for the key path "nextResponder" from <WinitView ...> because it is not registered as an observer. The above message can only be seen when attaching the application to debugger. Users normally see: [1] *** trace trap cargo run This commit fixes it by only running event_loop twice on Windows. Besides: * We have set ControlFlow::Exit on 'Event::LoopDestoryed', 'EventResult::Exit' and on error; therefore, it is safe to not calling `set_exit()`. * This commit also fix the persistence function in macOS. It can't store the content in Memory due to this exception. Fixed: emilk#2768 (eframe: "App quit unexpectedly" on macOS) Signed-off-by: pan93412 <[email protected]>
The approach of emilk#1889 may remove observers in a view twice, which produces the Obj-C Exception: Cannot remove an observer <...> for the key path "nextResponder" from <WinitView ...> because it is not registered as an observer. The above message can only be seen when attaching the application to debugger. Users normally see: [1] *** trace trap cargo run This commit fixes it by only running `event_loop.run_return()` twice on Windows. Besides: * We have set `ControlFlow::Exit` on `Event::LoopDestroyed`, `EventResult::Exit` and on error; therefore, it is safe to not calling `set_exit()`. * This commit also fix the persistence function in macOS. It can't store the content in Memory due to this exception. Fixed: emilk#2768 (eframe: "App quit unexpectedly" on macOS) Signed-off-by: pan93412 <[email protected]>
The approach of #1889 may remove observers in a view twice, which produces the Obj-C Exception: Cannot remove an observer <...> for the key path "nextResponder" from <WinitView ...> because it is not registered as an observer. The above message can only be seen when attaching the application to debugger. Users normally see: [1] *** trace trap cargo run This commit fixes it by only running `event_loop.run_return()` twice on Windows. Besides: * We have set `ControlFlow::Exit` on `Event::LoopDestroyed`, `EventResult::Exit` and on error; therefore, it is safe to not calling `set_exit()`. * This commit also fix the persistence function in macOS. It can't store the content in Memory due to this exception. Fixed: #2768 (eframe: "App quit unexpectedly" on macOS) Signed-off-by: pan93412 <[email protected]>
This problem still exists... show log
|
Sorry, I just switched to the master branch, it should have been fixed. |
Hello, I'm having this problem with egui/eframe version 0.22.0 on a Macos 12.5.1, The exception triggered is similar to the first screenshot ( Any insight on this ? Thanks forward |
@oletf do you get the problem on the |
my Cargo.toml only has I'm also using tokio for other things, but I made sure that the eframe thing is being run from the main thread as I saw it could cause problems if it wasn't the case. (not sure if it could be part of the problem but more context is always better) Thanks a lot for the quick reply ! |
[patch.crates-io]
eframe = { git = "https://github.com/emilk/egui", branch = "master" } I suspect the problem is fixed on |
thanks a lot, gonna try this within the week, |
Hi again, I just tested with thanks a lot for this crate |
Describe the bug
Sometimes when I close my eframe app on macOS, I receive a crash notification from macOS saying that the "app quit unexpectedly".
To Reproduce
I have created a minimal reproducible example here:
https://github.com/bash/egui-issue-2768/blob/main/src/main.rs
I'm using the latest version of eframe from the master branch.
It can be a bit finicky to observe the crash message.
Sometimes it happens a few times in a row, then it doesn't.
Some observations:
persistence
crate feature is enabled andpersist_native_window
returns true.run_and_return
is disabled in theNativeOptions
.Expected behavior
No crash notification.
Screenshots
![Screenshot 2023-02-28 at 18 29 57](https://user-images.githubusercontent.com/4602612/221931345-798c3ed4-d922-421f-8ac8-eb992b9c29c6.png)
Desktop:
The text was updated successfully, but these errors were encountered: