libvlc iOS opengl assert crash
Hello,
Using latest vlc/master, I've encountered a crash with a specific sample when running libvlc 4 on an iOS device (arm64).
[[32;1m000000016d8adc70[0m] main generic debug: [0musing opengl es2 module "vgl"[0m
[[32;1m000000016d8adbd0[0m] main generic debug: [0mlooking for glinterop module matching "any": 1 candidates[0m
[[32;1m000000016d8adbd0[0m] main generic debug: [0musing glinterop module "glinterop_cvpx"[0m
[[32;1m000000016d8ada00[0m] main generic debug: [0mlooking for opengl filter module matching "renderer": 1 candidates[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0mInitialized libplacebo 4.0.0-dev-27516-gde03f1e026 (API v264)[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0mGL context seems to be OpenGL ES, reloading as GLES...[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0mDetected OpenGL version strings:[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m GL_VERSION: OpenGL ES 2.0 Metal - 99[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m GL_VENDOR: Apple Inc.[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m GL_RENDERER: Apple A13 GPU[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 1.00[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0mGPU does not seem to support lossless texture readback, restricting readback capabilities! This is a GLES/driver limitation, there is little we can do to work around it.[0m
[[32;1m0000000280aa1950[0m] vout_ios gl error: [31;1mpl_gpu_create_gl: OpenGL error: GL_INVALID_OPERATION[0m
[[32;1m0000000280aa1950[0m] vout_ios gl warning: [0;33mEncountered errors while detecting GPU capabilities... ignoring, but expect limitations/issues[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0mGPU information:[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m GLSL version: 100 es[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m subgroup_size: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m min_gather_offset: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_gather_offset: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m Limits:[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m thread_safe: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m callbacks: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_buf_size: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_ubo_size: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_ssbo_size: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_vbo_size: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_mapped_size: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_buffer_texels: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m align_host_ptr: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m host_cached: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_tex_1d_dim: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_tex_2d_dim: 4096[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_tex_3d_dim: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m blittable_1d_3d: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m buf_transfer: 1[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m align_tex_xfer_pitch: 1[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m align_tex_xfer_offset: 32[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_variable_comps: 256[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_constants: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m max_pushc_size: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m align_vertex_stride: 1[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m fragment_queues: 1[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0m compute_queues: 0[0m
[[32;1m0000000280aa1950[0m] vout_ios gl debug: [0mlibplacebo shader: (unknown shader)[0m
Assertion failed: (yuv_space == COLOR_SPACE_UNDEF || color_count == 3 || color_count == 4), function opengl_fragment_shader_init, file sampler.c, line 915.
Running the very same binary on an Apple Silicon macOS computer does not trigger this assert. Running an app built against the LibVLC for macOS SDK on arm64 also does not trigger the crash.
Do note that the GL_INVALID_OPERATION
in the log also occurs when the playback is fine with other samples (so likely another issue).
- Sample file: http://streams.videolan.org/samples/MPEG-4/video.mp4
- Devices: iPhone SE 2, iPhone 13 Mini
- OS: iOS 16.5, iOS 17.2.1