https://bugs.kde.org/show_bug.cgi?id=521328
Bug ID: 521328
Summary: Yakuake crashes (SIGABRT) in
MainWindow::getScreenGeometry — QList<QString>::at(-1)
on workAreaChanged with incomplete multi-monitor
config
Classification: Applications
Product: yakuake
Version First 26.04.1
Reported In:
Platform: Neon
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 193062
--> https://bugs.kde.org/attachment.cgi?id=193062&action=edit
backtrace with symbols
Yakuake crashes on X11 with QList<QString>::at "index out of range" (i = -1) in
MainWindow::getScreenGeometry, triggered by KX11Extras::workAreaChanged() when
the screen configuration is momentarily incomplete.
What happens: On a multi-monitor X11 setup, when the desktop work area changes
and the target screen is briefly unavailable, getScreenGeometry() looks up a
screen, gets index -1, and passes it to QList<QString>::at() with no bounds
check. Qt's assertion aborts the process (SIGABRT). At crash time
m_availableScreenRect is {0,0,-1,-1} (empty/invalid), confirming there was no
valid screen when the event arrived. This is fundamentally a missing bounds
check; the X11 work-area signal is just the trigger here, and the same lookup
could fail on any transient screen change (multi-monitor hotplug, a slow-waking
output), so a guard would help Wayland too.
Environment: KDE Neon, Yakuake 26.04.1 (current Neon stable; 26.04.2 is the
latest upstream), Qt6, X11 session. Laptop with lid closed (internal panel off)
plus two external monitors — one on direct HDMI, one on a USB-C→HDMI adapter
that re-initialises more slowly on resume from sleep.
Steps to reproduce:
* X11 session, multiple outputs, with at least one output that re-initialises
slowly (here: a USB-C→HDMI display).
* Let the system sleep / displays power off.
* Wake it. The outputs return at different times, so the screen layout passes
through transient states, each emitting workAreaChanged().
* Yakuake crashes during one of these transients.
A maintainer can likely reproduce more directly by toggling an output off then
on via xrandr (e.g. xrandr --output HDMI-1 --off then --auto) while Yakuake is
running, forcing a workAreaChanged() with a missing screen.
Key frames:
#14 QList<QString>::at (i=-1) qlist.h:512
#15 MainWindow::getScreenGeometry mainwindow.cpp:1585
#16 MainWindow::getDesktopGeometry mainwindow.cpp:1599
#17 MainWindow::setWindowGeometry mainwindow.cpp:1005
#18 MainWindow::applyWindowGeometry mainwindow.cpp:1000
#25 KX11Extras::workAreaChanged() (libKF6WindowSystem)
Notes: I'm not sure I can reproduce this on demand, however I've had four
separate SIGABRT crashes over two days, all the same assertion. Full backtrace
attached.
--
You are receiving this mail because:
You are watching all bug changes.