[Android] Native crash at /system/lib/libc.so [libGLES_mali.so]

Hi, my game works fine but I’ve got a crash with a Galaxy Note3 Neo (Android 4.4): the launching works one time out of thirty times.

It seems that there is a problem with the libGLES_mali.so and glDrawArrays. But I don’t understand what to do, also I search on the web, but I found nothing…

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/hlltexx/hllte:4.4.2/KOT49H/N7505POUCOB1:user/release-keys'
Revision: '10'
pid: 20372, tid: 20389, name: Thread-3965  >>> com.mycompany.mygame <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
    r0 7e3d0080  r1 00000000  r2 00000004  r3 00000000
    r4 00000000  r5 7e3d0080  r6 00000044  r7 78a4c110
    r8 00000044  r9 7a682988  sl 00000000  fp 00000080
    ip 79d44cac  sp 78a4c0b8  lr 792861bc  pc 4004e3ac  cpsr 20030010
    d0  0000000000000001  d1  000000007e3d0080
    d2  000000007e3d0081  d3  3f8000003f7afafb
    d4  3f7afafb3f7afafb  d5  3f8000003f7afafb
    d6  3f7afafb3f7afafb  d7  3f8000003f7afafb
    d8  ffffffffffffffff  d9  0000000000000000
    d10 0000000000000000  d11 0000000000000000
    d12 0000000000000000  d13 0000000000000000
    d14 0000000000000000  d15 0000000000000000
    d16 ff0000000000003f  d17 0000000000000001
    d18 00000000000000f8  d19 0000000000000000
    d20 0000000000000000  d21 0000000000000000
    d22 0000000000000000  d23 00000000000000f8
    d24 0000000000000050  d25 00000000000000a8
    d26 0000000000000000  d27 0000000000000000
    d28 0000000000000000  d29 0000000000000000
    d30 0000000000000000  d31 0000000000000000
    scr 20000010

backtrace:
    #00  pc 000223ac  /system/lib/libc.so (__memcpy_base+88)
    #01  pc 003da1b8  /system/vendor/lib/egl/libGLES_mali.so
    #02  pc 003da928  /system/vendor/lib/egl/libGLES_mali.so
    #03  pc 00397fc8  /system/vendor/lib/egl/libGLES_mali.so
    #04  pc 00398210  /system/vendor/lib/egl/libGLES_mali.so
    #05  pc 00395838  /system/vendor/lib/egl/libGLES_mali.so (glDrawArrays+48)
    #06  pc 0018df8b  /data/app-lib/com.mycompany.mygame-1/libcocos2dcpp.so (cocos2d::LayerColor::onDraw(cocos2d::Mat4 const&, unsigned int)+102)
    #07  pc 0018e599  /data/app-lib/com.mycompany.mygame-1/libcocos2dcpp.so (std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (cocos2d::LayerColor::*)(cocos2d::Mat4 const&, unsigned int)> (cocos2d::LayerColor*, cocos2d::Mat4, unsigned int)> >::_M_invoke(std::_Any_data const&)+28)
    #08  pc 001c67d3  /data/app-lib/com.mycompany.mygame-1/libcocos2dcpp.so (cocos2d::CustomCommand::execute()+14)
    #09  pc 001cc6ed  /data/app-lib/com.mycompany.mygame-1/libcocos2dcpp.so (cocos2d::Renderer::visitRenderQueue(cocos2d::RenderQueue const&)+468)
    #10  pc 001cccb5  /data/app-lib/com.mycompany.mygame-1/libcocos2dcpp.so (cocos2d::Renderer::render()+40)
    #11  pc 0019e2bf  /data/app-lib/com.mycompany.mygame-1/libcocos2dcpp.so (cocos2d::Scene::render(cocos2d::Renderer*)+190)
    #12  pc 001b6253  /data/app-lib/com.mycompany.mygame-1/libcocos2dcpp.so (cocos2d::Director::drawScene()+142)
    #13  pc 001b6301  /data/app-lib/com.mycompany.mygame-1/libcocos2dcpp.so (cocos2d::DisplayLinkDirector::mainLoop()+28)
    #14  pc 0016e2bb  /data/app-lib/com.mycompany.mygame-1/libcocos2dcpp.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeRender+10)
    #15  pc 0001eb0c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
    #16  pc 0004f08b  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
    #17  pc 00027f20  /system/lib/libdvm.so
    #18  pc 0002ef54  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
    #19  pc 0002c5b8  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
    #20  pc 00061489  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
    #21  pc 000614ad  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
    #22  pc 0005619b  /system/lib/libdvm.so
    #23  pc 0000d280  /system/lib/libc.so (__thread_entry+72)
    #24  pc 0000d418  /system/lib/libc.so (pthread_create+240)

Thank you for the advices!

This problem occurs with some android devices, it may have a link with the textures when the game goes in the background, but I don’t know how to solve this or where to start working…

Please someone?

try to connect fabric.io sdk and then you will be able to see where error occur in your c++ code

also face same issue :frowning: did you find out the solution please share

I also have the same issue.

Linked to Fabric, but doesn’t help…
Happens a few times for different users. Have no idea how to reproduce this or to cause the crash.