Bug 461052 - kwin crashed in KWin::Window::isOnOutput()
Summary: kwin crashed in KWin::Window::isOnOutput()
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.0
Platform: Debian unstable Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-10-27 06:28 UTC by Vassilis Virvilis
Modified: 2023-02-16 03:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vassilis Virvilis 2022-10-27 06:28:52 UTC
Application: kwin_x11 (5.26.0)

Qt Version: 5.15.6
Frameworks Version: 5.98.0
Operating System: Linux 6.0.0-1-amd64 x86_64
Windowing System: X11
Distribution: Debian GNU/Linux bookworm/sid
DrKonqi: 5.26.0 [KCrashBackend]

-- Information about the crash:
Hi,

I got a lot a crashes from kwin probably after 5.24 (not so sure). It happens every 3 days - sometimes sooner with a X error 22 bad request. Previously I had kwin running for months.

Usually kwin cannot restart itself after that.

This time it managed to restart and offered me the KCrash dialog so this is probably a different bug and I thought to sent it over in case anybody can see it through...

I have some 3D effects enabled not sure if that plays any role.

The crash does not seem to be reproducible.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault

[KCrash Handler]
#4  KWin::OutputMode::size() const (this=0x1) at ./src/core/output.cpp:50
#5  0x00007fb0ea3cc01e in KWin::Output::modeSize() const (this=this@entry=0x557e6db30f80) at ./src/core/output.cpp:184
#6  0x00007fb0ea3cc22d in KWin::Output::pixelSize() const (this=this@entry=0x557e6db30f80) at ./src/core/output.cpp:189
#7  0x00007fb0ea3cc27b in KWin::Output::geometry() const (this=0x557e6db30f80) at ./src/core/output.cpp:169
#8  0x00007fb0ea4fe1c0 in KWin::Window::isOnOutput(KWin::Output*) const (this=this@entry=0x557e6de536c0, output=<optimized out>) at ./src/window.cpp:439
#9  0x00007fb0ea4973fc in KWin::DesktopBackgroundItem::updateWindow() (this=this@entry=0x557e6ee4ea30) at ./src/scripting/desktopbackgrounditem.cpp:112
#10 0x00007fb0ea4979ba in KWin::DesktopBackgroundItem::setDesktop(KWin::VirtualDesktop*) (desktop=<optimized out>, this=0x557e6ee4ea30) at ./src/scripting/desktopbackgrounditem.cpp:66
#11 KWin::DesktopBackgroundItem::setDesktop(KWin::VirtualDesktop*) (desktop=<optimized out>, this=0x557e6ee4ea30) at ./src/scripting/desktopbackgrounditem.cpp:62
#12 KWin::DesktopBackgroundItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x557e6ee4ea30, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./obj-x86_64-linux-gnu/src/kwin_autogen/include/moc_desktopbackgrounditem.cpp:148
#13 0x00007fb0ea497d53 in KWin::DesktopBackgroundItem::qt_metacall(QMetaObject::Call, int, void**) (this=0x557e6ee4ea30, _c=QMetaObject::WriteProperty, _id=3, _a=0x7ffd1e0e71f0) at ./obj-x86_64-linux-gnu/src/kwin_autogen/include/moc_desktopbackgrounditem.cpp:197
#14 0x00007fb0e98e9e4e in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const (flags=..., value=<optimized out>, target=<optimized out>, this=<optimized out>) at ../../include/QtQml/5.15.6/QtQml/private/../../../../../src/qml/qml/qqmlpropertydata_p.h:393
#15 QObjectPointerBinding::write(QV4::Value const&, bool, QFlags<QQmlPropertyData::WriteFlag>) (this=<optimized out>, result=..., isUndefined=<optimized out>, flags=...) at qml/qqmlbinding.cpp:714
#16 0x00007fb0e98eb89e in QQmlNonbindingBinding::doUpdate(QQmlJavaScriptExpression::DeleteWatcher const&, QFlags<QQmlPropertyData::WriteFlag>, QV4::Scope&) (this=0x557e6eaa55c0, watcher=..., flags=..., scope=<optimized out>) at qml/qqmlbinding.cpp:258
#17 0x00007fb0e98e92b4 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) (this=0x557e6eaa55c0, flags=...) at qml/qqmlbinding.cpp:194
#18 0x00007fb0e98c66df in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (endpoint=<optimized out>, a=0x0) at qml/qqmlnotifier.cpp:104
#19 0x00007fb0e86e87ed in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007fb0e86e8caf in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007fb0ea382708 in KWin::VirtualDesktopManager::currentChanged(unsigned int, unsigned int) (this=this@entry=0x557e6dd18c60, _t1=<optimized out>, _t1@entry=2, _t2=<optimized out>) at ./obj-x86_64-linux-gnu/src/kwin_autogen/EWIEGA46WW/moc_virtualdesktops.cpp:622
#22 0x00007fb0ea4ea7e4 in KWin::VirtualDesktopManager::setCurrent(KWin::VirtualDesktop*) (this=0x557e6dd18c60, newDesktop=0x557e6e047510) at ./src/virtualdesktops.h:63
#23 0x00007fb0e91e7ec9 in NETRootInfo::event(xcb_generic_event_t*, QFlags<NET::Property>*, QFlags<NET::Property2>*) () at /lib/x86_64-linux-gnu/libKF5WindowSystem.so.5
#24 0x00007fb0ea47d084 in KWin::RootInfoFilter::event(xcb_generic_event_t*) (this=<optimized out>, event=<optimized out>) at ./src/rootinfo_filter.cpp:26
#25 0x00007fb0ea45c497 in KWin::Application::dispatchEvent(xcb_generic_event_t*) (this=<optimized out>, event=0x7fb0dc026b90) at ./src/main.cpp:447
#26 0x00007fb0e86aec9f in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007fb0e24d43cf in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#28 0x00007fb0e24d5956 in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#29 0x00007fb0e24fc4bc in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#30 0x00007fb0e86b019b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007fb0e86b8306 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x0000557e6d8310ae in main(int, char**) (argc=<optimized out>, argv=0x7ffd1e0e9408) at ./src/main_x11.cpp:409
[Inferior 1 (process 1765979) detached]

Reported using DrKonqi
Comment 1 Vassilis Virvilis 2022-10-27 06:35:20 UTC
Just remembered something that may be important.

My monitor broke down (don't ask) and I had to connect a new one (same resolution though). Then I got the KCrash dialog in the new monitor.

Hope that helps.
Comment 2 Nate Graham 2022-10-28 17:55:49 UTC
The backtrace paints a somewhat clear picture: KWin tried to position windows on the screen that no longer exists, queried its properties, and crashed.
Comment 3 Ricardo J. Barberis 2022-10-29 17:43:02 UTC
Can this bug make kwin_x11 die?

Since a couple of weeks ago (I upgraded Plasma 5.26.0 + Frameworks 5.99.0 + Gears 22.08.2 at the same time, so I can't pinpoint the reason) I'm having constant kwin crashes and I have to start it manually, either via konsole/yakuake o krunner.

I had no luck triyng to reproduce it o debug it, nothing relevant in dmesg, /var/log/messages or ~/.local/share/sddm/xorg-session.log.

Yesterday I had like 10 crashes in five hours, I got fed up and rebooted and still haven't experienced any crash so far.

My system is a notebook to which I connect an external monitor (HDMI TV actually) when working from home, bu I also experienced crashes when at the office with no external monitor/TV attached.

Also, I don't usually reboot my notebook but use suspend/resume.

Thanks.

Operating System: Slackware64 -current
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 5.19.17 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-1035G1 CPU @ 1.00GHz
Memory: 15.2 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
Product Name: 81YK
System Version: IdeaPad 5 15IIL05
Comment 4 Ricardo J. Barberis 2022-10-29 17:47:02 UTC
Oh, and I never got a Dr Konqui crash report about these crashes.

And a couple of times I also had to restart plasmashhel because it hanged after starting kwin_x11.

The only thing I notice is that the crashes seems to happen when I receive a notification, but it might be just bad timming because while working I usually receive lots of them (from mattermost in a browser tab mostly, and also from kmail).
Comment 5 Vassilis Virvilis 2022-12-06 07:12:36 UTC
This crash is consistent for me now.

The way to reproduce is:

-Start Plasma session (login)
-Remove old monitor
-Attach new monitor (same resolution - don't know what happens if you reconnect the old monitor. Hm?)
-kwin seems working
-try to change virtual desktops - kwin crashes and the report-bug is popped up.
Comment 6 Vlad Zahorodnii 2023-01-06 09:21:57 UTC
> -try to change virtual desktops - kwin crashes and the report-bug is popped up.
Is overview/present windows/desktop grid active when you change virtual desktop?
Comment 7 Vassilis Virvilis 2023-01-06 09:31:27 UTC
(In reply to Vlad Zahorodnii from comment #6)
> > -try to change virtual desktops - kwin crashes and the report-bug is popped up.
> Is overview/present windows/desktop grid active when you change virtual
> desktop?

Do you mean the thumbnails of virtual desktops selector? (sorry I don't know the proper name).

In that case yes - I would say. It is always shown when I change virtual desktops. So it should be shown also when the bug is triggered (after monitor change). Now I can't remember if it is actually shown or crashes trying to show it and I am not at work so I cannot reproduce it.

However in a recent update kwin started to restart itself after the crash and the mitigates the severity of this error.
Comment 8 Vlad Zahorodnii 2023-01-17 09:12:06 UTC
> Do you mean the thumbnails of virtual desktops selector? (sorry I don't know the proper name).

Can you attach the screenshot of that effect?

---

I can't reproduce the crash, kwin doesn't crash if I remove and reconnect an output while the overview effect is active and switch between virtual desktops.

As is, I'm confused by KWin::DesktopBackgroundItem::updateWindow() call.
Comment 9 Vassilis Virvilis 2023-01-17 17:04:18 UTC
(In reply to Vlad Zahorodnii from comment #8)
> Can you attach the screenshot of that effect?

I don't think so. It is transient during virtual desktop switching. I would need probably to record it in video.

> I can't reproduce the crash, kwin doesn't crash if I remove and reconnect an
> output while the overview effect is active and switch between virtual
> desktops.

Ok I have 2 different monitors with the same resolution.
When I came in the morning sometimes I have to switch the monitors (for some non related reason).
When I get back in my chair everything is normal. When I try to switch to another virtual screen I get the crash.

Hope that helps
Comment 10 Bug Janitor Service 2023-02-01 05:03:19 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2023-02-16 03:48:38 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!