- Home /
Android - EGL_BAD_SURFACE when using home button
I have a bug that is Android specific. Multithreaded rendering is off (as that is the most common issue other threads suggest)
To reproduce the issue:
1 Load the game. Everything runs fine. Press the home button to go to the phone's main page
2 Tap on the game's icon. It highlights.
Unity takes a couple of seconds to load. During that time, hit the home button again.
3 Pause for a couple of seconds. Click on the game's icon. Result: The screen comes in black.
Question:
What might be happening? Where should I start looking? Does your game have the same issue?
Device: Nexus7 running 4.4.2
Unity: 4.3.4f1 ... using NGUI
Logcat output:
W/Unity ( 2708): Game.OnApplicationPause : Game.OnApplicationPause resume
W/Unity ( 2708):
W/Unity ( 2708): (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 53)
W/Unity ( 2708):
E/BufferQueue( 178): [SurfaceView] dequeueBuffer: BufferQueue has been abandoned!
W/Adreno-EGLSUB( 2708): : dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
W/Adreno-ES20( 2708): : GL_OUT_OF_MEMORY
W/Adreno-EGL( 2708): : EGL_BAD_SURFACE
E/BufferQueue( 178): [SurfaceView] dequeueBuffer: BufferQueue has been abandoned!
W/Adreno-EGLSUB( 2708): : dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
E/BufferQueue( 178): [SurfaceView] connect: BufferQueue has been abandoned!
E/libEGL ( 2708): EGLNativeWindowType 0x760b40d0 already connected to another API
E/libEGL ( 2708): eglCreateWindowSurface:414 error 3003 (EGL_BAD_ALLOC)
E/Unity ( 2708): [EGL] Failed to create surface
E/Unity ( 2708):
E/Unity ( 2708): (Filename: Line: 132)
E/Unity ( 2708):
E/Unity ( 2708): [EGL] Error:: EGL_BAD_ALLOC: EGL failed to allocate resources for the requested operation.
E/Unity ( 2708):
E/Unity ( 2708): (Filename: ./PlatformDependent/AndroidPlayer/ContextGLES.cpp Line: 132)
E/Unity ( 2708):
I/Unity ( 2708): Skipped rendering frame because GfxDevice is in invalid state (device lost)
I/Unity ( 2708):
I/Unity ( 2708): (Filename: Line: 1539)
I/Unity ( 2708):
E/libEGL ( 2708): call to OpenGL ES API with no current context (logged once per thread)
E/BufferQueue( 178): [SurfaceView] connect: BufferQueue has been abandoned!
E/libEGL ( 2708): EGLNativeWindowType 0x760b40d0 already connected to another API
E/libEGL ( 2708): eglCreateWindowSurface:414 error 3003 (EGL_BAD_ALLOC)
E/Unity ( 2708): [EGL] Failed to create surface
E/Unity ( 2708):
E/Unity ( 2708): (Filename: Line: 132)
— and that repeats until the user terminates the app
I'm having the exact same problem, same reproduction steps. Also using Unity 4.3.4f1, also using NGUI (2.6.3). It seems to happen on all Android devices but the behavior is not identical. Any further input would be appreciated.
Your answer
Follow this Question
Related Questions
Android Native Screenshot function creats black Image 1 Answer
Black screen problem on some android devices - Lags if games manage to start 0 Answers
Problems porting a Unity game to android 1 Answer
Build not working on Android 12 - black screen 4 Answers
How to keep other activities on top after pressing the home button on Android? 0 Answers