Rare android crash on SharedBuffer

Hi there,
I’m getting some rare crashes on android, can anyone tell me what can this be related??

I have 3 similar traces that appears to crash on SharedBuffer, the first two are from android 4.4 devices, the last is from android 6.0 devices.


backtrace:
  #00  pc 000000000000d31a  /system/lib/libutils.so (android::SharedBuffer::release(unsigned int) const+33)
  #01  pc 000000000000d75f  /system/lib/libutils.so (android::String8::~String8()+18)
  #02  pc 0000000000019bc7  /system/lib/libbinder.so (android::BpBinder::~BpBinder()+94)
  #03  pc 0000000000019bfd  /system/lib/libbinder.so (android::BpBinder::~BpBinder()+4)
  #04  pc 000000000000d16f  /system/lib/libutils.so (android::RefBase::weakref_type::decWeak(void const*)+66)
  #05  pc 0000000000074967  /system/lib/libandroid_runtime.so
  #06  pc 000000000002074c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
  #07  pc 00000000000513f7  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
  #08  pc 0000000000029be0  /system/lib/libdvm.so
  #09  pc 0000000000031090  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
  #10  pc 000000000002e728  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
  #11  pc 0000000000063859  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
  #12  pc 000000000006387d  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
  #13  pc 000000000005855b  /system/lib/libdvm.so
  #14  pc 000000000000d308  /system/lib/libc.so (__thread_entry+72)
  #15  pc 000000000000d4a0  /system/lib/libc.so (pthread_create+240)
>

backtrace:
  #00  pc 00000000000035b0  /system/lib/libcutils.so (android_atomic_dec+20)
  #01  pc 000000000000d267  /system/lib/libutils.so (android::SharedBuffer::release(unsigned int) const+12)
  #02  pc 000000000000d667  /system/lib/libutils.so (android::String8::~String8()+18)
  #03  pc 0000000000019b4b  /system/lib/libbinder.so (android::BpBinder::~BpBinder()+94)
  #04  pc 0000000000019b81  /system/lib/libbinder.so (android::BpBinder::~BpBinder()+4)
  #05  pc 000000000000d0ab  /system/lib/libutils.so (android::RefBase::weakref_type::decWeak(void const*)+66)
  #06  pc 0000000000076513  /system/lib/libandroid_runtime.so
  #07  pc 000000000002034c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
  #08  pc 0000000000050257  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+358)
  #09  pc 00000000000297e0  /system/lib/libdvm.so
  #10  pc 00000000000305c0  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
  #11  pc 000000000002dc58  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
  #12  pc 0000000000061571  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
  #13  pc 0000000000061595  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
  #14  pc 0000000000056af3  /system/lib/libdvm.so
  #15  pc 000000000000d2d8  /system/lib/libc.so (__thread_entry+72)
  #16  pc 000000000000d470  /system/lib/libc.so (pthread_create+240)

backtrace:
  #00  pc 000000000000e92c  /system/lib/libutils.so (_ZNK7android12SharedBuffer7releaseEj+1)
  #01  pc 000000000000eda5  /system/lib/libutils.so (_ZN7android7String8D1Ev+18)
  #02  pc 000000000001a7fd  /system/lib/libbinder.so
  #03  pc 000000000001a85d  /system/lib/libbinder.so (_ZN7android8BpBinderD0Ev+4)
  #04  pc 000000000008d4d7  /system/lib/libandroid_runtime.so
  #05  pc 000000007345437f  /data/dalvik-cache/arm/system@framework@boot.oat

Any info about what are these errors will be welcomed :slight_smile:

Thanks!!

Sorry, I forgot to say I’m using cocos2d-x 3.16

I was get above problem before.
In my case, I write many print() for get detail logs…
I tried many print() in for statement.
When I remove print() , above issue was disappear.
But it is only in my case.
Thanks

Thanks man!

However I’m not using print so error must be elsewhere :frowning: