Crash in SDL_EGL_CreateSurface on Android

Hi,

I’m trying to get my app to pause and resume gracefully on Android (testing with HTC One, Android 4.1). I listen for events using a filter set by SDL_SetEventFilter and before I even receive SDL_APP_WILLENTERBACKGROUND, I get:

E/libEGL (29145): call to OpenGL ES API with no current context (logged once per thread)

My renderer is on a separate thread to my event queue (set up using SDL threads). The event thread is where I call SDL_Init and SDL_CreateWindow. The render thread is where I set up my context (SDL_CreateRenderer). When I receive SDL_APP_WILLENTERBACKGROUND, I call SDL_DestroyRenderer on the render thread. Before I even see SDL_APP_DIDENTERFOREGROUND message the crash occurs in SDL_EGL_CreateSurface.

I/DEBUG ( 5895): #00 pc 00157214 /data/data/com.jsam.crag/lib/libSDL2.so (SDL_EGL_CreateSurface+28)
I/DEBUG ( 5895): #01 pc 000aeb54 /data/data/com.jsam.crag/lib/libSDL2.so (Java_org_libsdl_app_SDLActivity_onNativeSurfaceChanged+184)

This doesn’t seem to be affected by whether or not I comment out the definition of SDL_ANDROID_BLOCK_ON_PAUSE in SDL_androidevents.c. If I don’t do any shut-down and leave SDL_ANDROID_BLOCK_ON_PAUSE defined, I return to a blank screen and an EGL error message is logged every time I swap buffers.

I assume I’m doing something wrong but no idea exactly what. Any ideas?
Thanks
John

2013/9/18 jmcfarlane

**
Hi,

I’m trying to get my app to pause and resume gracefully on Android
(testing with HTC One, Android 4.1). I listen for events using a filter set
by SDL_SetEventFilter and before I even receive
SDL_APP_WILLENTERBACKGROUND, I get:

Quote:

E/libEGL (29145): call to OpenGL ES API with no current context (logged
once per thread)

My renderer is on a separate thread to my event queue (set up using SDL
threads). The event thread is where I call SDL_Init and SDL_CreateWindow.
The render thread is where I set up my context (SDL_CreateRenderer). When I
receive SDL_APP_WILLENTERBACKGROUND, I call SDL_DestroyRenderer on the
render thread. Before I even see SDL_APP_DIDENTERFOREGROUND message the
crash occurs in SDL_EGL_CreateSurface.

Why do you destroy the renderer?

Quote:

I/DEBUG ( 5895): #00 pc 00157214 /data/data/com.jsam.crag/lib/libSDL2.so
(SDL_EGL_CreateSurface+2[image: Cool]
I/DEBUG ( 5895): #01 pc 000aeb54 /data/data/com.jsam.crag/lib/libSDL2.so
(Java_org_libsdl_app_SDLActivity_onNativeSurfaceChanged+184)

This doesn’t seem to be affected by whether or not I comment out the
definition of SDL_ANDROID_BLOCK_ON_PAUSE in SDL_androidevents.c. If I don’t
do any shut-down and leave SDL_ANDROID_BLOCK_ON_PAUSE defined, I return to
a blank screen and an EGL error message is logged every time I swap buffers.

I assume I’m doing something wrong but no idea exactly what. Any ideas?

If you use SDL_SetEventFilter I think your handler for that filter won’t
run on the event thread nor on the render thread you set up, but on a third
thread which is the “Java side” thread. This could be causing the problem
you see (or not, hard to say because I’ve never tried this particular
combination). There’s a back and forth passing of messages and semaphores,
detailed in the Android Readme file, that makes sure all the right messages
make it out the event loop before it blocks itself, and you should probably
do well to listen for those events in your event loop instead of setting an
event filter. Context restoring is also handled automatically via this
mechanism, so there’s nothing in particular you need to do for that.–
Gabriel.

Why do you destroy the renderer?

I tried simply not rendering but this did not help. The error that spams the log if I rely on the SDL_ANDROID_BLOCK_ON_PAUSE definition alone is:

E/libEGL (28230): eglSwapBuffers:839 error 300d (EGL_BAD_SURFACE)

in response to calls to SDL_GL_SwapWindow.

The next sensible step seemed to be to try to tidy up the video state on pause and start it up again on resume. After all, the README says that this is roughly what SDL tries to do if SDL_ANDROID_BLOCK_ON_PAUSE is defined. Perhaps I should take a step back and report the blank screen problem separately.

If you use SDL_SetEventFilter I think your handler for that filter won’t run on the event thread nor on the render thread you set up, but on a third thread which is the “Java side” thread. This could be causing the problem you see (or not, hard to say because I’ve never tried this particular combination).

I print to log whenever the SDL_SetEventFilter callback is called and I’m not seeing any of the 4 SDL_APP_ENTERGROUND events. At this stage, what thread I’m running on is presumably not an issue.

There’s a back and forth passing of messages and semaphores, detailed in the Android Readme file, that makes sure all the right messages make it out the event loop before it blocks itself, and you should probably do well to listen for those events in your event loop instead of setting an event filter. Context restoring is also handled automatically via this mechanism, so there’s nothing in particular you need to do for that.

I’m working from the migration guide here (http://wiki.libsdl.org/MigrationGuide#Mobile_platforms) and don’t see much detail about this in README-android.txt. Are you suggesting I should use SDL_AddEventWatch instead SDL_SetEventFilter? I got the impression that both would get called before they were put in the queue. I will try that.

It sounds like maybe the combination of multithreading and Android is where my problems lie. I will try SDL_AddEventWatch and maybe create a separate post detailing what happens when I just leave pause/resume up to SDL.
Thanks!
John

I’ve got back to looking at this problem. Leaving things up to SDL as directed in README-android leads to a crash as described. Also, I set up an event watch using SDL_AddEventWatch and SDL_APP_WILLENTERBACKGROUND is not being received by it before libEGL logs and error and crashes. (I am now using Android 4.3, BTW.)

Please attach a log and/or a test case to reproduce. Thanks!

2013/10/9 jmcfarlane > **

I’ve got back to looking at this problem. Leaving things up to SDL as
directed in README-android leads to a crash as described. Also, I set up an
event watch using SDL_AddEventWatch and SDL_APP_WILLENTERBACKGROUND is not
being received by it before libEGL logs and error and crashes. (I am now
using Android 4.3, BTW.)


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Gabriel.

Ok, while trying to reduce the code down to a test case, I think I figured out why the message was not getting through. It appears that the SDL_SetEventFilter callback is called first and I was returning 0 thus filtering it out. If I instead return 1 from the filter callback, the message show up in the SDL_AddEventWatch callback subsequently.

Code:
int EventWatch(void*, SDL_Event* event)
{
if (event->type == SDL_APP_WILLENTERBACKGROUND)
{
__android_log_print(ANDROID_LOG_INFO, “MyLog”, “EventWatch() received SDL_APP_WILLENTERBACKGROUND”);
}
return 0;
}

int EventFilter(void *, SDL_Event * event)
{
if (event->type == SDL_APP_WILLENTERBACKGROUND)
{
__android_log_print(ANDROID_LOG_INFO, “MyLog”, “EventFilter() received SDL_APP_WILLENTERBACKGROUND”);
}
return 0;
}

void main()
{
__android_log_print(ANDROID_LOG_INFO, “MyLog”, “test() begin”);
SDL_Init(SDL_INIT_VIDEO);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
auto window = SDL_CreateWindow(“test”,
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
1920, 1080,
SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL);
SDL_AddEventWatch(EventWatch, nullptr);
SDL_SetEventFilter(EventFilter, nullptr);
while (true)
{
SDL_GL_SwapWindow(window);
}
}

yields:

V/SDL (23047): onResume()
V/SDL (23047): surfaceCreated()
V/SDL (23047): surfaceChanged()
V/SDL (23047): pixel format RGB_565
V/SDL (23047): Window size:1794x1080
I/SDL (23047): SDL_Android_Init()
I/SDL (23047): SDL_Android_Init() finished!
I/MyLog (23047): test() begin
I/MyLog (23047): RenderThread() begin
V/SDL (23047): onWindowFocusChanged(): true
E/Prism.WidgetManager( 1158): The same lists. No need to update. skip it.
V/SDL (23047): onPause()
V/SDL (23047): nativePause()
I/MyLog (23047): EventFilter() received SDL_APP_WILLENTERBACKGROUND
V/SDL (23047): surfaceDestroyed()
V/SDL (23047): onWindowFocusChanged(): false

But if I change the return value of EventFilter to 1, I get this:

V/SDL (23216): onResume()
V/SDL (23216): surfaceCreated()
V/SDL (23216): surfaceChanged()
V/SDL (23216): pixel format RGB_565
V/SDL (23216): Window size:1794x1080
I/SDL (23216): SDL_Android_Init()
I/SDL (23216): SDL_Android_Init() finished!
I/MyLog (23216): test() begin
I/MyLog (23216): RenderThread() begin
V/SDL (23216): onWindowFocusChanged(): true
V/SDL (23216): onPause()
V/SDL (23216): nativePause()
I/MyLog (23216): EventFilter() received SDL_APP_WILLENTERBACKGROUND
I/MyLog (23216): EventWatch() received SDL_APP_WILLENTERBACKGROUND
V/SDL (23216): onWindowFocusChanged(): false
V/SDL (23216): surfaceDestroyed()

Note that the above test case doesn’t generate the EGL error or crash. It also makes no difference whether SDL_ANDROID_BLOCK_ON_PAUSE is defined or not, nor whether I run the render loop in a separate thread. However, in my actual app which has multiple threads kept busy for much of the time, the EGL warning is printed before EventFilter ever receives the SDL_APP_WILLENTERBACKGROUND. I can avoid crashing straight away by avoiding rendering, but after SDL_APP_DIDENTERFOREGROUND, the follow call to SDL_GL_SwapWindow results in the GL error state being set.

Here’s the log. (Lines marked crag_log are output from my app):

V/SDL (31907): onResume()
V/SDL (31907): surfaceCreated()
V/SDL (31907): surfaceChanged()
V/SDL (31907): pixel format RGB_565
V/SDL (31907): Window size:1794x1080
I/SDL (31907): SDL_Android_Init()
I/SDL (31907): SDL_Android_Init() finished!
W/crag_log(31907): Crag Demo; Copyright 2010-2013 John McFarlane
W/crag_log(31907): jni/src/…/…/…/src/main.cpp(329):-> CragMain [] main
E/crag_log(31907): Failed to open config file, crag.cfg.
E/crag_log(31907): Failed to open config file, crag.cfg.
W/crag_log(31907): ni/src/…/…/…/src/core/app.cpp( 80):Creating window 1794,1080 [] main
W/crag_log(31907): c/…/…/…/src/smp/scheduler.cpp(495):scheduler using 0 threads. [] main
V/SDL (31907): onWindowFocusChanged(): true
W/crag_log(31907): /src/…/…/…/src/gfx/Engine.cpp(660):Unknown refresh rate; using default_refresh_rate of 50Hz [] render
W/crag_log(31907): …/src/scripts/MonitorOrigin.cpp( 83):Set: -0.276132,9999400.000000,-5.128622 [] sim
V/SDL (31907): onPause()
E/libEGL (31907): call to OpenGL ES API with no current context (logged once per thread)
V/SDL (31907): nativePause()
W/crag_log(31907): jni/src/…/…/…/src/main.cpp(292):SDL_APP_WILLENTERBACKGROUND []
V/SDL (31907): onWindowFocusChanged(): false
V/SDL (31907): surfaceDestroyed()
V/SDL (31907): onResume()
V/SDL (31907): surfaceCreated()
V/SDL (31907): surfaceChanged()
V/SDL (31907): pixel format RGB_565
V/SDL (31907): Window size:1794x1080
V/SDL (31907): onWindowFocusChanged(): true
V/SDL (31907): nativeResume()
W/crag_log(31907): jni/src/…/…/…/src/main.cpp(296):SDL_APP_DIDENTERFOREGROUND []
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
W/crag_log(31907): /src/…/…/…/src/gfx/Engine.cpp(902):GL error 505 (GL error) [] render
F/crag (31907): internal error
F/libc (31907): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 31928 (SDLThread)

Note that GL error 0x505 is GL_OUT_OF_MEMORY.

So I’m guessing that some graphical resource or other requires re-initialization on resume and will investigate that. However, any further guidance would be appreciated.

Update: If you spot my deliberate mistake, there is unlikely to be a context-related error message as I haven’t created a context so here’s a revised test case which focuses on the problems experienced on resume:

Code:
bool paused = false;

int EventFilter(void *, SDL_Event * event)
{
switch (event->type)
{
case SDL_APP_WILLENTERBACKGROUND:
DEBUG_MESSAGE(“EventFilter() received SDL_APP_WILLENTERBACKGROUND”);
paused = true;
break;

	case SDL_APP_DIDENTERFOREGROUND:
		DEBUG_MESSAGE("EventFilter() received SDL_APP_DIDENTERFOREGROUND"); 
		paused = false;
		break;
} 
return 1;

}

int main()
{
DEBUG_MESSAGE(“test() begin”);
SDL_Init(SDL_INIT_VIDEO);
auto window = SDL_CreateWindow(“test”,
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
1920, 1080,
SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL);
SDL_SetEventFilter(EventFilter, nullptr);

// this is where I normally launch a render thread
SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
while (true) 
{ 
	if (! paused)
	{
		auto lum = static_cast<float>(rand()) / static_cast<float>(RAND_MAX);
		glClearColor(lum, lum, lum, 1);
		glClear(GL_COLOR_BUFFER_BIT);
		SDL_GL_SwapWindow(window); 
		SDL_Delay(100);
	}
} 
return 0;

}

AFAIK, this app ought to change the grey level of the screen ten times a second and it does so until the home button is pressed and the app is paused. On return, the app is inactive, with a black screen. Here’s the log:

V/SDL (30979): onResume()
V/SDL (30979): surfaceCreated()
V/SDL (30979): surfaceChanged()
V/SDL (30979): pixel format RGB_565
V/SDL (30979): Window size:1794x1080
I/SDL (30979): SDL_Android_Init()
I/SDL (30979): SDL_Android_Init() finished!
W/crag_log(30979): jni/src/…/…/…/src/main.cpp( 66):test() begin []
V/SDL (30979): onWindowFocusChanged(): true
V/SDL (30979): onPause()
E/libEGL (30979): call to OpenGL ES API with no current context (logged once per thread)
V/SDL (30979): nativePause()
W/crag_log(30979): jni/src/…/…/…/src/main.cpp( 52):EventFilter() received SDL_APP_WILLENTERBACKGROUND []
V/SDL (30979): onWindowFocusChanged(): false
V/SDL (30979): surfaceDestroyed()
V/SDL (30979): onResume()
V/SDL (30979): surfaceCreated()
V/SDL (30979): surfaceChanged()
V/SDL (30979): pixel format RGB_565
V/SDL (30979): Window size:1794x1080
V/SDL (30979): onWindowFocusChanged(): true
V/SDL (30979): nativeResume()
W/crag_log(30979): jni/src/…/…/…/src/main.cpp( 57):EventFilter() received SDL_APP_DIDENTERFOREGROUND []
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon

I have a two main concerns about this test: firstly, it seems like there are problems with the context which occur before I even receive SDL_APP_WILLENTERBACKGROUND; and secondly, I’m not sure why rendering fails after a resume.

Is the failure to resume rendering a fault in the test case or is it time to start digging into the Activity?

Many thanks,
John

Did you update your sources? I sent a fix for this a couple of days ago.

2013/10/11 jmcfarlane > **

Update: If you spot my deliberate mistake, there is unlikely to be a
context-related error message as I haven’t created a context so here’s a
revised test case which focuses on the problems experienced on resume:

Code:

bool paused = false;

int EventFilter(void *, SDL_Event * event)
{
switch (event->type)
{
case SDL_APP_WILLENTERBACKGROUND:
DEBUG_MESSAGE(“EventFilter() received
SDL_APP_WILLENTERBACKGROUND”);
paused = true;
break;

  case SDL_APP_DIDENTERFOREGROUND:
     DEBUG_MESSAGE("EventFilter() received

SDL_APP_DIDENTERFOREGROUND");
paused = false;
break;
}
return 1;
}

int main()
{
DEBUG_MESSAGE(“test() begin”);
SDL_Init(SDL_INIT_VIDEO);
auto window = SDL_CreateWindow(“test”,
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
1920, 1080,
SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL);
SDL_SetEventFilter(EventFilter, nullptr);

// this is where I normally launch a render thread
SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
while (true)
{
if (! paused)
{
auto lum = static_cast**(rand()) / static_cast**(RAND_MAX);
glClearColor(lum, lum, lum, 1);
glClear(GL_COLOR_BUFFER_BIT);
SDL_GL_SwapWindow(window);
SDL_Delay(100);
}
}
return 0;
}

AFAIK, this app ought to change the grey level of the screen ten times a
second and it does so until the home button is pressed and the app is
paused. On return, the app is inactive, with a black screen. Here’s the log:

Quote:

V/SDL (30979): onResume()
V/SDL (30979): surfaceCreated()
V/SDL (30979): surfaceChanged()
V/SDL (30979): pixel format RGB_565
V/SDL (30979): Window size:1794x1080
I/SDL (30979): SDL_Android_Init()
I/SDL (30979): SDL_Android_Init() finished!
W/crag_log(30979): jni/src/…/…/…/src/main.cpp( 66):test() begin []
V/SDL (30979): onWindowFocusChanged(): true
V/SDL (30979): onPause()
E/libEGL (30979): call to OpenGL ES API with no current context (logged
once per thread)
V/SDL (30979): nativePause()
W/crag_log(30979): jni/src/…/…/…/src/main.cpp( 52):EventFilter()
received SDL_APP_WILLENTERBACKGROUND []
V/SDL (30979): onWindowFocusChanged(): false
V/SDL (30979): surfaceDestroyed()
V/SDL (30979): onResume()
V/SDL (30979): surfaceCreated()
V/SDL (30979): surfaceChanged()
V/SDL (30979): pixel format RGB_565
V/SDL (30979): Window size:1794x1080
V/SDL (30979): onWindowFocusChanged(): true
V/SDL (30979): nativeResume()
W/crag_log(30979): jni/src/…/…/…/src/main.cpp( 57):EventFilter()
received SDL_APP_DIDENTERFOREGROUND []
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon
E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon

I have a two main concerns about this test: firstly, it seems like there
are problems with the context which occur before I even receive
SDL_APP_WILLENTERBACKGROUND; and secondly, I’m not sure why rendering fails
after a resume.

Is the failure to resume rendering a fault in the test case or is it time
to start digging into the Activity?

Many thanks,
John


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Gabriel.

I just pulled and there’s no change. I also tested it on a much older model (HTC Nexus One, 2.3.7) and it behaves the same. But instead of outputting:

E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon

is says:

E/Surface ( 1394): [Surface] using an invalid surface, identity=17 should be 20

Here’s the full log from the Nexus:> V/SDL ( 1454): onResume()

V/SDL ( 1454): surfaceCreated()
V/SDL ( 1454): surfaceChanged()
V/SDL ( 1454): pixel format RGB_565
V/SDL ( 1454): Window size:800x480
V/SDL ( 1454): onWindowFocusChanged(): true
I/SDL ( 1454): SDL_Android_Init()
I/SDL ( 1454): SDL_Android_Init() finished!
W/crag_log( 1454): jni/src/…/…/…/src/main.cpp( 66):test() begin []
V/SDL ( 1454): onPause()
E/libEGL ( 1454): call to OpenGL ES API with no current context (logged once per thread)
V/SDL ( 1454): nativePause()
W/crag_log( 1454): jni/src/…/…/…/src/main.cpp( 52):EventFilter() received SDL_APP_WILLENTERBACKGROUND []
V/SDL ( 1454): onWindowFocusChanged(): false
V/SDL ( 1454): surfaceDestroyed()
V/SDL ( 1454): onResume()
V/SDL ( 1454): surfaceCreated()
V/SDL ( 1454): surfaceChanged()
V/SDL ( 1454): pixel format RGB_565
V/SDL ( 1454): Window size:800x480
V/SDL ( 1454): onWindowFocusChanged(): true
V/SDL ( 1454): nativeResume()
W/crag_log( 1454): jni/src/…/…/…/src/main.cpp( 57):EventFilter() received SDL_APP_DIDENTERFOREGROUND []
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should be 32
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should be 32
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should be 32
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should be 32
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should be 32
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should be 32

I’d say make sure you make a clean build because that error still looks
suspiciously like the one I fixed, which was caused by something setting
the GL context as current after SDL set it to NULL to allow Android to
release the EGL surface (try sticking a log inside SDL_GL_MakeCurrent and
see which threads are doing what).

2013/10/11 jmcfarlane > **

I just pulled and there’s no change. I also tested it on a much older
model (HTC Nexus One, 2.3.7) and it behaves the same. But instead of
outputting:

Quote:

E/BufferQueue( 237): [SurfaceView] dequeueBuffer: BufferQueue is abandon

is says:

Quote:

E/Surface ( 1394): [Surface] using an invalid surface, identity=17
should be 20

Here’s the full log from the Nexus:

Quote:

V/SDL ( 1454): onResume()
V/SDL ( 1454): surfaceCreated()
V/SDL ( 1454): surfaceChanged()
V/SDL ( 1454): pixel format RGB_565
V/SDL ( 1454): Window size:800x480
V/SDL ( 1454): onWindowFocusChanged(): true
I/SDL ( 1454): SDL_Android_Init()
I/SDL ( 1454): SDL_Android_Init() finished!
W/crag_log( 1454): jni/src/…/…/…/src/main.cpp( 66):test() begin []
V/SDL ( 1454): onPause()
E/libEGL ( 1454): call to OpenGL ES API with no current context (logged
once per thread)
V/SDL ( 1454): nativePause()
W/crag_log( 1454): jni/src/…/…/…/src/main.cpp( 52):EventFilter()
received SDL_APP_WILLENTERBACKGROUND []
V/SDL ( 1454): onWindowFocusChanged(): false
V/SDL ( 1454): surfaceDestroyed()
V/SDL ( 1454): onResume()
V/SDL ( 1454): surfaceCreated()
V/SDL ( 1454): surfaceChanged()
V/SDL ( 1454): pixel format RGB_565
V/SDL ( 1454): Window size:800x480
V/SDL ( 1454): onWindowFocusChanged(): true
V/SDL ( 1454): nativeResume()
W/crag_log( 1454): jni/src/…/…/…/src/main.cpp( 57):EventFilter()
received SDL_APP_DIDENTERFOREGROUND []
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should
be 32
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should
be 32
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should
be 32
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should
be 32
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should
be 32
E/Surface ( 1454): [Surface] using an invalid surface, identity=29 should
be 32


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Gabriel.