Both BoundElementBuffer and indices are NULL

Hi!

Another weird problem when resuming an Android app on my Galaxy Tab 3.

When resuming a game which went to the background, screen turns black but the game seems to work in the background.

The log is like this:


04-25 11:45:07.236 D/Mono    (17185): DllImport searching in: ‘GLESv2’ (’./libGLESv2.so’).
04-25 11:45:07.236 D/Mono    (17185): Searching for ‘glIsShader’.
04-25 11:45:07.236 E/libEGL  (17185): call to OpenGL ES API with no current context (logged once per thread)
04-25 11:45:07.246 D/MonoGame(17185): AndroidGameWindow.DestroyFrameBuffer
04-25 11:45:07.246 D/MonoGame(17185): AndroidGameWindow.SurfaceDestroyed


<paused the game to the android “homepage”>

The thread ‘Unknown’ (0x2) has exited with code 0 (0x0).
Thread started: NetThread #15
04-25 11:45:37.236 V/MediaPlayer-JNI(17185): start
04-25 11:45:37.236 V/MediaPlayer(17185): start
04-25 11:45:37.266 I/Choreographer(17185): Skipped 892 frames!  The application may be doing too much work on its main thread.

04-25 11:45:37.306 D/MonoGame(17185): AndroidGameWindow.SurfaceCreated: surfaceFrame = Rect(0, 0 - 800, 1280)
04-25 11:45:37.306 D/MonoGame(17185): AndroidGameWindow.SurfaceChanged: format = Rgb565, width = 800, height = 1280

04-25 11:45:37.306 D/MonoGame(17185): GraphicsDeviceManager.ResetClientBounds: newClientBounds={X:0 Y:0 Width:800 Height:1280}
04-25 11:45:37.356 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:37.356 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL


And then, after some garbage collection, the log starts spamming Warning! Both BoundElementBuffer and indices are NULL forever


04-25 11:45:38.466 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:38.466 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:38.466 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:38.466 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:38.476 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:38.476 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:38.486 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:38.486 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:38.506 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:38.506 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL
04-25 11:45:38.516 E/IMGSRV  (17185): :0: Warning! Both BoundElementBuffer and indices are NULL

The game seems to keep working on the background, reacting to touch and being able to navigate through menus (but showing nothing but a black screen).

Any hints? I can’t even find this warning message on google :slight_smile:

Just for the record, it was my fault: This message appears if you use a custom model (a vertexbuffer, …) and you don’t restore it after “tombstoning”.

Now I’m only dealing with a black screen after resume :slight_smile:

Yes… any graphics resource you create and fill outside of the ContentManager will need to be restored after a tombstone event. This is no different that WP7 or WP8 which also don’t automatically restore graphics resources after tombstoning.