CRASH: adb logcat: "D/Corona (13417): Error in drawing our frame! Surface is bad!"

All messages printed from my game code begin with “I/Corona”.

This message appears to be directly in the Corona engine, as it begins with “D/Corona”.

Although this problem has occurred in recent Daily Build 2830, I can tell you for sure that this is a new problem that didn’t exist prior to Daily Build 2803, perhaps even later.

          “D/Corona  (13417): Error in drawing our frame! Surface is bad!”

I saw this post, but no one responded to it: https://forums.coronalabs.com/topic/61679-error-error-in-drawing-our-frame-surface-is-bad/

This causes my game to crash and now that I’m about a month from release, I have no idea where to start to find and fix this problem. Any help is very much appreciated.

Hi troylyndon,

You are correct in that this message is coming from the engine. Is there any more context you can provide on how you encountered this issue? What device/OS version you’re running on; what was your app doing, what actions were you taking in your app, etc.

To be a little more specific, this particular issue occurs with in the GLSurfaceView portion of the Android OS if there was an issue with swapping rendering surfaces. See the related source code here.

Hi Ajay, The only way to be sure you can find the problem in the quickest amount of time would be for me to send you the entire project.

Please email me at troylyndon@gmailDOTcom with your email address and I’ll send you the project via Dropbox.

I’m getting this too. Build 2832. Have you found what might cause this issue?

Can say a lot of why this might happen. log shows endless repeat of these:

E/BufferQueueProducer(  246): SurfaceView dequeueBuffer: BufferQueue has been abandoned

E/IMGSRV  (23255): :0: DequeueBufferWrapper: Failed to de-queue buffer (-19)

E/IMGSRV  (23255): :0: KEGLGetDrawableParameters: Native window is invalid

W/GLThread(23255): eglSwapBuffers failed: EGL_BAD_SURFACE

and then:

D/Corona  (23255): Error in drawing our frame! Surface is bad!

This problem seems to happen when my USB cable becomes disconnected after I started the App. It doesn’t happen when I simply disconnect the cable - or at least, it doesn’t crash (even if it does do it).

On our setup it has nothing to do with USB connection. The problem appear on my production version on various devices. We did not encounter this issue on previous production build over 2802, so this might be a degradation entered quite late into the core engine.

The bug is back.

TroysMac:documents troylyndon$ adb logcat Corona:v *:s
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
V/Corona  (27142): > Class.forName: network.LuaLoader
V/Corona  (27142): < Class.forName: network.LuaLoader
V/Corona  (27142): Loading via reflection: network.LuaLoader
I/Corona  (27142): Platform: HTC One X / ARM Neon / 4.1.1 / Adreno ™ 225 / OpenGL ES 2.0 V@4.1 AU@ (CL@2814726) / 2016.2830 / English | US | en_US | en
V/Corona  (27142): > Class.forName: plugin.fuse.LuaLoader
V/Corona  (27142): > Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona  (27142): < Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona  (27142): Loading via reflection: CoronaProvider.licensing.google.LuaLoader
V/Corona  (27142): > Class.forName: plugin.notifications.LuaLoader
V/Corona  (27142): < Class.forName: plugin.notifications.LuaLoader
V/Corona  (27142): Loading via reflection: plugin.notifications.LuaLoader
V/Corona  (27142): > Class.forName: plugin.facebook.v4.LuaLoader
V/Corona  (27142): < Class.forName: plugin.facebook.v4.LuaLoader
V/Corona  (27142): Loading via reflection: plugin.facebook.v4.LuaLoader
D/Corona  (27142): Error in drawing our frame! Surface is bad!
 

At this point, so much is going on. But nothing new. Which means that somewhere between version 2802 and 2830, something caused this problem to begin happening. Unfortunately, even though music continues to play, the game stops responding to any touches.

This does not occur on every Android device. I currently have an HTC One (2011) running Android 4.1.1. It has worked perfectly until Daily Build 2830. 2802 was fine.

I’m ready to send the entire project to CoronaLabs if I’m provided the information to send it along. I have plans to release the game within the next 60-90 days, so this is really a major problem.

We would need a bug case filed that includes the project code to reproduce the problem. We haven’t seen this error in our testing of 2830.

I had thought this bug disappeared in the latest Daily Builds, but it hasn’t.

This issue of GPU memory usage is the problem; and it is related to the same issues that causes jetsam to kill my app on iOS platforms. To continue to follow this issue, go to: https://forums.coronalabs.com/topic/62552-my-ios-game-after-20-minutes-of-play-log-was-killed-by-jetsam/

Hi troylyndon,

You are correct in that this message is coming from the engine. Is there any more context you can provide on how you encountered this issue? What device/OS version you’re running on; what was your app doing, what actions were you taking in your app, etc.

To be a little more specific, this particular issue occurs with in the GLSurfaceView portion of the Android OS if there was an issue with swapping rendering surfaces. See the related source code here.

Hi Ajay, The only way to be sure you can find the problem in the quickest amount of time would be for me to send you the entire project.

Please email me at troylyndon@gmailDOTcom with your email address and I’ll send you the project via Dropbox.

I’m getting this too. Build 2832. Have you found what might cause this issue?

Can say a lot of why this might happen. log shows endless repeat of these:

E/BufferQueueProducer(  246): SurfaceView dequeueBuffer: BufferQueue has been abandoned

E/IMGSRV  (23255): :0: DequeueBufferWrapper: Failed to de-queue buffer (-19)

E/IMGSRV  (23255): :0: KEGLGetDrawableParameters: Native window is invalid

W/GLThread(23255): eglSwapBuffers failed: EGL_BAD_SURFACE

and then:

D/Corona  (23255): Error in drawing our frame! Surface is bad!

This problem seems to happen when my USB cable becomes disconnected after I started the App. It doesn’t happen when I simply disconnect the cable - or at least, it doesn’t crash (even if it does do it).

On our setup it has nothing to do with USB connection. The problem appear on my production version on various devices. We did not encounter this issue on previous production build over 2802, so this might be a degradation entered quite late into the core engine.

The bug is back.

TroysMac:documents troylyndon$ adb logcat Corona:v *:s
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
V/Corona  (27142): > Class.forName: network.LuaLoader
V/Corona  (27142): < Class.forName: network.LuaLoader
V/Corona  (27142): Loading via reflection: network.LuaLoader
I/Corona  (27142): Platform: HTC One X / ARM Neon / 4.1.1 / Adreno ™ 225 / OpenGL ES 2.0 V@4.1 AU@ (CL@2814726) / 2016.2830 / English | US | en_US | en
V/Corona  (27142): > Class.forName: plugin.fuse.LuaLoader
V/Corona  (27142): > Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona  (27142): < Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona  (27142): Loading via reflection: CoronaProvider.licensing.google.LuaLoader
V/Corona  (27142): > Class.forName: plugin.notifications.LuaLoader
V/Corona  (27142): < Class.forName: plugin.notifications.LuaLoader
V/Corona  (27142): Loading via reflection: plugin.notifications.LuaLoader
V/Corona  (27142): > Class.forName: plugin.facebook.v4.LuaLoader
V/Corona  (27142): < Class.forName: plugin.facebook.v4.LuaLoader
V/Corona  (27142): Loading via reflection: plugin.facebook.v4.LuaLoader
D/Corona  (27142): Error in drawing our frame! Surface is bad!
 

At this point, so much is going on. But nothing new. Which means that somewhere between version 2802 and 2830, something caused this problem to begin happening. Unfortunately, even though music continues to play, the game stops responding to any touches.

This does not occur on every Android device. I currently have an HTC One (2011) running Android 4.1.1. It has worked perfectly until Daily Build 2830. 2802 was fine.

I’m ready to send the entire project to CoronaLabs if I’m provided the information to send it along. I have plans to release the game within the next 60-90 days, so this is really a major problem.

We would need a bug case filed that includes the project code to reproduce the problem. We haven’t seen this error in our testing of 2830.

I had thought this bug disappeared in the latest Daily Builds, but it hasn’t.

This issue of GPU memory usage is the problem; and it is related to the same issues that causes jetsam to kill my app on iOS platforms. To continue to follow this issue, go to: https://forums.coronalabs.com/topic/62552-my-ios-game-after-20-minutes-of-play-log-was-killed-by-jetsam/