I’m occasionally seeing this crash in Android, seemingly in SDL_SetRenderTarget()
(OpenGLES), when restoring my app to the foreground:
12-10 14:05:09.160 18786 18786 F DEBUG : Cmdline: com.rtrussell.inverter
12-10 14:05:09.160 18786 18786 F DEBUG : pid: 18552, tid: 18605, name: SDLThread >>> com.rtrussell.inverter <<<
12-10 14:05:09.160 18786 18786 F DEBUG : #00 pc 000000000006e548 /data/app/~~-psVMLFnoa2C3y64iRg7Eg==/com.rtrussell.inverter-6UDBqMIWb19kbwI0BuLzLw==/lib/arm64/libSDL2.so (BuildId: 09e8b2784f83eeea073e4bb0dafffa74b7e5807e)
12-10 14:05:09.160 18786 18786 F DEBUG : #01 pc 0000000000065f1c /data/app/~~-psVMLFnoa2C3y64iRg7Eg==/com.rtrussell.inverter-6UDBqMIWb19kbwI0BuLzLw==/lib/arm64/libSDL2.so (BuildId: 09e8b2784f83eeea073e4bb0dafffa74b7e5807e)
12-10 14:05:09.160 18786 18786 F DEBUG : #02 pc 0000000000067e60 /data/app/~~-psVMLFnoa2C3y64iRg7Eg==/com.rtrussell.inverter-6UDBqMIWb19kbwI0BuLzLw==/lib/arm64/libSDL2.so (SDL_SetRenderTarget_REAL+60) (BuildId: 09e8b2784f83eeea073e4bb0dafffa74b7e5807e)
12-10 14:05:09.160 18786 18786 F DEBUG : #03 pc 0000000000050b58 /data/app/~~-psVMLFnoa2C3y64iRg7Eg==/com.rtrussell.inverter-6UDBqMIWb19kbwI0BuLzLw==/lib/arm64/libSDL2.so (SDL_SetRenderTarget+16) (BuildId: 09e8b2784f83eeea073e4bb0dafffa74b7e5807e)
12-10 14:05:09.160 18786 18786 F DEBUG : #04 pc 0000000000030b80 /data/app/~~-psVMLFnoa2C3y64iRg7Eg==/com.rtrussell.inverter-6UDBqMIWb19kbwI0BuLzLw==/lib/arm64/libmain.so (mainloop+760) (BuildId: 8d4cd7fbb163d62ddb031dbdfe0d5c05c04df07c)
12-10 14:05:09.161 18786 18786 F DEBUG : #05 pc 0000000000032b6c /data/app/~~-psVMLFnoa2C3y64iRg7Eg==/com.rtrussell.inverter-6UDBqMIWb19kbwI0BuLzLw==/lib/arm64/libmain.so (SDL_main+3476) (BuildId: 8d4cd7fbb163d62ddb031dbdfe0d5c05c04df07c)
12-10 14:05:09.161 18786 18786 F DEBUG : #06 pc 000000000004029c /data/app/~~-psVMLFnoa2C3y64iRg7Eg==/com.rtrussell.inverter-6UDBqMIWb19kbwI0BuLzLw==/lib/arm64/libSDL2.so (Java_org_libsdl_app_SDLActivity_nativeRunMain+500) (BuildId: 09e8b2784f83eeea073e4bb0dafffa74b7e5807e)
12-10 14:05:09.161 18786 18786 F DEBUG : #13 pc 0000000000014a80 [anon:dalvik-classes.dex extracted in memory from /data/app/~~-psVMLFnoa2C3y64iRg7Eg==/com.rtrussell.inverter-6UDBqMIWb19kbwI0BuLzLw==/base.apk] (org.libsdl.app.SDLMain.run+156)
12-10 14:05:09.206 5242 18794 W ActivityManager: crash : com.rtrussell.inverter,10396
I’m handling the SDL_RENDER_DEVICE_RESET event, but (depending on exactly when this event is issued) I can’t be sure that I’m not calling SDL_SetRenderTarget()
with a texture that has been destroyed but not yet recreated. Any ideas?