Skip to content

UI API called from background thread

Hello,

I still had VLCKit 3.3.5 integrated into my app, so today I decided to update to version 3.3.15; compiling went smooth, as was replacing the framework inside my project, except now I'm getting a "purple" warning, from the main thread checker, when I run the app and stop playback to immediately resume it with a different video stream:

UI API called from background thread

After enabling the main thread checker breakpoint, the app logs this:

=================================================================
Main Thread Checker: UI API called on a background thread: -[NSView layer]
PID: 45778, TID: 1116455, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   VLCKit                              0x0000000101e7857c -[VLCVideoLayerView vlcClose] + 28

When reverting to VLCKit 3.3.5, the main thread warning disappears; after re-adding version 3.3.15, it immediately returns: I launch the app and playback starts without any warning; as soon as I stop and resume (I do so when changing RTSP stream), the main thread checker kicks in immediately.

I never called mediaplayer.stop() and mediaplayer.play() from the main thread; was I wrong the whole time? Is there some king of regression for #176 (closed)?

Thank you!

Edited by Cesare Forelli
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information