eglSwapBuffers Error on some devices

Hi all, I got the error message below after changed few scene on Samsung Galaxy Y , Android 2.3.5
I’ve tried 4 more devices and they are all work perfect.
Therefore I want to ask: Is it the device problem? Any idea I can fix the error?
Many thanks

03-07 16:18:59.546: ERROR/(2487): RTOS COMMON MEM zero linear buffer allocated 8396800 0 205
03-07 16:18:59.546: ERROR/(2487): RTOS COMMON MEM allocation failed from global pool for 8388608 bytes… space left is 1829536 bytes
03-07 16:18:59.867: ERROR/BRCM_EGL(2487): eglSwapBuffers Error 0x505
03-07 16:18:59.906: ERROR/EGL_SERVER(2487): pid mem_get_free_space before = 5fe6e0
03-07 16:18:59.906: ERROR/EGL_SERVER(2487): pid mem_get_free_space = 5fe6e0
03-07 16:18:59.914: ERROR/AndroidRuntime(2487): FATAL EXCEPTION: GLThread 11
03-07 16:18:59.914: ERROR/AndroidRuntime(2487): java.lang.RuntimeException: eglSwapBuffers failed: EGL_SUCCESS
03-07 16:18:59.914: ERROR/AndroidRuntime(2487): at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1085)
03-07 16:18:59.914: ERROR/AndroidRuntime(2487): at android.opengl.GLSurfaceView$EglHelper.swap(GLSurfaceView.java:1043)
03-07 16:18:59.914: ERROR/AndroidRuntime(2487): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1369)
03-07 16:18:59.914: ERROR/AndroidRuntime(2487): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1123)
03-07 16:18:59.921: ERROR/liblog(1463): failed to call dumpstate
03-07 16:19:00.046: ERROR/(1463): Dumpstate > /data/log/dumpstate_app_error

Yep. It’s reported that some types of Samsung’s android phones are a bit different.
But we cannot reproduced this problem on Samsung GalaxyTab & Samsung Galaxy i9188, which are the only Samsung devices we have.
Perhaps you can ask this question to samsung tech support.

Hi,

Has there been any update on this problem? We’re seeing exactly the same issue on the Samsung Galaxy Y (GT-S5360).

Richard

I got the same error.

here’s a related issue on google code:
http://code.google.com/p/android/issues/detail?id=12378

is there any fix for this problem?

we have that crash in a Samsung Nexus S Android 4.1.2(Jelly Beans)

I have the same issue with my apps and Samsung Galaxy Y (mainly)
onResume and onPause set properly

GLSurfaceView methods calls after super methods (Cocos2dxActivity ver 2.1.1)

There’s something new about it?

thanks
Don

Hi Don Mizzi,
I have same issue with Samsung Galaxy Y
How to fix it?

No fix for me.

I continue to see this catch in the crash report of my developer console

It cannot be fixed as far I know.

Here is a list of devices that have the problem:

Samsung Galaxy Y (GT-S5360 GT-S5360B GT-S5360L GT-S5363 GT-S5368 GT-S5369 SCH-I509 SCH-i509)
Samsung Galaxy Y Duos (GT-S6102 GT-S6102B GT-S6102E ivory)
Samsung Galaxy Ace (GT-S5830 GT-S5830B GT-S5830C GT-S5830D GT-S5830G GT-S5830L GT-S5830M GT-S5830T GT-S5830i GT-S5838 GT-S5839i GT-S6358 SCH-I619 SHW-M240S)
Samsung Galaxy Ace Duos (GT-S6802 GT-S6352 GT-S6802B SCH-I579 SCH-I589 SCH-i579 SCH-i589)
Samsung Galaxy Mini (GT-S5570 GT-S5570B GT-S5570I GT-S5570L GT-S5578 SGH-T499 SGH-T499V SGH-T499Y)
Samsung Galaxy Pocket (GT-S5300 GT-S5300B GT-S5302 GT-S5302B)

Hi, I have fixed by change malloc to new in CCTextureAtlas :slight_smile:

Hi Blue Wind that’s sound great, could you explain better your solution?

I checked CCTextureAtlas.cpp of Cocos2d-x 2.1.5 and I found 5 malloc.

Where I have to use new instead malloc?

thanks
Don

I think

  • new/delete use Free Store
  • malloc/free use Heap memory
    When we use many TextureAtlas, it need more Heap memory.

thanks for reply, your explanation is very useful.

Actually, I wanted to ask you, if you replace all five malloc in the CCTextureAtlas with new? or only a part of those?

thanks

Any news? Getting crash reports with this bug