How to determine what is causing Android / LibStageFright to fail on freeBuffer?

1.1k Views Asked by At

I am running into an issue in my Android app where Galaxy Note 4, Galaxy Edge, and some other devices crash when trying to play H.264 video streamed from a server. I'm fairly certain that the H.264 video is correct, as the same video works using the same decoder on other devices. In addition, the devices that are crashing support the decoder that I'm using.
It doesn't crash in my source code, but it does crash the app. Has anyone ever run into this issue? If so, could you give me some help on what I could do to figure out what is happening? Here's the message I'm getting from the Developer Console in Google Play:

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint:     'Verizon/trltevzw/trltevzw:5.0.1/LRX22C/N910VVRU1BOAF:user/release-keys'
Revision: '12'
ABI: 'arm'
pid: 32467, tid: 32524, name: CodecLooper  >>> com.xxxx.xxxx<<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'frameworks/av/media/libstagefright/ACodec.cpp:1304 CHECK_EQ(     mOMX->freeBuffer( mNode, portIndex, info->mBufferID),(status_t)OK) failed: -2147483648 vs. 0'
    r0 00000000  r1 00007f0c  r2 00000006  r3 00000000
    r4 a160fdb8  r5 00000006  r6 00000000  r7 0000010c
    r8 00000015  r9 00000000  sl a160fcf4  fp a160fdb0
    ip 00007f0c  sp a160f6d0  lr b6e9dff5  pc b6ec1998  cpsr 600f0010

backtrace:
    #00 pc 00037998  /system/lib/libc.so (tgkill+12)
    #01 pc 00013ff1  /system/lib/libc.so (pthread_kill+52)
    #02 pc 00014c0f  /system/lib/libc.so (raise+10)
    #03 pc 00011531  /system/lib/libc.so (__libc_android_abort+36)
    #04 pc 0000fcbc  /system/lib/libc.so (abort+4)
    #05 pc 00007709  /system/lib/libcutils.so (__android_log_assert+88)
    #06 pc 000672f9  /system/lib/libstagefright.so (android::ACodec::freeBuffer(unsigned int, unsigned int)+152)
    #07 pc 00067589  /system/lib/libstagefright.so (android::ACodec::freeOutputBuffersNotOwnedByComponent()+56)
    #08 pc 0006b86f  /system/lib/libstagefright.so (android::ACodec::ExecutingState::onOMXEvent(OMX_EVENTTYPE, unsigned int, unsigned int)+210)
    #09 pc 0006ba23  /system/lib/libstagefright.so (android::ACodec::BaseState::onOMXMessage(android::sp<android::AMessage> const&)+342)
    #10 pc 0006bc71  /system/lib/libstagefright.so (android::ACodec::BaseState::onMessageReceived(android::sp<android::AMessage> const&)+84)
    #11 pc 0006c0e1  /system/lib/libstagefright.so (android::ACodec::ExecutingState::onMessageReceived(android::sp<android::AMessage> const&)+652)
    #12 pc 00009819  /system/lib/libstagefright_foundation.so (android::AHierarchicalStateMachine::handleMessage(android::sp<android::AMessage> const&)+44)
    #13 pc 00061a6f  /system/lib/libstagefright.so
    #14 pc 0000a5a3  /system/lib/libstagefright_foundation.so (android::ALooperRoster::deliverMessage(android::sp<android::AMessage> const&)+166)
    #15 pc 00009f25  /system/lib/libstagefright_foundation.so (android::ALooper::loop()+220)
    #16 pc 0000ef11  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
    #17 pc 0000ea81  /system/lib/libutils.so
    #18 pc 000137bb  /system/lib/libc.so (__pthread_start(void*)+30)
    #19 pc 0001189b  /system/lib/libc.so (__start_thread+6)
0

There are 0 best solutions below