Skip to content

[tvOS] VLCOpenGLES2VideoView.doResetBuffers: modifies layer off main thread #25

@jmhunter83

Description

@jmhunter83

Description

On tvOS, VLC's internal VLCOpenGLES2VideoView triggers UIKit threading violations when resetting buffers. This happens because doResetBuffers: modifies CALayer properties from a VLC background thread.

Error Message

Modifying properties of a view's layer off the main thread is not allowed: 
view <VLCOpenGLES2VideoView: 0x...> with nearest ancestor view controller <...>

Stack Trace

0   UIKitCore    ... 
...
7   TVVLCKit     -[VLCOpenGLES2VideoView doResetBuffers:] + 164
8   libsystem_pthread.dylib   thread_start + 8

Environment

  • tvOS 18
  • VLCUI 0.7.4
  • TVVLCKit (from VLCUI dependency)

Workaround

Wrapping onSecondsUpdated and onStateUpdated callbacks with Task { @MainActor in } addresses our callback code, but the internal doResetBuffers: issue requires a fix in TVVLCKit or VLCUI.

Related

This may need to be reported upstream to the TVVLCKit project if it's not solvable at the VLCUI layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions