https://bugs.kde.org/show_bug.cgi?id=521929
Bug ID: 521929
Summary: kwin_wayland crashes with std::optional<FormatInfo>
assertion in isCandidate() when compositing
overlapping XWayland windows (KiCad)
Classification: Plasma
Product: kwin
Version First 6.7.0
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: scene-opengl
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 193493
--> https://bugs.kde.org/attachment.cgi?id=193493&action=edit
This is a full backtrace from the KDE Crash Handler (DrKonqi)
DESCRIPTION
kwin_wayland aborts with a C++ assertion failure
(std::optional<KWin::FormatInfo>::operator->() called on an empty optional)
while evaluating overlay/direct-scanout candidates during compositing. The
crash occurs reliably when opening KiCad's Schematic Editor and PCB Editor
(XWayland clients) with multiple overlapping windows/panels open.
The session is killed and restarted by KCrash/Plasma; all open windows are
lost.
STEPS TO REPRODUCE
1. Start a Plasma Wayland session with the OpenGL/DRM compositor (default).
2. Launch KiCad and open a project.
3. Open the Schematic Editor and the PCB Editor so that multiple overlapping
windows are active simultaneously (an XWayland client in each case).
OBSERVED RESULT
kwin_wayland crashes (SIGABRT) and the Plasma session restarts. Backtrace shows
the abort originates in KWin::isCandidate() (src/scene/workspacescene.cpp:267),
called recursively from KWin::findOverlayCandidates() →
KWin::WorkspaceScene::layerCandidates() → KWin::Compositor::composite(), while
dereferencing an unset std::optional<KWin::FormatInfo>.
EXPECTED RESULT
KWin should not crash when evaluating overlay candidacy for a surface whose
FormatInfo couldn't be resolved — it should simply exclude that surface from
scanout/overlay candidacy and continue compositing normally.
SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.7.0
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
ADDITIONAL INFORMATION
kwin: 6.7.0-3
plasma-desktop: 6.7.0-1
mesa: 1:26.1.3-2
xorg-xwayland: 24.1.12-1
linux-lts: 6.18.36-1
kicad: 10.0.4-1
Crash appears specific to XWayland-backed clients with overlapping windows; not
yet confirmed with native Wayland clients in the same overlapping
configuration.
Relevant backtrace excerpt:
Thread 1 (Thread 0x7fc44571b140 (LWP 52923)):
[KCrash Handler]
#6 __GI_abort () at abort.c:77
#7 std::__glibcxx_assert_fail (..., function="constexpr const _Tp*
std::optional<_Tp>::operator->() const [with _Tp = KWin::FormatInfo]",
condition="this->_M_is_engaged()") at assert_fail.cc:41
#8 std::optional<KWin::FormatInfo>::operator->() const at
/usr/include/c++/16.1.1/optional:1228
#10 KWin::isCandidate (item=..., deviceRect=..., isOpaque=true, view=...) at
src/scene/workspacescene.cpp:267
#11 KWin::findOverlayCandidates (...) at src/scene/workspacescene.cpp:327
#12-15 KWin::findOverlayCandidates (...) [recursive] at
src/scene/workspacescene.cpp:310
#16 KWin::WorkspaceScene::layerCandidates (this=...) at
src/scene/workspacescene.cpp:455
#17 KWin::Compositor::composite (this=...) at src/compositor.cpp:754
Full backtrace attached (journalctl.txt)
--
You are receiving this mail because:
You are watching all bug changes.