Skip to content

Impossible layer-shell surface caused segfault #2944

@CicadaSeventeen

Description

@CicadaSeventeen

Describe the bug
On the Wayland compositor, applications can request a layer shell surface. However, when the user switches to another TTY, wayfire registers a new placeholder virtual output and closes the real output. Since the placeholder virtual output has a size of 0, it's impossible to register certain fixed-size layer shell surfaces on it. This causes wayfire to crash due to a segmentation fault.
In my example, the program causing this crash is xfce4-panel, which has recently added Wayland support but is still not reliable enough. Although xfce4-panel itself exhibits bad behavior and should be considered buggy, wayfire should not crash due to an application's bug, but should instead handle the situation differently, for example, by killing the process that requests an impossible layer shell surface.

To Reproduce
Steps to reproduce the behavior:

  1. Run wayfire and Run xfce4-panel
  2. Switch to tty with like ctrl+alt+F3
  3. wayfire segfault and crasg

Expected behavior
Wayfire should kill problematic process and continue to run on NOOP-1

Screenshots or stacktrace
Logs here:

II 2026-01-05 11:48:48.854 - [libseat] [libseat/backend/logind.c:382] Disabling seat
II 2026-01-05 11:48:48.854 - [backend/drm/backend.c:112] DRM FD paused
II 2026-01-05 11:48:48.854 - [src/core/output-layout.cpp:1323] remove output: eDP-1
II 2026-01-05 11:48:48.854 - [src/core/output-layout.cpp:1204] new output: NOOP-1
II 2026-01-05 11:48:48.854 - [src/core/output-layout.cpp:702] Couldn't find matching mode 1280x720@0 for output NOOP-1. Trying to use custom mode(might not work)
EE 2026-01-05 11:48:48.862 - [src/core/output-layout.cpp:601] disabling output: eDP-1
II 2026-01-05 11:48:48.862 - [src/core/output-layout.cpp:232] transfer views from eDP-1 -> NOOP-1
EE 2026-01-05 11:48:48.864 - [backend/drm/drm.c:1349] connector eDP-1: Failed to disable CRTC 88
qt.qpa.wayland: There are no outputs - creating placeholder screen
EE 2026-01-05 11:48:48.884 - [src/view/layer-shell/layer-shell.cpp:631] layer-surface has calculated width and height < 0
EE 2026-01-05 11:48:48.885 - [src/main.cpp:144] Fatal error: Segmentation fault

Wayfire version
0.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds informationIssues where the reporter needs to add more information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions