ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

App Crashes with "A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 30427 (CodecLooper)" error!

Open robindanielk opened this issue 8 years ago • 11 comments

Hi , I am using the latest exoplayer with ffmpeg support by adding the local dependencies as per the instructions.But after adding the library I am getting the above error and along with it i get a audioUnderRun error. asterissue And this is how i initialised my exoplayer, DefaultRenderersFactory defaultRenderersFactory = new DefaultRenderersFactory(this, DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER); DefaultAllocator defaultAllocator = new DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE); LoadControl defaultLoadControl = new DefaultLoadControl(defaultAllocator, 20000, 50000, 2500, 5000, C.LENGTH_UNSET, true); mExoPlayer = ExoPlayerFactory.newSimpleInstance(defaultRenderersFactory, trackSelector, defaultLoadControl);

Is there something wrong with my code or some bug int the native code...Kindly help me in resolving the issue!!

robindanielk avatar Jun 06 '18 10:06 robindanielk

Please provide a full bug report captured with adb bugreport shortly after encountering the issue. Your screenshot does not appear to show the problem mentioned in the title of this issue. Screenshots are also not particularly helpful (e.g. no way to do a text search on them).

ojw28 avatar Jun 06 '18 10:06 ojw28

Hi, I am not able to reproduce the issue..it keeps occurring very randomly...i ll send the bug report asap!!

robindanielk avatar Jun 07 '18 05:06 robindanielk

This is the bug report when "audioTrackUnderrun" occurs...occurs very random!!. ..but the not able to reproduce "A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 30427 (CodecLooper)" error!! NOTE: I running this in android box for TV. bugRPT2.txt

robindanielk avatar Jun 07 '18 06:06 robindanielk

this is the bug report on the codec error !! codecBug.txt

robindanielk avatar Jun 07 '18 10:06 robindanielk

i got the same issue is any one resolve this?

i get this error while doing something like change activity/show dialog without release the player while exoplayer stil buffering/render. even when im pause the video this error still appear in random time.

note : i'm not release the player because i wanted to play in full screen mode

jemjov41 avatar Jul 18 '18 10:07 jemjov41

I see the same problem only when playing Hi-Res 4K HEVC content.

08-13 10:25:01.023 6719-6988/com.example.company.testatv A/AMessage: frameworks/av/media/libstagefright/foundation/AMessage.cpp:196 CHECK(mNumItems < kMaxNumItems) failed.
08-13 10:25:01.024 6719-6988/com.example.company.testatv A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 6988 (CodecLooper)
08-13 10:25:01.124 7006-7006/? I/crash_dump32: obtaining output fd from tombstoned
08-13 10:25:01.124 7006-7006/? E/libc: failed to connect to tombstoned: No such file or directory
08-13 10:25:01.124 7006-7006/? I/crash_dump32: performing dump of process 6719 (target tid = 6988)
08-13 10:25:01.124 7006-7006/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 'HW/STB/STB5076:8.0.0/OTT1.181411.001/08070009:user/release-keys'
    Revision: '0'
    ABI: 'arm'
    pid: 6719, tid: 6988, name: CodecLooper  >>> com.example.company.testatv <<<
    signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-13 10:25:01.133 7006-7006/? A/DEBUG: Abort message: 'frameworks/av/media/libstagefright/foundation/AMessage.cpp:196 CHECK(mNumItems < kMaxNumItems) failed.'
        r0 00000000  r1 00001b4c  r2 00000006  r3 00000008
        r4 00001a3f  r5 00001b4c  r6 791ab308  r7 0000010c
        r8 7a226000  r9 7b592ac0  sl 7b5a4e90  fp 791ab780
        ip 00000000  sp 791ab2f8  lr a5eae3b7  pc a5edea8c  cpsr 200f0010
08-13 10:25:01.174 7006-7006/? A/DEBUG: backtrace:
        #00 pc 0004aa8c  /system/lib/libc.so (tgkill+12)
        #01 pc 0001a3b3  /system/lib/libc.so (abort+54)
        #02 pc 0000663f  /system/lib/liblog.so (__android_log_assert+154)
        #03 pc 00011b65  /system/lib/libstagefright_foundation.so (_ZN7android8AMessage12allocateItemEPKc+144)
        #04 pc 00011d5f  /system/lib/libstagefright_foundation.so (_ZN7android8AMessage8setInt64EPKcx+6)
        #05 pc 000d6823  /system/lib/libstagefright.so (_ZN7android10MediaCodec27CreateFramesRenderedMessageERKNSt3__14listINS_17RenderedFrameInfoENS1_9allocatorIS3_EEEERNS_2spINS_8AMessageEEE+110)
        #06 pc 000d7615  /system/lib/libstagefright.so (_ZN7android12_GLOBAL__N_113CodecCallback22onOutputFramesRenderedERKNSt3__14listINS_17RenderedFrameInfoENS2_9allocatorIS4_EEEE+48)
        #07 pc 00091041  /system/lib/libstagefright.so (_ZN7android6ACodec22notifyOfRenderedFramesEbPNS_17RenderedFrameInfoE+112)
        #08 pc 00098f9b  /system/lib/libstagefright.so (_ZN7android6ACodec9BaseState16onOMXMessageListERKNS_2spINS_8AMessageEEE+162)
        #09 pc 00098bb9  /system/lib/libstagefright.so (_ZN7android6ACodec9BaseState17onMessageReceivedERKNS_2spINS_8AMessageEEE+460)
        #10 pc 0000fd5f  /system/lib/libstagefright_foundation.so (_ZN7android25AHierarchicalStateMachine13handleMessageERKNS_2spINS_8AMessageEEE+74)
        #11 pc 0000fbc1  /system/lib/libstagefright_foundation.so (_ZN7android8AHandler14deliverMessageERKNS_2spINS_8AMessageEEE+24)
        #12 pc 0001202b  /system/lib/libstagefright_foundation.so (_ZN7android8AMessage7deliverEv+62)
        #13 pc 00010849  /system/lib/libstagefright_foundation.so (_ZN7android7ALooper4loopEv+480)
        #14 pc 0000d4fb  /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+274)
        #15 pc 00047daf  /system/lib/libc.so (_ZL15__pthread_startPv+22)
        #16 pc 0001af6f  /system/lib/libc.so (__start_thread+32)

jaykk09 avatar Aug 13 '18 06:08 jaykk09

@setanallas i guess you should release the player ....btw how did you prepare your media source..? because i actually resolved by setting prepare(mediaSource, true, true) , though it is the default method. I had set false previously for my usecase...

robindanielk avatar Aug 14 '18 02:08 robindanielk

@robindanielk thanks for your answer, i'm not release it because i wanted to play in full screen so the player not buffering from the start again.

but i think its device problem, im test it in zenfone GO before, but when im using emulator(AVD) or huawei cam-L21 thats crash not happen. so im just release the player in spesific device now

jemjov41 avatar Aug 14 '18 04:08 jemjov41

@robindanielk - Is this issue occurring only on the one device? Are you able to reproduce on something like a Pixel or recent Galaxy S device, for example? I'm not convinced that the underlying platform isn't just in a bad state (you'd need to report this to the device manufacturer if so). A few additional notes:

  • It doesn't look like the extensions are actually being used during the playbacks in the bug reports provided, so I don't think they're related.
  • It looks from the bug reports like you might be releasing and re-preparing the player upon receiving an audio track underrun. If so, why? It's not a fatal error condition. The only fatal error condition is when Player.EventListener.onPlayerError is called. I'm only going by the logging, so may have misunderstood where it's added (in which case ignore this comment).

ojw28 avatar Aug 14 '18 14:08 ojw28

@ojw28 ..hi ...this occured on all Himedia android STBs ...but eventually after i had prepared mediasource like prepare(mediaSource, true, true) i have not seen any crashes for around a month... can you explain what difference it makes ?

And the reason for releasing and preparing the player again is because this app needs to runs with schedule based on json received for every hour. More like a continuous playback throughout the year. if theres a better way to do it in this case..kindly suggest.!!

And the extensions weren't causing any crashes either..

robindanielk avatar Aug 18 '18 10:08 robindanielk

I'm not sure why that makes a difference. Are you sure it's not just a coincidence? In any case, I think we can close this, as it sounds like the problem is no longer occurring.

ojw28 avatar Aug 19 '18 18:08 ojw28