Closed GoogleCodeExporter closed 9 years ago
Same issue.
What steps will reproduce the problem?
1. Play Wagic.
2. Put the phone down until the screen shuts off, or press the lock key.
3. Press the lock key again to turn the screen on. Unlock the phone.
What is the expected output?
The game of Wagic I was playing.
What do you see instead?
A black screen. I can wait indefinitely and never get the app to come back,
however if I try to tap the screen several times, or if I press either of the
Menu or Back soft keys, then about 5-10 seconds later I will get a system
notification that the app is hung, do I want to Wait, Force Close, or Report? I
have Haptic Feedback setting on (phone vibrates when pressing soft keys) and
the vibrate is also delayed by quite a few seconds when the app is in this
state.
What version of the product are you using?
0.18.6 core
On what operating system?
Android 2.3.5 on Cyanogenmod 7.2 nightly on LG P500h (Otimus one)
Please provide any additional information below.
I had been running Wagic 0.17.1 previously and it handled screen locks and
device sleep just fine.
Original comment by anic...@gmail.com
on 21 May 2012 at 3:37
Update: I have found that if I press the Home button prior to locking the
screen, the app usually does survive. So the problem is only if the app is in
the foreground when the phone sleeps.
Original comment by Dansi...@gmail.com
on 24 May 2012 at 8:49
Crap didn't see this before I submitted. I found out that the game only
crashes if the orientation is changed when in the lockscreen. Otherwise Wagic
survives, and resumes as normal.
Original comment by Cameron....@gmail.com
on 15 Jun 2012 at 11:18
Just tested looking the screen while carefully holding the phone steadily in
the one horizontal orientation, then unlocking the screen again. Wagic still
crashes. I do remember reading that one new feature in 0.18.6 is that the app
uses the orientation sensor, so it can be either side up. Perhaps that change
is related to this problem? The lock screen is always a vertical orientation. I
remember in 0.17.1 that when I unlocked the screen I would usually see, for a
few seconds, the game screen drawn wrong, in a vertical orientation, then it
would flip itself back to horizontal and be good to go.
Original comment by Dansi...@gmail.com
on 15 Jun 2012 at 2:29
It looks as though issue 886 and issue 894 are duplicates or at least very
similar to this one.
Attached is a patch that I have tested on:
Nexus one - CyanogenMod 7.2.0 (Android 2.3.7)
Using this as a reference:
http://stackoverflow.com/questions/6772988/ondestroy-gets-called-each-time-the-s
creen-goes-on
Possible cause:
I believe that the issue may have been introduced in a previous fix for issue
774 and issue 832 committed in r4405.
While testing I made sure that the orientation still flips when the device was
tilted and it doesn't appear that the empty onConfigChanged() catch interferes
with the accelerometer handling of orientation change. The idea is that the
empty onConfigChanged() simply stops the Activity from destroying/recreating
(which caused "joining" the SDLThread) on device lock.
The added bonus, depending on opinion, is that now the Ad seems to display on
screen where I never noticed it before.
Original comment by rolzad73@gmail.com
on 15 Aug 2012 at 3:59
Attachments:
There's an ad? </surprise>
Original comment by Dansi...@gmail.com
on 15 Aug 2012 at 6:48
Anyway, thanks so much for this. Kudos!
Original comment by Dansi...@gmail.com
on 15 Aug 2012 at 6:50
Original comment by omegabla...@gmail.com
on 19 Aug 2012 at 10:30
Zeth, the fix hasnt been submitted yet, has it?
Original comment by wagic.the.homebrew@gmail.com
on 19 Aug 2012 at 10:48
My bad, it has been submitted
Original comment by wagic.the.homebrew@gmail.com
on 19 Aug 2012 at 10:49
Original issue reported on code.google.com by
Dansi...@gmail.com
on 18 May 2012 at 3:58