3.17 We are getting bunch of crashes logged in Play console from CameraBackgroundDepthBrush::drawBackground. Please anyone have any ideas? Thank you!
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.company.mygame <<<
backtrace:
#00 pc 0000000000019302 /system/lib/libc.so (__memcpy_base_aligned+69)
#01 pc 0000000000160a15 /system/vendor/lib/egl/libGLESv2_adreno.so (_ZN20EsxVertexArrayObject18UpdateInternalVbosEPK17EsxDrawDescriptorjPK16EsxAttributeDesc+1176)
#02 pc 000000000033b817 /system/vendor/lib/egl/libGLESv2_adreno.so (_ZN20A5xVertexArrayObject11CalcVfdRegsEPK17EsxDrawDescriptorP10A5xVfdRegsi+76)
#03 pc 000000000034d6d9 /system/vendor/lib/egl/libGLESv2_adreno.so (_ZN10A5xContext13ValidateStateEPK17EsxDrawDescriptor+840)
#04 pc 000000000033f063 /system/vendor/lib/egl/libGLESv2_adreno.so (_ZN10A5xContext18HwValidateGfxStateEPK17EsxDrawDescriptor+4)
#05 pc 00000000000da461 /system/vendor/lib/egl/libGLESv2_adreno.so (_ZN10EsxContext16ValidateGfxStateEPK17EsxDrawDescriptor+2172)
#06 pc 00000000000d0757 /system/vendor/lib/egl/libGLESv2_adreno.so (_ZN10EsxContext21DrawElementsInstancedE11EsxPrimTypej10EsxPixTypePKvji+662)
#07 pc 00000000000f9d05 /system/vendor/lib/egl/libGLESv2_adreno.so (_ZN21EsxGlApiParamValidate14GlDrawElementsEP11EsxDispatchjijPKv+192)
#08 pc 000000000009e633 /system/vendor/lib/egl/libGLESv2_adreno.so (glDrawElements+42)
#09 pc 000000000044dbbc /data/app/com.company.mygame-lRkxA-2A-srCSJ9G_9sxxQ==/lib/arm/libMyGame.so (_ZN7cocos2d26CameraBackgroundDepthBrush14drawBackgroundEPNS_6CameraE+236)
#10 pc 000000000049f348 /data/app/com.company.mygame-lRkxA-2A-srCSJ9G_9sxxQ==/lib/arm/libMyGame.so (_ZN7cocos2d5Scene6renderEPNS_8RendererEPKNS_4Mat4ES5_j+460)
#11 pc 000000000049f170 /data/app/com.company.mygame-lRkxA-2A-srCSJ9G_9sxxQ==/lib/arm/libMyGame.so (_ZN7cocos2d5Scene6renderEPNS_8RendererERKNS_4Mat4EPS4_+28)
#12 pc 00000000005001c0 /data/app/com.company.mygame-lRkxA-2A-srCSJ9G_9sxxQ==/lib/arm/libMyGame.so (_ZN7cocos2d8Director9drawSceneEv+428)
#13 pc 0000000000503230 /data/app/com.company.mygame-lRkxA-2A-srCSJ9G_9sxxQ==/lib/arm/libMyGame.so (_ZN7cocos2d8Director8mainLoopEv+132)
#14 pc 000000000007d217 /data/app/com.company.mygame-lRkxA-2A-srCSJ9G_9sxxQ==/oat/arm/base.odex
Do you use Android NDK 16?
@CrazyHappyGame is that causing the issue?
vkreal2:
VertexArrayObject
It is better to use NDK16 (because all android libs were compiled with NDK16) but NDK16b should work as well.
Please add more info here.
It seems like the same problems exists for ios/mac and older versions
opened 12:40PM - 16 Mar 18 UTC
closed 06:18AM - 04 Sep 18 UTC
type:bug
module:renderer
- cocos2d-x version: 3.16
- devices test on: iPhone 6s
- developing environmen… ts
- NDK version: 14b
- Xcode version: 9.2
Steps to Reproduce:
1. Game uses BMFont or Spritesheets is needed
2. Enable Malloc Scribble and Malloc Guar Edges and Malloc Stack
in target's scheme

3. Run and play several times, it should happen.
Description: it is #1 crash in my game across all platforms (iOS and Android), before 3.16 never seen.
Happens occasionally.

I have it on cocos2d-x3.15 in Google Play. Unfortunately I can not reproduce it on my devices …
Anyone can help on this issue?
How are you checking the depth?
I was wondering if you are using the camera to check the depth of your scene, like for example if an object is near or far away from the camera, etc.
No, I am not checking for depth of scene.
@slackmoehrle please check call stack. Crash is inside cocos2d::Director::drawScene
umm, yeah, I totally see that. My question to OP was how does he think he got there? Is he doing anything we should know about? Is he using a camera in anyway to check objects for proximity to the camera, etc? OP also reports seeing this in the console: CameraBackgroundDepthBrush::drawBackground so I was trying to think about how this might happen.
We are not doing anything crazy and no customizations. Just the standard stuff that comes with cocos2d-x
Thanks. it looks like there are only a handful of times this is actually called. Let’s create a bug report for this.
I see the same crash in Google Play. Can not reproduce it…
My app is very simple: Few Sprites, Labels, Particles and Actions.
It looks like memory corruption - crash inside memcpy
There is one exactly for that particular issue:
opened 12:40PM - 16 Mar 18 UTC
closed 06:18AM - 04 Sep 18 UTC
type:bug
module:renderer
- cocos2d-x version: 3.16
- devices test on: iPhone 6s
- developing environmen… ts
- NDK version: 14b
- Xcode version: 9.2
Steps to Reproduce:
1. Game uses BMFont or Spritesheets is needed
2. Enable Malloc Scribble and Malloc Guar Edges and Malloc Stack
in target's scheme

3. Run and play several times, it should happen.
Description: it is #1 crash in my game across all platforms (iOS and Android), before 3.16 never seen.
Happens occasionally.

Thanks, I hadn’t yet checked.
1 Like
Looks like @minggo might have fix, please can anyone here verify?
Thanks!
vkreal2
September 1, 2018, 4:38pm
19
@slackmoehrle Do we know if this is a good fix?
I’ve updated my app to cocos 3.17.2 and it has fixed the crash.
1 Like