Skip to content

Playing an rtsp video stream, occasionally crashing during the buffering process

Hi, When I play an rtsp video stream, sometimes it crashes during the video buffering process. The crash log is as follows:

Revision: '0'
ABI: 'arm'
pid: 6954, tid: 16384, name: VlcObject  >>> com.example.test_vlc <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '/buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed'
    r0 00000000  r1 00004000  r2 00000006  r3 00000008
    r4 00001b2a  r5 00004000  r6 c3eff194  r7 0000010c
    r8 00000000  r9 ebab51b8  sl ebab51b8  fp e0239a04
    ip c3eff1dc  sp c3eff180  lr eba34461  pc eba2e498  cpsr 20070030
    d0  0000000000000000  d1  0000000047d56b80
    d2  0000000000000000  d3  0000000000000000
    d4  0000000000000000  d5  0000000000000000
    d6  0000000000000000  d7  0000000000000000
    d8  0000000000000000  d9  0000000000000000
    d10 0000000000000000  d11 0000000000000000
    d12 0000000000000000  d13 0000000000000000
    d14 0000000000000000  d15 0000000000000000
    d16 000000003b0b5448  d17 000000000018f548
    d18 eba73bd1eba73931  d19 eba73bddeba73bd5
    d20 0000000000000000  d21 0000000000000000
    d22 0000000000000000  d23 0000000000000000
    d24 0000000000000000  d25 0000000000000000
    d26 0000000000000000  d27 0000000000000000
    d28 0000000000000000  d29 0000000000000000
    d30 0000000000000000  d31 0000000000000000
    scr 60000093

backtrace:
    #00 pc 0001a498  /system/lib/libc.so (abort+63)
    #01 pc 0001a68b  /system/lib/libc.so (__assert2+22)
    #02 pc 0006a79d  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
    #03 pc 0006a921  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
    #04 pc 00071ecd  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
    #05 pc 00071863  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
    #06 pc 0007182b  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so (__cxa_throw+74)
    #07 pc 00073d0d  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so (operator new(unsigned int)+56)
    #08 pc 011fcacd  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so (BufferedPacket::BufferedPacket()+28)
    #09 pc 0120f10d  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so (H264BufferedPacketFactory::createNewPacket(MultiFramedRTPSource*)+16)
    #10 pc 011fc6af  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so (MultiFramedRTPSource::networkReadHandler1()+62)
    #11 pc 01226e9b  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so (BasicTaskScheduler::SingleStep(unsigned int)+498)
    #12 pc 0122838d  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so (BasicTaskScheduler0::doEventLoop(char volatile*)+26)
    #13 pc 0035aa37  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
    #14 pc 004c55bf  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
    #15 pc 004c62a1  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
    #16 pc 0004708b  /system/lib/libc.so (__pthread_start(void*)+22)
    #17 pc 0001af51  /system/lib/libc.so (__start_thread+32)

stack:
         c3eff140  00020000
         c3eff144  944ced1f  /dev/ashmem/AshmemAllocator_hidl (deleted)
         c3eff148  00001b2a
         c3eff14c  00000002
         c3eff150  c3eff1dc
         c3eff154  b339f97b  /system/bin/app_process32 (sigprocmask+182)
         c3eff158  cc1e9000  [anon:libc_malloc]
         c3eff15c  0000007f
         c3eff160  ffffffdf
         c3eff164  944ced1f  /dev/ashmem/AshmemAllocator_hidl (deleted)
         c3eff168  00001b2a
         c3eff16c  00004000
         c3eff170  c3eff194
         c3eff174  c3eff1dc
         c3eff178  00000000
         c3eff17c  eba2e48d  /system/lib/libc.so (abort+52)
    #00  c3eff180  c3eff1dc
         c3eff184  cafd3c51  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so (std::exception::~exception())
         c3eff188  ebab51b8  [anon:.bss]
         c3eff18c  eba62bcf  /system/lib/libc.so (async_safe_fatal_no_abort+34)
         c3eff190  ebab0788  /system/lib/libc.so
         c3eff194  ffffffdf
         c3eff198  cafe524f  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
         c3eff19c  c3eff1e4
         c3eff1a0  ebab0788  /system/lib/libc.so
         c3eff1a4  c3eff1dc
         c3eff1a8  cafd3c51  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so (std::exception::~exception())
         c3eff1ac  eba2e68f  /system/lib/libc.so (__assert2+26)
    #01  c3eff1b0  cc55a170  [anon:libc_malloc]
         c3eff1b4  ebab51b8  [anon:.bss]
         c3eff1b8  c3eff1dc
         c3eff1bc  cafca7a1  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
    #02  c3eff1c0  c3eff1e4
         c3eff1c4  cc55a170  [anon:libc_malloc]
         c3eff1c8  c3eff1e4
         c3eff1cc  e0239a04  [anon:libc_malloc]
         c3eff1d0  c3eff1f8
         c3eff1d4  cafe52d7  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
         c3eff1d8  cafee8fc  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
         c3eff1dc  c3eff608
         c3eff1e0  cafca925  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
         c3eff1e4  cafe52d7  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
         c3eff1e8  c3eff1f8
         c3eff1ec  cafe5fbc  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
    #03  c3eff1f0  00000001
         c3eff1f4  0000000f
         c3eff1f8  3a647473  /dev/ashmem/dalvik-main space (region space) (deleted)
         c3eff1fc  6461623a  /dev/ashmem/dalvik-main space (region space) (deleted)
         c3eff200  6c6c615f  /dev/ashmem/dalvik-main space (region space) (deleted)
         c3eff204  0000636f
         c3eff208  00000000
         c3eff20c  eb890740  [anon:libc_malloc]
         c3eff210  c3eff210
         c3eff214  00000001
         c3eff218  cafd183d  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
         c3eff21c  00000001
         c3eff220  e2cd6268  [anon:libc_malloc]
         c3eff224  c5558220  [anon:libc_malloc]
         c3eff228  c3eff210
         c3eff22c  c3eff628
         ........  ........
    #04  c3eff610  e2cd6240  [anon:libc_malloc]
         c3eff614  cafee8fc  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
         c3eff618  c3eff628
         c3eff61c  cafd1867  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so (__cxa_get_exception_ptr)
    #05  c3eff620  e2cd6240  [anon:libc_malloc]
         c3eff624  cafee8fc  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so
         c3eff628  c3eff640
         c3eff62c  cafd182f  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so (__cxa_throw+78)
    #06  c3eff630  eb70bc60  [anon:libc_malloc]
         c3eff634  00010000
         c3eff638  eb70bc60  [anon:libc_malloc]
         c3eff63c  cc2c2c00  [anon:libc_malloc]
         c3eff640  c3eff650
         c3eff644  cafd3d11  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libc++_shared.so (operator new(unsigned int)+60)
    #07  c3eff648  c5964a00  [anon:libc_malloc]
         c3eff64c  cc2c2c00  [anon:libc_malloc]
         c3eff650  c3eff660
         c3eff654  c7a8aacf  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so (BufferedPacket::BufferedPacket()+30)
    #08  c3eff658  c5964a00  [anon:libc_malloc]
         c3eff65c  cc2c2c00  [anon:libc_malloc]
         c3eff660  c3eff670
         c3eff664  c7a9d10f  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so (H264BufferedPacketFactory::createNewPacket(MultiFramedRTPSource*)+18)
    #09  c3eff668  e0239a00  [anon:libc_malloc]
         c3eff66c  cc215280  [anon:libc_malloc]
         c3eff670  c3eff6e0
         c3eff674  c7a8a6b1  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so (MultiFramedRTPSource::networkReadHandler1()+64)
    #10  c3eff678  00015f90
         c3eff67c  00000001
         c3eff680  c3eff6a4
         c3eff684  c3eff6af
         c3eff688  000005a4
         c3eff68c  cc350ec0  [anon:libc_malloc]
         c3eff690  eea8274f  /system/lib/libharfbuzz_ng.so (_hb_ot_shape+3046)
         c3eff694  508d08ba  /dev/ashmem/dalvik-main space (region space) (deleted)
         c3eff698  00000000
         c3eff69c  5db8f8e2  /dev/ashmem/dalvik-main space (region space) (deleted)
         c3eff6a0  c3eff700
         c3eff6a4  c3eff788
         c3eff6a8  c3eff808
         c3eff6ac  00000044
         c3eff6b0  c3eff6bc
         c3eff6b4  00000000
         ........  ........
    #11  c3eff6e8  c3eff700
         c3eff6ec  cc28e468  [anon:libc_malloc]
         c3eff6f0  00015206
         c3eff6f4  c85d8990  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
         c3eff6f8  cf1b4b80  [anon:libc_malloc]
         c3eff6fc  cc350720  [anon:libc_malloc]
         c3eff700  00000000
         c3eff704  00000000
         c3eff708  00000000
         c3eff70c  00000000
         c3eff710  00000000
         c3eff714  00000000
         c3eff718  00000000
         c3eff71c  00000000
         c3eff720  00000000
         c3eff724  00000000
         ........  ........
    #12  c3eff8b0  cc43b850  [anon:libc_malloc]
         c3eff8b4  e2c97900  [anon:libc_malloc]
         c3eff8b8  e2c97900  [anon:libc_malloc]
         c3eff8bc  c6be8a39  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
    #13  c3eff8c0  00000000
         c3eff8c4  c6d4bded  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
         c3eff8c8  c3eff900
         c3eff8cc  c6d4c085  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
         c3eff8d0  00000000
         c3eff8d4  00000000
         c3eff8d8  944ced1f  /dev/ashmem/AshmemAllocator_hidl (deleted)
         c3eff8dc  00000001
         c3eff8e0  cc5cad48  [anon:libc_malloc]
         c3eff8e4  cc5cad24  [anon:libc_malloc]
         c3eff8e8  00000010
         c3eff8ec  cc5cad38  [anon:libc_malloc]
         c3eff8f0  cc5cad40  [anon:libc_malloc]
         c3eff8f4  c6d535c1  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
    #14  c3eff8f8  cc5cad40  [anon:libc_malloc]
         c3eff8fc  cc5cad20  [anon:libc_malloc]
         c3eff900  c3eff934
         c3eff904  c6d53673  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
         c3eff908  cc5cad28  [anon:libc_malloc]
         c3eff90c  eb77eb78  [anon:libc_malloc]
         c3eff910  c3eff970
         c3eff914  c3eff934
         c3eff918  ebab51b8  [anon:.bss]
         c3eff91c  ebaae3a0  /system/lib/libc.so
         c3eff920  00001b2a
         c3eff924  c6d54275  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
         c3eff928  00000000
         c3eff92c  c6d542a3  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
    #15  c3eff930  00000000
         c3eff934  00000000
         c3eff938  c6d542d1  /data/app/com.example.test_vlc-WgiLG6dD_Yw6vaEpdC2p5A==/lib/arm/libvlc.so
         c3eff93c  eb77eb78  [anon:libc_malloc]
         c3eff940  944ced1f  /dev/ashmem/AshmemAllocator_hidl (deleted)
         c3eff944  c3eff970
         c3eff948  c3eff970
         c3eff94c  c3eff970
         c3eff950  00000078
         c3eff954  eba5b08d  /system/lib/libc.so (__pthread_start(void*)+24)
    #16  c3eff958  eba5b075  /system/lib/libc.so (__pthread_start(void*))
         c3eff95c  eba2ef53  /system/lib/libc.so (__start_thread+34)
    #17  c3eff960  c3eff978
         c3eff964  eba5b075  /system/lib/libc.so (__pthread_start(void*))
         c3eff968  c3eff970
         c3eff96c  00000000
         c3eff970  c43bf970  [stack:16383]
         c3eff974  b8dd0970  [stack:16391]
         c3eff978  00004000
         c3eff97c  00001b2a
         c3eff980  00000000
         c3eff984  c3e03000  [anon:thread stack guard page]
         c3eff988  000fc970
         c3eff98c  00001000
         c3eff990  00000000
         c3eff994  00000000
         c3eff998  00000000
         c3eff99c  c3eff900

How to solve this?

Edited by Jean-Baptiste Kempf