Seeing crashed on Samsung Galaxy Y..

Monkey Targets Forums/Android/Seeing crashed on Samsung Galaxy Y..

silentshark(Posted 2013) [#1]
Hello,

I'm getting quite a few reports of crashes from Google Play for my latest app, Swerve! This error seems to be being reported on people using the Samsung Galaxy Y:

java.lang.RuntimeException: eglSwapBuffers failed: EGL_SUCCESS
at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1099)
at android.opengl.GLSurfaceView$EglHelper.swap(GLSurfaceView.java:1057)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1389)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1138)


Any ideas what this means? Is it an out of memory error?


Soap(Posted 2013) [#2]
Does your game use textures larger than 1024x1024?


silentshark(Posted 2013) [#3]
1280x720 is the resolution, and it does use a number of jpg's of this size..


Xaron(Posted 2013) [#4]
A number of jpgs of this size... What is that number? You can run fairly quick into memory issues with these sizes. Remember it will use probably 2048x1024 internally in that case..


silentshark(Posted 2013) [#5]
About 10 of them!


Xaron(Posted 2013) [#6]
Aye... that's quite heavy. Do you really use all of them the same time (same level)? Or could you just discard them and load less?

You could try to make them half the size, just for testing, if that's the problem or not!


silentshark(Posted 2013) [#7]
Yep, I could/ should probably do that.. it's just tough to test out this stuff without an array of Android devices..

thanks for your help.


Xaron(Posted 2013) [#8]
No problem but I can remember I ran into the same problems quite a while ago...


silentshark(Posted 2013) [#9]
just a thought.. if I resize some of those images, say down to 640x380, will the device use less memory if I scale the images up at runtime (using DrawImage)?


AdamRedwoods(Posted 2013) [#10]
will the device use less memory if I scale the images up at runtime (using DrawImage)?

correct.


silentshark(Posted 2013) [#11]
Thanks, I will try that.The backgrounds have no detail anyway, so I could shrink them down, I guess.


Soap(Posted 2013) [#12]
If you ever need larger backgrounds you can cut them into chunks and load them that way. I never use textures larger than 1024x1024 because of this kind of problem.


Supertino(Posted 2013) [#13]
Like soap I never go above 1024x1024 just to be sure.


silentshark(Posted 2013) [#14]
Ok, I went on a graphic-shrinking quest. All the major graphics (backgrounds etc.) are 50% of their original size and scaled up at runtime.

This has resulted in a smaller download (never a bad thing), smaller footprint on Android devices (I guess), and no crashes. At least none in the last 4 days.

For now, I think Supertino's advice not to go above 1024x1024 on Android is a good move