We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2134 - [Android] Black screen after resume (sometimes)
Summary: [Android] Black screen after resume (sometimes)
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: ARM Android (All)
: P2 critical
Assignee: Gabriel Jacobo
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-06 11:04 UTC by Martin Gerhardy
Modified: 2013-10-10 03:30 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Gerhardy 2013-10-06 11:04:21 UTC
Hi,

I get the following in my logs - the libEGL error log looks like it might be the cause of it. But I'm not sure. The problem is that SDL does not render anything to the screen after a resume (this does not happen always). Input and sound is working as expected. I can even here my touch sounds and can go through the ui. I just can't see it.

V/SDL     (14728): onPause()
E/libEGL  (14728): call to OpenGL ES API with no current context (logged once per thread)
V/SDL     (14728): nativePause()
V/SDL     (14728): onWindowFocusChanged(): false
V/SDL     (14728): surfaceDestroyed()
I/ActivityManager(  435): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.foobar/.FooBar} from pid 769
V/SDL     (14728): onResume()
V/SDL     (14728): surfaceCreated()
V/SDL     (14728): surfaceChanged()
V/SDL     (14728): pixel format RGB_565
V/SDL     (14728): Window size:1280x736
V/SDL     (14728): onWindowFocusChanged(): true
V/SDL     (14728): nativeResume()
Comment 1 Martin Gerhardy 2013-10-06 11:07:48 UTC
oh. as a note. I'm using the latest hg from today. But i already noticed this problem a few days ago. Might be related to the egl backend code.
Comment 2 Gabriel Jacobo 2013-10-06 13:05:55 UTC
As I mentioned on the list, I've tried reproducing this on my app (uses both SDL_Render* and OpenGL calls), tried rotating, locking, going to home, etc, it seems to hold up fine. This is on a Android 4.3 Nexus 4

The EGL error is harmless AFAIK.

Please update with more information, see if you can debug the issue. Thanks!
Comment 3 dmuratshin 2013-10-08 21:05:56 UTC
latest hg,
repro rate 100%, could be reproduced with testgles.c
critical bug :(
Comment 4 Gabriel Jacobo 2013-10-09 14:38:05 UTC
I can reproduce a problem (not sure if it's the same Martin is having) with testgles, so expect a fix any day now :)
Comment 5 Gabriel Jacobo 2013-10-10 03:30:43 UTC
Should be fixed here: http://hg.libsdl.org/SDL/rev/6acc7df4a175