androidc++android-ndkopenmax

OpenMAX AL crashes with Signal 6 (SIGABRT). Media Server dies


I have an issue where when an OpenMAX video finishes playing, the application crashes with a Signal 6.

Here is my EOS code in the buffer callback. The crash also occurs if I stop the media player here and clear the queue as well. According to some more verbose logs, I send an EOS signal, the EOS gets processed and then it crashes.

Here is my code to signal an EOS

// We reached the EOF or an I/O error occured
    // Create EOS signal
    XAAndroidBufferItem signal;
    memset(&signal, 0, sizeof(XAAndroidBufferItem));
    signal.itemKey = XA_ANDROID_ITEMKEY_EOS;

    // Enqueue the error
    if ((res = (*i_PlayerInputBufferInterface)->Enqueue(i_PlayerInputBufferInterface,
        (void *)&EOS_BUFFER_CONTEXT, nullptr, 0, &signal, sizeof(XAuint32) * 2))
        != XA_RESULT_SUCCESS)
        throw OpenMAXException("Could not enqueue EOS signal.", res);

    // Update video state
    i_IsEOF = true;

    return XA_RESULT_SUCCESS;

My Tombstone trace is here.

http://pastebin.com/CScimETt


Solution

  • You're getting an assertion failure in stagefright:

    A/ATSParser(21042): frameworks/av/media/libstagefright/mpeg2ts/ATSParser.cpp:1194 CHECK_EQ( sync_byte,0x47u) failed: 169 vs. 71
    A/libc(21042): Fatal signal 6 (SIGABRT) at 0x00005232 (code=-6), thread 21385 (NuPlayerDriver )
    

    It looks like it's unhappy with the data stream (which is weird -- should be an error, not a fatal assertion if that's the case).

    Your best bet is to figure out what it is about the stream that the libstagefright parser is choking on.

    The build fingerprint says that's an older device with an ICS build (samsung/GT-I9100/GT-I9100:4.0.3/IML74K). I don't see ICS frameworks/av sources on the source site, but the jellybean source file looks like it's probably the same... the check is on line 1033. It appears to be failing while trying to parse the transport stream.