Skip to content

Crash on android TV boxes with Mali GPU

Description

Playback of videos work fine, but on some videos libvlc will crash when stopping the playback.

Expected behavior

The video playback should stop without a crash.

Actual behavior

The app is crashing with a SIGGEGV error. Here the stack trace:

libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x3c in tid 13708 (AWindowHandler), pid 13445 (com.ourapp)
crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
/system/bin/tombstoned: received crash request for pid 13708
crash_dump32: performing dump of process 13445 (target tid = 13708)
DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
DEBUG   : Build fingerprint: 'Xiaomi/oneday/oneday:9/PI/26DEBUG   : Revision: '0'
DEBUG   : ABI: 'arm'
DEBUG   : pid: 13445, tid: 13708, name: AWindowHandler  >>> com.ourapp <<<
DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x3c
DEBUG   : Cause: null pointer dereference
DEBUG   :     r0  00000000  r1  e188f338  r2  54b718e9  r3  00000000
DEBUG   :     r4  c67966b8  r5  00000002  r6  00000000  r7  d5e4f440
DEBUG   :     r8  c63d7e68  r9  cf37d6a0  r10 00000000  r11 00000000
DEBUG   :     ip  ef964638  sp  c32ff0e8  lr  e188f348  pc  e188f780
DEBUG   : 
DEBUG   : backtrace:
DEBUG   :     #00 pc 00011780  /vendor/lib/egl/libGLES_mali.so (__egl_platform_color_conversion_needed+4)
DEBUG   :     #01 pc 00011344  /vendor/lib/egl/libGLES_mali.so (__egl_platform_surface_post_processing_needed_android+12)
DEBUG   :     #02 pc 00067900  /vendor/lib/egl/libGLES_mali.so (__egl_mali_post_color_buffer+708)
DEBUG   :     #03 pc 000674d0  /vendor/lib/egl/libGLES_mali.so (__egl_mali_post_to_window_surface+1DEBUG   :     #440)
DEBUG   :     #05 pc 000647e4  /vendor/lib/egl/libGLES_mali.so (eglSwapBuffers+72)
DEBUG   :     #06 pc 0000d9c9  /system/lib/libEGL.so (eglSwapBuffersWithDamageKHR+372)
DEBUG   :     #07 pc 002c22d1  /data/app/com.ourapp-7Vxw_OQvCeKSzrWPq84YzA==/lib/arm/libvlc.so
DEBUG   :     #08 pc 002bf809  /data/app/com.ourapp-7Vxw_OQvCeKSzrWPq84YzA==/lib/arm/libvlc.so
DEBUG   :     #09 pc 0arm/libvlc.so
DEBUG   :     #10 pc 0arm/libvlc.so
DEBUG   :     #11 pc 0arm/libvlc.so
DEBUG   :     #12 pc 00063c15  /system/lib/libc.so (__pthread_start(void*)+22)
DEBUG   :     #13 pc 0001e065  /system/lib/libc.so (__start_thread+22)

Steps to reproduce

  1. Start a video on a Android TV box with a Mali GPU.
  2. Stop the video after a few seconds.
  3. The app will crash with the stacktrace found below.

Context

App version

Tested with many differend vlc-android versions. Here the gradle dependencies:

implementation 'com.yyl.vlc:vlc-android-sdk:3.1.7'
implementation 'org.videolan.android:libvlc-all:3.2.6'
implementation 'com.github.maximilize:vlc-android-sdk:75f1901' // 3.2.11

Android version

Seen on android 7.1, 8.1 and 9.

Device model

The Mi Box seems to be the most widespread TV box with Mali GPU. But many other models with Mali chipset are seen.

App mode

TV