Skip to content

Fatal Exception: Error during detachFromGLContext in LibVLC (Android) #556

@mvn-toannguyen2-dn

Description

@mvn-toannguyen2-dn

I am encountering a recurring fatal exception when using LibVLC on Android. The crash occurs specifically during the detachFromGLContext call.

Stack Trace

Fatal Exception: java.lang.RuntimeException
Error during detachFromGLContext (see logcat for details)
at android.graphics.SurfaceTexture.detachFromGLContext (SurfaceTexture.java:345)
at org.videolan.libvlc.AWindow$SurfaceTextureThread.detachFromGLContext (AWindow.java:665)
at org.videolan.libvlc.AWindow$SurfaceTextureThread.access$1600 (AWindow.java:573)
at org.videolan.libvlc.AWindow.SurfaceTexture_detachFromGLContext (AWindow.java:724)

Context
Library: LibVLC Android

Action: Happens when releasing the player or switching surfaces.

Observation: It seems like the OpenGL context is already destroyed or invalid when detachFromGLContext is invoked.

Steps to Reproduce

  1. Initialize LibVLC.
  2. Play a video stream.
  3. Back when video playing
  4. Trigger a surface destruction or call detachViews().
    My code dispose view
        _controller.removeOnInitListener(_controllerInitListener);
        _controller.removeListener(_controllerListener);
        await _controller.stopRendererScanning();
        await _controller.stop();
        await _controller.dispose();
      

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions