0

Can someone help me figure out what is the following crash about? Thanks.

I/DEBUG   ( 3007): Build fingerprint: 'samsung/zerofltetmo/zerofltetmo:5.1.1/LMY47X/G920TUVU2COF8:user/release-keys'
I/DEBUG   ( 3007): Revision: '11'
I/DEBUG   ( 3007): ABI: 'arm'
I/DEBUG   ( 3007): pid: 19656, tid: 21303, name: MediaCodec_loop  >>> com.******.**** <<<
I/DEBUG   ( 3007): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14
I/DEBUG   ( 3007):     r0 f4a23e40  r1 00000003  r2 ca10ab30  r3 00000000
I/DEBUG   ( 3007):     r4 ca10ab30  r5 ca10ab60  r6 f4b14ea0  r7 000003f5
I/DEBUG   ( 3007):     r8 f7207df4  r9 f5fea030  sl ca10ac74  fp ca10ac80
I/DEBUG   ( 3007):     ip f723fe3c  sp ca10ab28  lr f722d3a9  pc f722d3b4  cpsr 200b0030
I/DEBUG   ( 3007):
I/DEBUG   ( 3007): backtrace:
I/DEBUG   ( 3007):     #00 pc 0001d3b4  /system/lib/libbinder.so
I/DEBUG   ( 3007):     #01 pc 000ac0c9  /system/lib/libstagefright.so (android::MediaCodec::BatteryNotifier::noteStartVideo()+28)
I/DEBUG   ( 3007):     #02 pc 000ac5f7  /system/lib/libstagefright.so (android::MediaCodec::updateBatteryStat()+126)
I/DEBUG   ( 3007):     #03 pc 000ae657  /system/lib/libstagefright.so (android::MediaCodec::setState(android::MediaCodec::State)+194)
I/DEBUG   ( 3007):     #04 pc 000af3a7  /system/lib/libstagefright.so (android::MediaCodec::onMessageReceived(android::sp<android::AMessage> const&)+1410)
I/DEBUG   ( 3007):     #05 pc 0000c6a3  /system/lib/libstagefright_foundation.so (android::ALooperRoster::deliverMessage(android::sp<android::AMessage> const&)+166)
I/DEBUG   ( 3007):     #06 pc 0000c025  /system/lib/libstagefright_foundation.so (android::ALooper::loop()+220)
I/DEBUG   ( 3007):     #07 pc 00010665  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
I/DEBUG   ( 3007):     #08 pc 00066535  /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+72)
I/DEBUG   ( 3007):     #09 pc 000101d5  /system/lib/libutils.so
I/DEBUG   ( 3007):     #10 pc 000174e7  /system/lib/libc.so (__pthread_start(void*)+30)
I/DEBUG   ( 3007):     #11 pc 00015503  /system/lib/libc.so (__start_thread+6)
I/DEBUG   ( 3007):
I/DEBUG   ( 3007): Tombstone written to: /data/tombstones/tombstone_01
E/        ( 3007): ro.product_ship = true
E/        ( 3007): ro.debug_level = 0x4f4c
E/audit   ( 5283): type=1701 msg=audit(1443022086.863:298): auid=4294967295 uid=10259 gid=10259 ses=4294967295 subj=u:r:untrusted_app:s0 pid=21303 comm="MediaCodec_loop" reason="memory violation" sig=11
Saeid Farivar
  • 1,667
  • 24
  • 43
  • Looks like a null pointer dereference in a MediaCodec worker thread. I would guess it's a platform bug or NDK-related heap corruption. Is this reproducible? – fadden Sep 25 '15 at 15:57
  • yes it happens a lot for me at least. not all the time though... The problem is that for the same video it might or it might not happen. I don't have a solid way of reproducing it. could this be a side-effect of initializing the decoder from non-main thread? please let me know if I can provide more info... – Saeid Farivar Sep 25 '15 at 17:34
  • @fadden I was wondering if you would know more about his crash? – Saeid Farivar Sep 28 '15 at 01:58
  • problem solved! the problem was setting up the configuration for mediacodec in a different thread than actually configuring the mediacodec. – Saeid Farivar Sep 29 '15 at 22:14
  • @SaeidFarivar Can you please elaborate your problem where you went wrong. I'm suspecting both of our problems look similar. Please refer my [link](http://stackoverflow.com/questions/32884208/android-mediacodec-api-not-working-in-child-thread) – vgokul129 Oct 06 '15 at 15:25
  • @vgokul129 , My problem was that I was creating MediaFormat and MediaCodec in two different threads. it's working for me as long as they are created and configured in the same thread (MainThread) – Saeid Farivar Oct 07 '15 at 16:30

0 Answers0