Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS/H264 stream crashes in libstagefright on Galaxy Nexus #2607

Closed
alexbirkett opened this issue Mar 26, 2017 · 8 comments
Closed

HLS/H264 stream crashes in libstagefright on Galaxy Nexus #2607

alexbirkett opened this issue Mar 26, 2017 · 8 comments

Comments

@alexbirkett
Copy link
Contributor

Issue description

HLS stream crashes on Samsung Galaxy Nexus running Android 4.2.2 with following backtrace

03-26 10:02:20.066 126-126/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-26 10:02:20.066 126-126/? I/DEBUG: Build fingerprint: 'google/takju/maguro:4.2.2/JDQ39/573038:user/release-keys'
03-26 10:02:20.066 126-126/? I/DEBUG: Revision: '9'
03-26 10:02:20.066 126-126/? I/DEBUG: pid: 31825, tid: 31969, name: CodecLooper  >>> no.nrk.tv <<<
03-26 10:02:20.066 126-126/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
03-26 10:02:20.449 126-126/? I/DEBUG:     r0 00000027  r1 deadbaad  r2 40179258  r3 00000000
03-26 10:02:20.449 126-126/? I/DEBUG:     r4 00000000  r5 6246888c  r6 000a8c00  r7 5aeb0823
03-26 10:02:20.449 126-126/? I/DEBUG:     r8 5ce6c110  r9 5af2f8cc  sl 00000000  fp 00000000
03-26 10:02:20.449 126-126/? I/DEBUG:     ip 401a7e78  sp 62468888  lr 4014c0d9  pc 40148772  cpsr 60000030
03-26 10:02:20.449 126-126/? I/DEBUG:     d0  203d3e20657a6969  d1  61662029657a696c
03-26 10:02:20.449 126-126/? I/DEBUG:     d2  6567617473626965  d3  412f746867697264
03-26 10:02:20.449 126-126/? I/DEBUG:     d4  70632e6365646f43  d5  4320303530313a70
03-26 10:02:20.449 126-126/? I/DEBUG:     d6  666564284b434548  d7  7265666675426e2e
03-26 10:02:20.449 126-126/? I/DEBUG:     d8  4053400000000000  d9  405360000000004d
03-26 10:02:20.449 126-126/? I/DEBUG:     d10 0000000047f26d00  d11 0000000000000000
03-26 10:02:20.449 126-126/? I/DEBUG:     d12 0000000000000000  d13 0000000000000000
03-26 10:02:20.449 126-126/? I/DEBUG:     d14 0000000000000000  d15 0000000000000000
03-26 10:02:20.449 126-126/? I/DEBUG:     d16 7fffffffffffffff  d17 7fffffffffffffff
03-26 10:02:20.449 126-126/? I/DEBUG:     d18 0000000000000000  d19 0000000000000000
03-26 10:02:20.449 126-126/? I/DEBUG:     d20 4044000000000000  d21 3ff0000000000000
03-26 10:02:20.449 126-126/? I/DEBUG:     d22 4036000000000000  d23 3ff0000000000000
03-26 10:02:20.449 126-126/? I/DEBUG:     d24 3ff0000000000000  d25 0000000000000000
03-26 10:02:20.449 126-126/? I/DEBUG:     d26 4036000000000000  d27 3fdb7aff0778f531
03-26 10:02:20.449 126-126/? I/DEBUG:     d28 3fe33bbccf6b1b91  d29 bfc207ac00000000
03-26 10:02:20.449 126-126/? I/DEBUG:     d30 4006df8500000000  d31 3fe2b80340000000
03-26 10:02:20.449 126-126/? I/DEBUG:     scr 60000093
03-26 10:02:20.457 126-126/? I/DEBUG: backtrace:
03-26 10:02:20.457 126-126/? I/DEBUG:     #00  pc 0001a772  /system/lib/libc.so
03-26 10:02:20.457 126-126/? I/DEBUG:     #01  pc 00018070  /system/lib/libc.so (abort+4)
03-26 10:02:20.457 126-126/? I/DEBUG:     #02  pc 00003df9  /system/lib/libcutils.so (__android_log_assert+88)
03-26 10:02:20.457 126-126/? I/DEBUG:     #03  pc 00046fb3  /system/lib/libstagefright.so (android::ACodec::setMinBufferSize(unsigned long, unsigned int)+118)
03-26 10:02:20.457 126-126/? I/DEBUG:     #04  pc 00048d93  /system/lib/libstagefright.so (android::ACodec::configureCodec(char const*, android::sp<android::AMessage> const&)+938)
03-26 10:02:20.457 126-126/? I/DEBUG:     #05  pc 0004a665  /system/lib/libstagefright.so (android::ACodec::LoadedState::onConfigureComponent(android::sp<android::AMessage> const&)+72)
03-26 10:02:20.457 126-126/? I/DEBUG:     #06  pc 0004b3ef  /system/lib/libstagefright.so (android::ACodec::LoadedState::onMessageReceived(android::sp<android::AMessage> const&)+46)
03-26 10:02:20.457 126-126/? I/DEBUG:     #07  pc 000066a5  /system/lib/libstagefright_foundation.so (android::AHierarchicalStateMachine::onMessageReceived(android::sp<android::AMessage> const&)+80)
03-26 10:02:20.457 126-126/? I/DEBUG:     #08  pc 00007439  /system/lib/libstagefright_foundation.so (android::ALooperRoster::deliverMessage(android::sp<android::AMessage> const&)+188)
03-26 10:02:20.457 126-126/? I/DEBUG:     #09  pc 00006ced  /system/lib/libstagefright_foundation.so (android::ALooper::loop()+204)
03-26 10:02:20.457 126-126/? I/DEBUG:     #10  pc 00011253  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+94)
03-26 10:02:20.457 126-126/? I/DEBUG:     #11  pc 00010dcd  /system/lib/libutils.so
03-26 10:02:20.457 126-126/? I/DEBUG:     #12  pc 0000e3d8  /system/lib/libc.so (__thread_entry+72)
03-26 10:02:20.457 126-126/? I/DEBUG:     #13  pc 0000dac4  /system/lib/libc.so (pthread_create+160)
03-26 10:02:20.457 126-126/? I/DEBUG: stack:
03-26 10:02:20.457 126-126/? I/DEBUG:          62468848  00000000  
03-26 10:02:20.457 126-126/? I/DEBUG:          6246884c  00000000  
03-26 10:02:20.457 126-126/? I/DEBUG:          62468850  00000000  
03-26 10:02:20.457 126-126/? I/DEBUG:          62468854  aa1196f1  
03-26 10:02:20.457 126-126/? I/DEBUG:          62468858  00004000  
03-26 10:02:20.457 126-126/? I/DEBUG:          6246885c  62468915  
03-26 10:02:20.457 126-126/? I/DEBUG:          62468860  40176254  /system/lib/libc.so
03-26 10:02:20.457 126-126/? I/DEBUG:          62468864  401761b4  /system/lib/libc.so
03-26 10:02:20.457 126-126/? I/DEBUG:          62468868  00000000  
03-26 10:02:20.457 126-126/? I/DEBUG:          6246886c  4014c0d9  /system/lib/libc.so (_fwalk+32)
03-26 10:02:20.457 126-126/? I/DEBUG:          62468870  00000001  
03-26 10:02:20.457 126-126/? I/DEBUG:          62468874  6246888c  
03-26 10:02:20.457 126-126/? I/DEBUG:          62468878  000a8c00  
03-26 10:02:20.457 126-126/? I/DEBUG:          6246887c  5aeb0823  /system/lib/libstagefright.so (android::MuxOMX::setParameter(void*, OMX_INDEXTYPE, void const*, unsigned int))
03-26 10:02:20.457 126-126/? I/DEBUG:          62468880  df0027ad  
03-26 10:02:20.457 126-126/? I/DEBUG:          62468884  00000000  
03-26 10:02:20.465 126-126/? I/DEBUG:     #00  62468888  00000000  
03-26 10:02:20.465 126-126/? I/DEBUG:          6246888c  fffffbdf  
03-26 10:02:20.465 126-126/? I/DEBUG:          62468890  6246888c  
03-26 10:02:20.465 126-126/? I/DEBUG:          62468894  00000001  
03-26 10:02:20.465 126-126/? I/DEBUG:          62468898  5aefcb33  /system/lib/libstagefright.so
03-26 10:02:20.465 126-126/? I/DEBUG:          6246889c  00000007  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688a0  624688bc  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688a4  5aefcb33  /system/lib/libstagefright.so
03-26 10:02:20.465 126-126/? I/DEBUG:          624688a8  5aeb0843  /system/lib/libstagefright.so (android::MuxOMX::getParameter(void*, OMX_INDEXTYPE, void*, unsigned int))
03-26 10:02:20.465 126-126/? I/DEBUG:          624688ac  40146074  /system/lib/libc.so (__pthread_clone)
03-26 10:02:20.465 126-126/? I/DEBUG:     #01  624688b0  4019da5d  /system/lib/libcutils.so
03-26 10:02:20.465 126-126/? I/DEBUG:          624688b4  4019ddfd  /system/lib/libcutils.so (__android_log_assert+92)
03-26 10:02:20.465 126-126/? I/DEBUG:     #02  624688b8  62468ccc  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688bc  6d617266  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688c0  726f7765  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688c4  612f736b  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688c8  656d2f76  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688cc  2f616964  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688d0  7362696c  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688d4  65676174  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688d8  67697266  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688dc  412f7468  /dev/ashmem/dalvik-heap (deleted)
03-26 10:02:20.465 126-126/? I/DEBUG:          624688e0  65646f43  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688e4  70632e63  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688e8  30313a70  
03-26 10:02:20.465 126-126/? I/DEBUG:          624688ec  43203035  /dev/ashmem/dalvik-heap (deleted)
03-26 10:02:20.465 126-126/? I/DEBUG:          624688f0  4b434548  /dev/ashmem/dalvik-heap (deleted)
03-26 10:02:20.465 126-126/? I/DEBUG:          624688f4  66656428  
03-26 10:02:20.465 126-126/? I/DEBUG:          ........  ........
03-26 10:02:20.472 126-126/? I/DEBUG: memory near r2:
03-26 10:02:20.472 126-126/? I/DEBUG:     40179238 00000007 00000002 00000000 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     40179248 00000000 00000000 00000000 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     40179258 00000001 00000000 00000000 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     40179268 00000000 00000000 00000000 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     40179278 00000000 00000000 00000000 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     40179288 00000000 00000000 00000000 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     40179298 00000000 00000000 00616edf 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     401792a8 00000000 00000000 00000000 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     401792b8 00000000 00000000 00000000 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     401792c8 00000000 00000000 00000000 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     401792d8 00000000 00000000 00000000 00000000  
03-26 10:02:20.472 126-126/? I/DEBUG:     401792e8 00000000 00000000 00000000 00000000  
03-26 10:02:20.480 126-126/? I/DEBUG:     401792f8 00000000 00000000 00000000 00004000  
03-26 10:02:20.480 126-126/? I/DEBUG:     40179308 00000000 00000000 00000000 00004000  
03-26 10:02:20.480 126-126/? I/DEBUG:     40179318 00000000 00000000 00000000 00004000  
03-26 10:02:20.480 126-126/? I/DEBUG:     40179328 00000000 00000000 00000000 00004000  
03-26 10:02:20.480 126-126/? I/DEBUG: memory near r5:
03-26 10:02:20.480 126-126/? I/DEBUG:     6246886c 4014c0d9 00000001 6246888c 000a8c00  
03-26 10:02:20.480 126-126/? I/DEBUG:     6246887c 5aeb0823 df0027ad 00000000 00000000  
03-26 10:02:20.480 126-126/? I/DEBUG:     6246888c fffffbdf 6246888c 00000001 5aefcb33  
03-26 10:02:20.480 126-126/? I/DEBUG:     6246889c 00000007 624688bc 5aefcb33 5aeb0843  
03-26 10:02:20.480 126-126/? I/DEBUG:     624688ac 40146074 4019da5d 4019ddfd 62468ccc  
03-26 10:02:20.480 126-126/? I/DEBUG:     624688bc 6d617266 726f7765 612f736b 656d2f76  
03-26 10:02:20.480 126-126/? I/DEBUG:     624688cc 2f616964 7362696c 65676174 67697266  
03-26 10:02:20.480 126-126/? I/DEBUG:     624688dc 412f7468 65646f43 70632e63 30313a70  
03-26 10:02:20.480 126-126/? I/DEBUG:     624688ec 43203035 4b434548 66656428 75426e2e  
03-26 10:02:20.480 126-126/? I/DEBUG:     624688fc 72656666 657a6953 203d3e20 657a6973  
03-26 10:02:20.480 126-126/? I/DEBUG:     6246890c 61662029 64656c69 4d4f002e 756d2058  
03-26 10:02:20.480 126-126/? I/DEBUG:     6246891c 00002e78 00000000 00000000 00000000  
03-26 10:02:20.480 126-126/? I/DEBUG:     6246892c 00000000 00000000 00000000 00000000  
03-26 10:02:20.480 126-126/? I/DEBUG:     6246893c 00000000 00000000 00000000 00000000  
03-26 10:02:20.480 126-126/? I/DEBUG:     6246894c 00000000 00000000 00000000 00000000  
03-26 10:02:20.480 126-126/? I/DEBUG:     6246895c 00000000 00000000 00000000 00000000  
03-26 10:02:20.480 126-126/? I/DEBUG: memory near r6:
03-26 10:02:20.480 126-126/? I/DEBUG:     000a8be0 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.480 126-126/? I/DEBUG:     000a8bf0 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.480 126-126/? I/DEBUG:     000a8c00 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.480 126-126/? I/DEBUG:     000a8c10 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.480 126-126/? I/DEBUG:     000a8c20 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.480 126-126/? I/DEBUG:     000a8c30 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.480 126-126/? I/DEBUG:     000a8c40 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.488 126-126/? I/DEBUG:     000a8c50 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.488 126-126/? I/DEBUG:     000a8c60 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.488 126-126/? I/DEBUG:     000a8c70 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.488 126-126/? I/DEBUG:     000a8c80 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.488 126-126/? I/DEBUG:     000a8c90 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.488 126-126/? I/DEBUG:     000a8ca0 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.488 126-126/? I/DEBUG:     000a8cb0 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.488 126-126/? I/DEBUG:     000a8cc0 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.488 126-126/? I/DEBUG:     000a8cd0 ffffffff ffffffff ffffffff ffffffff  
03-26 10:02:20.488 126-126/? I/DEBUG: memory near r7:
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb0800 b5f7bdfe 461e4617 f7ff460c 9a08ff25  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb0810 68004621 92006803 6add463a 47a84633  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb0820 b5f7bdfe 461e4617 f7ff460c 9a08ff15  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb0830 68004621 92006803 6a9d463a 47a84633  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb0840 b5f7bdfe 461e4617 f7ff460c 9a08ff05  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb0850 68004621 92006803 6a5d463a 47a84633  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb0860 b5f8bdfe 460c461e f7ff4617 4621fef5  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb0870 6800463a 6a1d6803 47a84633 b538bdf8  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb0880 4615460c fee8f7ff 6800462a 690b6801  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb0890 47984621 b510bd38 f7ff4604 b110feb3  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb08a0 000cf104 f104bd10 bd100008 1d07b5f7  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb08b0 4604460d f7d74638 4629ef70 f7ff4620  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb08c0 6800ffea 69cb6801 47984629 b9384606  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb08d0 4669a802 5d08f840 0010f104 eb58f7d8  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb08e0 f7d74638 4630ef60 6801bdfe 3c0cf851  
03-26 10:02:20.488 126-126/? I/DEBUG:     5aeb08f0 f00018c0 0000b801 b5104b11 f103447b  
03-26 10:02:20.488 126-126/? I/DEBUG: memory near r8:
03-26 10:02:20.488 126-126/? I/DEBUG:     5ce6c0f0 00000010 00000000 00000000 00000000  
03-26 10:02:20.488 126-126/? I/DEBUG:     5ce6c100 00000000 00000000 00000000 0000002b  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c110 65646976 76612f6f 00000063 00000077  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c120 5ce68d78 5ce68d78 00000000 00000000  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c130 00000028 0000001b 5ce6c150 0000000d  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c140 00000020 40e45a98 40e45a98 0000002b  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c150 6974616e 772d6576 6f646e69 00000077  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c160 00000000 00000000 00000000 00000000  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c170 00000000 000000ab 5d7c1428 00007ce0  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c180 401dc628 00000000 00000000 00000007  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c190 00000004 401dc670 00000000 00000000  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c1a0 00000007 00000004 00000000 5ce6c220  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c1b0 00000030 00000100 00000030 00000000  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c1c0 00000000 00000000 00000000 00010001  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c1d0 00000000 00000000 00000000 5ce6c328  
03-26 10:02:20.496 126-126/? I/DEBUG:     5ce6c1e0 00000008 00000100 00000008 00000000  
03-26 10:02:20.496 126-126/? I/DEBUG: memory near r9:
03-26 10:02:20.496 126-126/? I/DEBUG:     5af2f8ac 5af286e8 5af2872c 5aef7ea4 5aef7ccc  
03-26 10:02:20.496 126-126/? I/DEBUG:     5af2f8bc 5aef377c 5af30260 5af28718 5af28484  
03-26 10:02:20.496 126-126/? I/DEBUG:     5af2f8cc 00000000 00000000 00000000 4014f761  
03-26 10:02:20.496 126-126/? I/DEBUG:     5af2f8dc 4014f651 40a5f5e9 400768f7 40147690  
03-26 10:02:20.496 126-126/? I/DEBUG:     5af2f8ec 40146600 400e1fb9 400e49f9 400e1f07  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f8fc 40a2d795 400e26c3 400e27bf 400e26b5  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f90c 400e4e47 400e4d1d 400e1ea9 401d0595  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f91c 40a1e451 4019dda1 40152f71 400768e9  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f92c 40a606cd 40a606d5 40a611c9 40a606a5  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f93c 400e4f4f 40076855 400768ab 40153121  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f94c 40a61215 4019dced 40140771 401469a4  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f95c 40a60831 40a608a5 400e20e5 400e4d91  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f96c 400e51a5 40a5f541 4019ef1c 40146ca9  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f97c 4047097d 4019eefc 40470915 40470933  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f98c 404707ff 40a61095 40a60821 40a608e5  
03-26 10:02:20.504 126-126/? I/DEBUG:     5af2f99c 40a60845 40a5f705 40a611f9 40a614a1  
03-26 10:02:20.504 126-126/? I/DEBUG: memory near ip:
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7e58 40145558 401469a4 40166bb3 40147560  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7e68 4014f29d 40140771 4014ca7d 401468ac  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7e78 4014606c 40146600 4014b635 4013af1d  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7e88 4013af09 40153041 40153061 401531c7  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7e98 4014b6f5 40155dd1 40156bc1 40166c9c  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7ea8 4013aef5 40153021 401530f9 40144d88  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7eb8 40144ec4 40146ca9 40144e44 40149d53  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7ec8 40152629 4014fd77 4013af31 40147690  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7ed8 4014670c 40166bd4 4013b524 4013bfe8  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7ee8 40144d6c 401459f4 40145b58 40145a30  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7ef8 40145a70 401534b1 40145a50 40145374  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7f08 4015cee5 40153309 40145b80 4014b5b5  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7f18 40152ddd 4015333d 4014b2ad 4014af35  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7f28 4014be19 40144cd8 4015b18d 4015b171  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7f38 4015b12d 4015b0bd 4013c8a8 4013c5fc  
03-26 10:02:20.504 126-126/? I/DEBUG:     401a7f48 4013c7fc 40144a4c 4013c9c0 40153559  
03-26 10:02:20.504 126-126/? I/DEBUG: memory near sp:
03-26 10:02:20.504 126-126/? I/DEBUG:     62468868 00000000 4014c0d9 00000001 6246888c  
03-26 10:02:20.504 126-126/? I/DEBUG:     62468878 000a8c00 5aeb0823 df0027ad 00000000  
03-26 10:02:20.504 126-126/? I/DEBUG:     62468888 00000000 fffffbdf 6246888c 00000001  
03-26 10:02:20.504 126-126/? I/DEBUG:     62468898 5aefcb33 00000007 624688bc 5aefcb33  
03-26 10:02:20.511 126-126/? I/DEBUG:     624688a8 5aeb0843 40146074 4019da5d 4019ddfd  
03-26 10:02:20.511 126-126/? I/DEBUG:     624688b8 62468ccc 6d617266 726f7765 612f736b  
03-26 10:02:20.511 126-126/? I/DEBUG:     624688c8 656d2f76 2f616964 7362696c 65676174  
03-26 10:02:20.511 126-126/? I/DEBUG:     624688d8 67697266 412f7468 65646f43 70632e63  
03-26 10:02:20.511 126-126/? I/DEBUG:     624688e8 30313a70 43203035 4b434548 66656428  
03-26 10:02:20.511 126-126/? I/DEBUG:     624688f8 75426e2e 72656666 657a6953 203d3e20  
03-26 10:02:20.511 126-126/? I/DEBUG:     62468908 657a6973 61662029 64656c69 4d4f002e  
03-26 10:02:20.511 126-126/? I/DEBUG:     62468918 756d2058 00002e78 00000000 00000000  
03-26 10:02:20.511 126-126/? I/DEBUG:     62468928 00000000 00000000 00000000 00000000  
03-26 10:02:20.511 126-126/? I/DEBUG:     62468938 00000000 00000000 00000000 00000000  
03-26 10:02:20.511 126-126/? I/DEBUG:     62468948 00000000 00000000 00000000 00000000  
03-26 10:02:20.511 126-126/? I/DEBUG:     62468958 00000000 00000000 00000000 00000000  
03-26 10:02:20.511 126-126/? I/DEBUG: code around pc:
03-26 10:02:20.511 126-126/? I/DEBUG:     40148750 e000b164 6823461c d1fb2b00 68e3e026  
03-26 10:02:20.511 126-126/? I/DEBUG:     40148760 4a17b123 447a2401 47986014 20274911  
03-26 10:02:20.511 126-126/? I/DEBUG:     40148770 70082400 eb86f7fc f7fd2106 a902ecea  
03-26 10:02:20.511 126-126/? I/DEBUG:     40148780 f04f2006 460a5380 94029304 f7fd9403  
03-26 10:02:20.511 126-126/? I/DEBUG:     40148790 4629e8d0 20024622 e8d8f7fd eb72f7fc  
03-26 10:02:20.511 126-126/? I/DEBUG:     401487a0 f7fd2106 2001ecd6 e892f7fc 2a006962  
03-26 10:02:20.511 126-126/? I/DEBUG:     401487b0 e7d4d1dc deadbaad 0002d826 00030b0a  
03-26 10:02:20.511 126-126/? I/DEBUG:     401487c0 00030aee 2400b510 aa04b088 46699002  
03-26 10:02:20.511 126-126/? I/DEBUG:     401487d0 94014620 94039400 e830f7fd bfb842a0  
03-26 10:02:20.511 126-126/? I/DEBUG:     401487e0 db054620 b1139b07 1c489906 98069006  
03-26 10:02:20.511 126-126/? I/DEBUG:     401487f0 bd10b008 4604b510 e9c6f7fc d10542a0  
03-26 10:02:20.511 126-126/? I/DEBUG:     40148800 447b4b04 6018681b bd102000 30fff04f  
03-26 10:02:20.511 126-126/? I/DEBUG:     40148810 bf00bd10 0002d75a 460db538 481eb928  
03-26 10:02:20.511 126-126/? I/DEBUG:     40148820 f7fc4478 2800edc4 b9fdd130 2102481b  
03-26 10:02:20.511 126-126/? I/DEBUG:     40148830 f0014478 2800faae db274604 f7fc4629  
03-26 10:02:20.511 126-126/? I/DEBUG:     40148840 2800ec4e 2101db0b f7fc4620 2800ec48  
03-26 10:02:20.511 126-126/? I/DEBUG: code around lr:
03-26 10:02:20.511 126-126/? I/DEBUG:     4014c0b8 41f0e92d 4c0b2600 447c4680 68a56824  
03-26 10:02:20.511 126-126/? I/DEBUG:     4014c0c8 e0076867 300cf9b5 dd022b00 47c04628  
03-26 10:02:20.511 126-126/? I/DEBUG:     4014c0d8 35544306 d5f53f01 2c006824 4630d1ef  
03-26 10:02:20.511 126-126/? I/DEBUG:     4014c0e8 81f0e8bd 00029ec2 43f0e92d fb01461f  
03-26 10:02:20.511 126-126/? I/DEBUG:     4014c0f8 f8dff602 b0878058 44f8460c 8000f8d8  
03-26 10:02:20.511 126-126/? I/DEBUG:     4014c108 9001a901 f8d84615 20013000 96059602  
03-26 10:02:20.511 126-126/? I/DEBUG:     4014c118 90049103 4638b113 fa35f7ff a9034638  
03-26 10:02:20.511 126-126/? I/DEBUG:     4014c128 fe9bf7ff 2000f8d8 b1124681 f7ff4638  
03-26 10:02:20.511 126-126/? I/DEBUG:     4014c138 f1b9fa37 d0050f00 46219d05 f01a1b70  
03-26 10:02:20.519 126-126/? I/DEBUG:     4014c148 4605ed46 b0074628 83f0e8bd 00029e3a  
03-26 10:02:20.519 126-126/? I/DEBUG:     4014c158 1e4b6841 2b006043 f000da01 6803bbab  
03-26 10:02:20.519 126-126/? I/DEBUG:     4014c168 2b01f813 46106003 00004770 4604b570  
03-26 10:02:20.519 126-126/? I/DEBUG:     4014c178 447e4e0d 68336836 f7ffb10b 6861fa04  
03-26 10:02:20.519 126-126/? I/DEBUG:     4014c188 60601e48 bfa22800 f8106820 60205b01  
03-26 10:02:20.519 126-126/? I/DEBUG:     4014c198 4620da03 fb8ef000 68324605 4620b112  
03-26 10:02:20.519 126-126/? I/DEBUG:     4014c1a8 f9fef7ff bd704628 00029dc2 447b4b07  
03-26 10:02:20.519 126-126/? I/DEBUG: memory map around fault addr deadbaad:
03-26 10:02:20.519 126-126/? I/DEBUG:     be9fc000-bea1d000 [stack]
03-26 10:02:20.519 126-126/? I/DEBUG:     (no map for address)
03-26 10:02:20.519 126-126/? I/DEBUG:     ffff0000-ffff1000 [vectors]
03-26 10:02:21.340 391-414/? I/BootReceiver: Copying /data/tombstones/tombstone_08 to DropBox (SYSTEM_TOMBSTONE)
03-26 10:02:21.379 131-27726/? E/OMXNodeInstance: !!! Observer died. Quickly, do something, ... anything...
03-26 10:02:21.379 32072-32072/? I/CastMediaRouteProvider: in onDiscoveryRequestChanged: request=null
03-26 10:02:21.379 391-1654/? I/WindowState: WIN DEATH: Window{418ded78 u0 no.nrk.tv/no.nrk.tv.view.TvActivity}
03-26 10:02:21.394 391-624/? I/ActivityManager: Process no.nrk.tv (pid 31825) has died.
03-26 10:02:21.402 391-402/? I/WindowState: WIN DEATH: Window{4191e2e8 u0 no.nrk.tv/no.nrk.tv.player.NrkPlayerActivity}

Reproduction steps

  • Build demo app with the HLS Media https://github.com/alexbirkett/ExoPlayer/tree/hls_bug_galaxy_nexus
  • Open demo app on Galaxy Nexus running Android 4.2.2
  • Scroll to the bottom of list of media
  • Tap "NRK"
  • Tap "Dagsrevyen"

Expected results

  • Content plays

Actual results

  • Native crash in libstagefright

Link to test content

See https://github.com/alexbirkett/ExoPlayer/tree/hls_bug_galaxy_nexus

Version of ExoPlayer being used

2.3.0

Device(s) and version(s) of Android being used

Galaxy Nexus 4.2.2

@alexbirkett
Copy link
Contributor Author

bugreport.txt

@alexbirkett
Copy link
Contributor Author

The content will play if MediaFormat.KEY_MAX_INPUT_SIZE is set to 0:
alexbirkett@2da6b80

@alexbirkett alexbirkett changed the title HLS stream crashes in libstagefright on Galaxy Nexus HLS/H264 stream crashes in libstagefright on Galaxy Nexus Mar 26, 2017
@nokite
Copy link

nokite commented May 4, 2017

It's a bit of a pain setting KEY_MAX_INPUT_SIZE to 0, because those classes make extensive use of private/protected/final modifiers etc... So a few classes need to be copied/extended. The solution works for me (I had an issue with Galaxy Nexus and HLS/Dash).
I found a couple of threads where low-end or old devices had trouble with ExoPlayer, and they point to KEY_MAX_INPUT_SIZE=0 as a fix.

Is this not a recognized issue that needs to be fixed in the main repository? I'm surprised that it doesn't get much attention, apparently.

@ojw28
Copy link
Contributor

ojw28 commented May 4, 2017

We should fix the issue for Galaxy Nexus specifically, as reported here. I'm not aware of other devices that see this kind of native crash. If you're aware of specific devices, please let us know.

@nokite
Copy link

nokite commented May 5, 2017

Apart from Galaxy Nexus I haven't seen another device personally (however, I have tested only 5 devices so far, and I don't want to let my users test it and wait for crash reports...).

Found on the internet:
"certain Samsung devices running Jellybean (4.1.2)"
"MediaCodec bug on Android 4.1"
Possibly "Samsung Galaxy S4"
"Samsung Tab 2"
"media codec for an .mp4 file on jelly-bean"

You can also see it set to 0 in this project https://github.com/begeekmyfriend/yasea (with someone suggesting that it's probably in order to "fix MediaCodec bug on Android 4.1").

I tried to pin down the reason, but wasn't able to. A possible clue is that all of the mentioned devices have PowerVR GPU's (SGX540, SGX544MP3).

References:
begeekmyfriend/yasea#167
http://stackoverflow.com/questions/21284874/illegal-state-exception-when-calling-mediacodec-configure
http://stackoverflow.com/questions/15105843/mediacodec-jelly-bean#_=_

@ojw28 ojw28 added the bug label May 5, 2017
ojw28 added a commit that referenced this issue May 5, 2017
If the codec isn't adaptive, there's no need to accommodate
the width/height/input-size of streams that don't have the
same resolution as the current stream. This is because we'll
always need to instantiate a new codec anyway.

Issue: #2607

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155194458
@ojw28
Copy link
Contributor

ojw28 commented May 5, 2017

I think the issue is less that we're setting KEY_MAX_INPUT_SIZE at all, and more that we're just setting the value to be unnecessarily high. Codecs on these API levels are not adaptive (i.e. cannot handle seamless resolution switching). Hence ExoPlayer releases the codec and instantiates a new instance when a resolution switch occurs, which is why resolution switching isn't completely seamless on older devices.

However in V2 it appears we're setting KEY_MAX_INPUT_SIZE on the basis that the decoder might be adaptive. Importantly, this means we'll use the max input size for the highest resolution stream when configuring the codec for one of the lower resolutions. The codec may choose to instantiate more input buffers at lower resolutions than at higher ones, and hence when configuring for a lower resolution the issue may cause more memory to be allocated than would actually be needed to configure at the higher resolution.

I've pushed a change that tweaks our logic to correctly take into account whether the decoder is adaptive. Please give it a try on the dev-v2 branch. It fixed the issue for me on Galaxy Nexus.

@nokite
Copy link

nokite commented May 8, 2017

Thanks for the explanation and the change! I think it makes perfect sense. (I cannot comment on the code changes due to my limited knowledge here)

It works on my Galaxy Nexus (and a few other devices that didn't have the issue in the first place). I find the playback indistinguishable from the "KEY_MAX_INPUT_SIZE==0" fix on the Nexus. I imagine that your fix may have advantages on other devices or different test videos, since it is cleaner.

Once difference that I noticed is on the emulator. On some occasions I see improved performance in an emulator with API 17. Both fixes make the playback on one of my test videos pretty choppy (dropping almost half of the frames). But with your fix it plays smoothly sometimes. I'm still trying to figure out when and why. Of course, this is not a real issue if it's limited to the emulator.

@ojw28
Copy link
Contributor

ojw28 commented May 8, 2017

Great. We'll try and do a bugfix release sometime in the next couple of weeks (picking up this change and a couple of others).

@ojw28 ojw28 closed this as completed May 8, 2017
ojw28 added a commit that referenced this issue May 11, 2017
If the codec isn't adaptive, there's no need to accommodate
the width/height/input-size of streams that don't have the
same resolution as the current stream. This is because we'll
always need to instantiate a new codec anyway.

Issue: #2607

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155194458
@google google locked and limited conversation to collaborators Sep 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants