Skip to content
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's Event::Resumed on android panics since #3172 #3674

Closed
m-hugo opened this issue Dec 4, 2023 · 3 comments · Fixed by #3847
Closed

eframe's Event::Resumed on android panics since #3172 #3674

m-hugo opened this issue Dec 4, 2023 · 3 comments · Fixed by #3847
Labels
bug Something is broken

Comments

@m-hugo
Copy link

m-hugo commented Dec 4, 2023

Hiding and resuming any eframe app on android since #3172 causes it to crash, logging (on master) thread panicked at .cargo/git/checkouts/egui-5e4507fa4153be06/84a6d6f/crates/eframe/src/native/wgpu_integration.rs:392:54: no entry found for key

running.shared.borrow().viewports[&ViewportId::ROOT]

the offending line is running.shared.borrow().viewports[&ViewportId::ROOT]
the commit after #3172 logs the same line but in eframe/src/native/run.rs
the commit before works fine
digging in #3172's commits, it was broken as early as 7caa042 .get(&ViewportId::ROOT): called Option::unwrap() on a None value

Expected behavior
get back to the app normally like before #3172

Smartphone

  • OS: Android 13
@m-hugo m-hugo added the bug Something is broken label Dec 4, 2023
@m-hugo
Copy link
Author

m-hugo commented Dec 4, 2023

almost the same with glow but with a black screen and while I got a panic .cargo/git/checkouts/egui-5e4507fa4153be06/7caa042/crates/eframe/src/native/run.rs:2585:30: called Option::unwrap() on a None value on a pre-0.24 commit
current master blackscreens without panics

@emilk
Copy link
Owner

emilk commented Dec 4, 2023

Please see if #3676 helps

@ghost ghost mentioned this issue Dec 5, 2023
emilk pushed a commit that referenced this issue Jan 22, 2024
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

Added Viewport reinitialization and Window recreation for Android on
resume event.

Closes <#3674>.


https://github.com/emilk/egui/assets/95014675/7bc51ea5-3f63-4422-b5a0-ce8291612982
@m-hugo
Copy link
Author

m-hugo commented Jan 22, 2024

follow-up at #3861

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants