Skip to content

VLC crashes (SIGSEGV) on Raspberry Pi OS Bookworm (Pi 5) during playlist playback — Wayland / dmabuf related #117

@technomarshal

Description

@technomarshal

I've been running into a reoccurring issue when playing long run playlists on repeat/random play on Bookworm on a Pi5. The VLC player will crash intermittently after completing playback of a playlist entry. Sometimes it's fast, one or 2 videos play, then the app crashes, other times it will run for a good amount of time and then crash. I used ChatGPT to help with debugging and isolated the issue in the report is below and I believe I've found a good workaround for now.

VLC crashes (SIGSEGV) on Raspberry Pi OS Bookworm (Pi 5) during playlist playback — Wayland / dmabuf related
Summary

VLC consistently segfaults (SIGSEGV) on Raspberry Pi OS Bookworm running on Raspberry Pi 5 during playlist playback.
The crash occurs after several media items play successfully, typically during the transition between videos.

A core dump shows the crash occurring inside libwayland-client.so, specifically wl_list_remove(), with active involvement of Wayland dmabuf (libwl_dmabuf_plugin.so) and QtWayland.

Forcing VLC to use X11 (QT_QPA_PLATFORM=xcb) and disabling hardware decoding completely eliminates the crash, strongly suggesting a Wayland + dmabuf lifecycle bug triggered during video output teardown/reinitialization.

Environment

Hardware: Raspberry Pi 5

OS: Raspberry Pi OS Bookworm (64-bit)

Desktop session: Wayland

echo $XDG_SESSION_TYPE
wayland

VLC package: distro VLC (/usr/bin/vlc)

Architecture: aarch64 (ARM64)

Steps to Reproduce

Boot Raspberry Pi OS Bookworm on Raspberry Pi 5

Log into the default Wayland desktop session

Launch VLC normally (GUI)

Load and play an XSPF or M3U playlist containing multiple video files

Allow several videos to play sequentially

During a media transition, VLC abruptly exits

Observed Behavior

VLC terminates unexpectedly

Terminal output (when launched from CLI) shows:

[h264_v4l2m2m] Could not find a valid device
[h264_v4l2m2m] can't configure decoder
Segmentation fault (core dumped)

A core dump is generated

Expected Behavior

VLC should continue playlist playback without crashing, or at minimum fail gracefully without a segmentation fault.

Core Dump / Stack Trace (key excerpt)

From coredumpctl gdb:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 wl_list_remove ()
from /lib/aarch64-linux-gnu/libwayland-client.so.0

Current thread:
Thread 0x7ffe6143f0c0 (LWP 40814)

Stack trace of crashing thread:
#0 wl_list_remove (libwayland-client.so.0)
#1 wl_display_dispatch_queue_pending (libwayland-client.so.0)
#2 libwl_dmabuf_plugin.so
#3 start_thread (libc.so.6)

Other threads show active QtWayland, QtCore, VLC vout teardown, and libavcodec activity at the time of the crash.

This strongly suggests a Wayland object lifecycle / dmabuf teardown issue during video output reinitialization.

Confirmed Workarounds (Crash Eliminated)

  1. Force X11 backend (most reliable)
    QT_QPA_PLATFORM=xcb vlc --avcodec-hw=none playlist.xspf

  2. Disable hardware decoding
    vlc --avcodec-hw=none playlist.xspf

  3. Change video output module (Wayland)
    vlc --vout=opengl --avcodec-hw=none playlist.xspf

With these applied:

No segfaults observed

Playlist playback remains stable

Additional Notes

This issue appears specific to Wayland on Raspberry Pi OS Bookworm

The same workload does not crash under X11

The playlist itself is not malformed; it simply exercises repeated video output teardown/recreate

This behavior is reproducible and produces consistent core dumps

Impact

This affects:

Normal VLC playlist playback

Any application embedding or controlling VLC (libVLC / python-vlc)

Digital signage / scheduled playback use cases on Raspberry Pi 5

Because the failure is a hard SIGSEGV, it can crash entire applications that embed VLC.

Request

Please advise:

Whether this is a known issue with VLC on Wayland for Raspberry Pi OS

Whether dmabuf or QtWayland patches are planned

If additional logging or testing is needed, I’m happy to provide it

Thank you for your work maintaining VLC on Raspberry Pi OS.

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