cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.18k stars 7.05k forks source link

crash on android #18105

Open yingnierxiao opened 7 years ago

yingnierxiao commented 7 years ago

Steps to Reproduce:

  1. google play console carsh log.i think carsh when decode sound or music
    backtrace:
    native: pc 000000000003c068  /system/lib/libc.so (tgkill+12)
    native: pc 000000000001669d  /system/lib/libc.so (pthread_kill+52)
    native: pc 00000000000172af  /system/lib/libc.so (raise+10)
    native: pc 0000000000013bed  /system/lib/libc.so (__libc_android_abort+36)
    native: pc 00000000000123c4  /system/lib/libc.so (abort+4)
    native: pc 0000000000007c21  /system/lib/libcutils.so (__android_log_assert+88)
    native: pc 0000000000001c8d  /system/lib/lib_k3_omxcore.so
    native: pc 0000000000001ce5  /system/lib/lib_k3_omxcore.so (K3_OMX_ComponentNameEnum+56)
    native: pc 0000000000000dc5  /system/lib/libstagefrighthw.so (android::K3OMXPlugIn::enumerateComponents(char*, unsigned int, unsigned int)+44)
    native: pc 00000000000120f1  /system/lib/libstagefright_omx.so (android::OMXMaster::addPlugin(android::OMXPluginBase*)+84)
    native: pc 0000000000012247  /system/lib/libstagefright_omx.so (android::OMXMaster::OMXMaster()+102)
    native: pc 00000000000112a5  /system/lib/libstagefright_omx.so (android::OMX::OMX()+72)
    native: pc 000000000009673f  /system/lib/libstagefright.so (android::MuxOMX::allocateNode(char const*, android::sp<android::IOMXObserver> const&, unsigned int*)+54)
    native: pc 000000000009ecfb  /system/lib/libstagefright.so (android::OMXCodec::Create(android::sp<android::IOMX> const&, android::sp<android::MetaData> const&, bool, android::sp<android::MediaSource> const&, char const*, unsigned int, android::sp<ANativeWindow> const&)+530)
    native: pc 000000000000ce33  /system/lib/libwilhelm.so
    native: pc 000000000000ee6b  /system/lib/libwilhelm.so
    native: pc 000000000000b40b  /system/lib/libstagefright_foundation.so (android::ALooperRoster::deliverMessage(android::sp<android::AMessage> const&)+166)
    native: pc 000000000000ad8d  /system/lib/libstagefright_foundation.so (android::ALooper::loop()+220)
    native: pc 0000000000010519  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
    native: pc 0000000000010089  /system/lib/libutils.so
    native: pc 0000000000015e8b  /system/lib/libc.so (__pthread_start(void*)+30)
    native: pc 0000000000013f4b  /system/lib/libc.so (__start_thread+6)

2.other crash Samsung Galaxy S6 (zeroflte), 3072MB RAM, Android 7.0

backtrace:
  native: pc 0000000000043030  /system/lib/libc.so (tgkill+12)
  native: pc 0000000000041ed9  /system/lib/libc.so (pthread_kill+32)
  native: pc 000000000001bb4f  /system/lib/libc.so (raise+10)
  native: pc 0000000000018d01  /system/lib/libc.so (__libc_android_abort+34)
  native: pc 00000000000168c0  /system/lib/libc.so (abort+4)
  native: pc 000000000000907f  /system/lib/libcutils.so (__android_log_assert+86)
  native: pc 000000000001d5ad  /system/lib/libhwui.so
  native: pc 000000000001abe7  /system/lib/libhwui.so
  native: pc 000000000001c729  /system/lib/libhwui.so
  native: pc 000000000001f1d3  /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+62)
  native: pc 00000000000100d1  /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
  native: pc 00000000000606d7  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+70)
  native: pc 00000000000417db  /system/lib/libc.so (_ZL15__pthread_startPv+30)
  native: pc 0000000000019385  /system/lib/libc.so (__start_thread+6)

3.other crash huawei G8 (HWRIO), 2048MB RAM, Android 5.1

backtrace:
  native: pc 000000000000958e  /system/lib/libhwaps.so (GameTypeIdentify::statisticsDataForGameTypeIdentify(Features&)+35)
  native: pc 00000000000096cd  /system/lib/libhwaps.so (GameTypeIdentify::algorithmInterface(Features&)+28)
  native: pc 00000000000081db  /system/lib/libhwaps.so (SceneIdentify::identifyAlgorithm(Features&)+30)
  native: pc 0000000000008249  /system/lib/libhwaps.so (ApsPlayScenceIdentify::PlayScenceIdentify()+96)
  native: pc 0000000000008609  /system/lib/libhwaps.so (ApsManager::managerOperate()+40)
  native: pc 0000000000007d43  /system/lib/libhwaps.so (apsOperate()+22)
  native: pc 00000000000122f3  /system/lib/libEGL.so (eglSwapBuffers+322)
  native: pc 000000000005f4bf  /system/lib/libandroid_runtime.so
  native: pc 00000000008d3317  /data/dalvik-cache/arm/system@<EMAIL_ADDRESS>
dumganhar commented 7 years ago

google play console carsh log.i think carsh when decode sound or music

What kinds of audio format are you using?

yingnierxiao commented 7 years ago

ogg

dumganhar commented 7 years ago

@yingnierxiao , in the latest version, we decode mp3, ogg, wav by ourself, it gets better performance and less system bugs. You could try to replace cocos/audio folder which in v3 branch to upgrade audio module only and submit the app to google play to see whether this issue is fixed. Thanks.

deguilardi commented 6 years ago

@yingnierxiao do you use admob or google maps?