Seeing crashed on Samsung Galaxy Y..
Monkey Targets Forums/Android/Seeing crashed on Samsung Galaxy Y..
| ||
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? |
| ||
Does your game use textures larger than 1024x1024? |
| ||
1280x720 is the resolution, and it does use a number of jpg's of this size.. |
| ||
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.. |
| ||
About 10 of them! |
| ||
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! |
| ||
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. |
| ||
No problem but I can remember I ran into the same problems quite a while ago... |
| ||
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)? |
| ||
will the device use less memory if I scale the images up at runtime (using DrawImage)? correct. |
| ||
Thanks, I will try that.The backgrounds have no detail anyway, so I could shrink them down, I guess. |
| ||
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. |
| ||
Like soap I never go above 1024x1024 just to be sure. |
| ||
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 |