VLCKit crashes in iOS/tvOS simulator

This forum is about all development around libVLC.
ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

VLCKit crashes in iOS/tvOS simulator

Postby ssbmaccom » 05 Apr 2022 10:31

Hi,

with latest version of TVVLCKit or MobileVLCKit (version from PodSpec TVVLCKit-3.4.0-8da19f3b-426513d8) I experienced reproducible crashes when starting a second playback sequentially in Simulator on M1 Mac.

I use VLCKit to stream MPEG-TS from DVB receivers. Starting the first stream works (more or less, audio plays, video only shows initial frame - but I can live with this, playback in SImulator was always lagging). But then I stop the playback and start another one and then I see the App crashing in Simulator. Xcode 13.3

Code: Select all

EXC_BAD_ACCESS, Backtrace: Thread 30 Queue : com.apple.opengl.cvmDoWork (serial) #0 0x00000001841c48d8 in cvmsServerElementBuild () #1 0x00000001841c0b24 in cvms_element_build_from_source () #2 0x00000001841cb664 in cvm_deferred_build_modular(void*) () #3 0x0000000101114eac in asan_dispatch_call_block_and_release () #4 0x0000000100e9cd40 in _dispatch_client_callout () #5 0x0000000100ea3e90 in _dispatch_lane_serial_drain () #6 0x0000000100ea4b44 in _dispatch_lane_invoke () #7 0x0000000100eb0b90 in _dispatch_workloop_worker_thread () #8 0x00000001b24deb40 in _pthread_wqthread () Enqueued from com.apple.root.default-qos.overcommit (Thread 39) Queue : com.apple.root.default-qos.overcommit (serial) #0 0x0000000100ea0a4c in _dispatch_async_f_slow () #1 0x0000000101115018 in wrap_dispatch_async_f () #2 0x000000019cf61bdc in gleSetVPTransformFuncAll () #3 0x000000019cf5cd0c in gleLLVMVecPrimMultiRender () #4 0x000000019cefa574 in glDrawElements_ES2Exec () #5 0x00000001075f3ee0 in DrawWithShaders [inlined] at /Users/videolan/builds/puw5iUHi/1/videolan/VLCKit/libvlc/vlc/modules/video_output/opengl/vout_helper.c:1623 #6 0x00000001075f3d3c in vout_display_opengl_Display at /Users/videolan/builds/puw5iUHi/1/videolan/VLCKit/libvlc/vlc/modules/video_output/opengl/vout_helper.c:1731 #7 0x00000001b24dd910 in thread_start ()
Instruction is:

Code: Select all

0x1841c48d8 <+516>: ldr x9, [x8, #0x30]
and it tries to read from address 0x30. Looks like x8 is a pointer which is NULL.

On real devices all is fine.
It is just a bit nasty.

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: VLCKit crashes in iOS/tvOS simulator

Postby mfkl » 06 Apr 2022 07:27

Is this VLC code crashing though? Stacktrace doesn't indicate so.
https://mfkl.github.io

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: VLCKit crashes in iOS/tvOS simulator

Postby unidan » 28 Apr 2022 22:05

It's a crash of the OpenGL context when it's destroyed and re-created. Unfortunately there's nothing we can do here right now, the issue is coming from Apple OpenGL compatibility layer. :/ But it will be fixed on the long term.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests