-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
When an android app calls event_loop.exit() the application exits, but if the application is opened again without closing it in the "recent apps" the EventLoop creation will fail with a RecreationAttempt error.
Steps to reproduce
- clone https://github.com/SnowyCoder/winit-bug-reopen-example
- run in an android phone
- press back button
- reopen app
Reported error
called `Result::unwrap()` on an `Err` value: RecreationAttempt
Repo explaination
The repo linked in the "Steps to reproduce" section is a modified version of the one linked in the README android section.
I just updated the dependencies and linked BrowserBack to event_loop.exit() (that sems to be the logical key invoked when the android back button is pressed).
Comment
The general problem seems to be that android_main can be called more than once without unloading and reloading the native library (ex. if we use an application with two interacting activities, say LoginActivity and GameActivity).