Hi I hope someone can help me on this. My app runs ok on apple devices but android builds crashes every time users click on the back button. The app runs fine on android for hours but will crash every time the back button is hit(the home button works fine without any issues). When the app crashes it will only display a black screen and the only way to exit is the back button. This is the logcat error
I/Corona (22477): java.lang.OutOfMemoryError
I/Corona (22477): Java Stack Trace:
I/Corona (22477): com.ansca.corona.NativeToJavaBridge.getBitmapAsset(NativeToJavaBridge.java:1114)
I/Corona (22477): com.ansca.corona.NativeToJavaBridge.callGetBitmapAsset(NativeToJavaBridge.java:1394)
I/Corona (22477): com.ansca.corona.JavaToNativeShim.nativeResize(Native Method)
I/Corona (22477): com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:212)
I/Corona (22477): com.ansca.corona.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:355)
I/Corona (22477): com.ansca.corona.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1611)
I/Corona (22477): com.ansca.corona.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377)
Seems to be having issues loading my spritesheet. Tried this approach
local function onSystemEvent( event )
if event.type == “applicationExit” then
clean()
os.exit()
end
end
Runtime:addEventListener( “system”, onSystemEvent )
it mostly work but still crashes from time to time when the back button on the phone is hit. Another thing that works is by restarting the phone but that is not really much of a solution. I am not sure if this is a bug or not.
Many Thanks
Dan