Opened 4 years ago
Closed 3 years ago
#12095 closed defect (fixed)
BACKENDS: ANDROID: Crash when resuming app while playing a game
Reported by: | antoniou79 | Owned by: | AndywinXp |
---|---|---|---|
Priority: | high | Component: | Port: Android |
Version: | Keywords: | crash, Android 10, resume | |
Cc: | Game: | Monkey Island 3 |
Description
I got this a bunch of times (three or four) lately, when playing CoMI (first screen puzzles) on my Android 10 device (smartphone Mi Note 9 Pro). I am unsure if the issue is specific to Android 10 device or to the CoMI game.
Putting the device to "sleep" and then, after a while, resuming the app, leads to a crash to the Home screen. Oddly, it does not happen every time, and it seems that some (significant) time must pass with the device being in sleep/suspend mode, before the issue occurs. Maybe after a while in sleep mode, the device releases some resource (or completely shuts down the app?).
As a possibly related bug, I also got a corrupted save game (again in the first screen) but failed to record the issue with it (when trying to load it, it displayed a message but I forgot to store it somehow). I haven't been able to reproduce this one though. This is with disabled Cloud Saving (so it's not a side-effect of that module).
I will be debugging this one, since I am not sure what the cause is as of yet.
This is with the 2.3.0git version (recent daily build).
Change History (4)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Further observations on the issue.
It seems that the crash does not occur (after a day's testing) on the 2.2.1pre stable Android port version.
The music may become garbled, like tracks playing on top of one another, after suspending the device and resuming a few times --allowing for sufficient time (like more than 15 minutes) to pass between suspend and resume. But it won't crash in that version.
comment:4 by , 3 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
The crash reported in this ticket is fixed with the merged PR by AndywinXp:
https://github.com/scummvm/scummvm/pull/3203
More work is needed for the pause/resume code in Android but that is out of scope for this report.
I'm closing it as fixed.
Upon further inspection, it seems that the reason for this (or one of the reasons) is code related to iMuse.
Related side-effect that occurs before crashing is that the music starts playing faster or on top of itself maybe (it sounds kind of garbled), as if trying to catch up with the time the device was pause/suspended).
I've tested with today's code (my own Android build, same toolchain as buildbot) and the issue persists. The crash still does not occur always -- it seems that at the very least needs a few minutes to pass with the app suspended.
At one time I got multiple identical warnings instead of the crash.