Bug 495654 - Kwin crashes in KWin::Window::setElectricBorderMaximizing() when dragging window between monitors
Summary: Kwin crashes in KWin::Window::setElectricBorderMaximizing() when dragging win...
Status: RESOLVED DUPLICATE of bug 500272
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-10-31 19:44 UTC by Sjors
Modified: 2025-02-18 09:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
bugtrace (25.53 KB, text/plain)
2024-10-31 19:44 UTC, Sjors
Details
2nd bugtrace (82.62 KB, text/vnd.kde.kcrash-report)
2024-10-31 20:44 UTC, Sjors
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sjors 2024-10-31 19:44:46 UTC
Created attachment 175420 [details]
bugtrace

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY
Reliably happens between 2 specific monitors, but sometimes others too (I have a setup with 4 monitors). Happens exactly at the point when the cursor crosses over. Also happens when I drag a window to the top of a monitor in order to maximize it.

Example: 3 monitors, vertical on the right, landscape in the middle and left. Left monitor has the taskbar on the right, so the taskbar is in between the left and middle monitor.

My "workaround" is dragging it halfway over, letting go, moving my mouse and picking the window back up on the next monitor. But I keep forgetting and then I have to restart all my apps.

This is my first bug report so I'm hoping it's the right place, please point me if not.
I am willing to help to provide more info if neccesary of course.

Also, after the crash. When the cursor hovers over any icon in the tasbar, the icon disappears. But this is a separate issue I think.

STEPS TO REPRODUCE
1. Drag window (e.g. Firefox) to another monitor
2.
3.

OBSERVED RESULT
Crash

EXPECTED RESULT
Window drags over

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Kernel Version: 6.11.5-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3070 Ti/PCIe/SSE2

ADDITIONAL INFORMATION
Comment 1 Sjors 2024-10-31 20:24:00 UTC
After some further investigition it only happens on the top, left, and right side of any monitor. Dragging a window to the bottom doesn't break anything.

Also, dragging a window really fast between monitors without a taskbar works also, but doing it slowly causes the crash.

Dragging fast over a taskbar also causes the crash. I'll ad another trace.
Comment 2 Sjors 2024-10-31 20:44:07 UTC
Created attachment 175422 [details]
2nd bugtrace
Comment 3 Nate Graham 2024-11-01 15:32:56 UTC
Thread 1 (Thread 0x7f9ead1ffb40 (LWP 2759)):
[KCrash Handler]
#4  0x00007f9eb5ee2067 in QSGSoftwareRenderer::render() () from /lib64/libQt6Quick.so.6
#5  0x00007f9eb5f186a4 in QSGRenderer::renderScene() () from /lib64/libQt6Quick.so.6
#6  0x00007f9eb5eb55c6 in QQuickWindowPrivate::renderSceneGraph() () from /lib64/libQt6Quick.so.6
#7  0x00007f9eb5ee319a in QSGSoftwareRenderLoop::renderWindow(QQuickWindow*, bool) () from /lib64/libQt6Quick.so.6
#8  0x00007f9eb5ee3c81 in QSGSoftwareRenderLoop::exposureChanged(QQuickWindow*) () from /lib64/libQt6Quick.so.6
#9  0x00007f9eb42477c8 in QWindow::event(QEvent*) () from /lib64/libQt6Gui.so.6
#10 0x00007f9eb4d8b218 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt6Widgets.so.6
#11 0x00007f9eb3996e88 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt6Core.so.6
#12 0x00007f9eb41e8105 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from /lib64/libQt6Gui.so.6
#13 0x00007f9eb424b37c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt6Gui.so.6
#14 0x00007f9eb424b590 in QWindowSystemInterface::flushWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt6Gui.so.6
#15 0x00007f9eb4228704 in QPlatformWindow::setVisible(bool) () from /lib64/libQt6Gui.so.6
#16 0x00007f9eb5705a6b in GenericBinding<1>::write(QV4::Value const&, bool, QFlags<QQmlPropertyData::WriteFlag>) () from /lib64/libQt6Qml.so.6
#17 0x00007f9eb56fdfe1 in QQmlBinding::doUpdate(QQmlJavaScriptExpression::DeleteWatcher const&, QFlags<QQmlPropertyData::WriteFlag>, QV4::Scope&) () from /lib64/libQt6Qml.so.6
#18 0x00007f9eb5701d18 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) () from /lib64/libQt6Qml.so.6
#19 0x00007f9eb579d195 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () from /lib64/libQt6Qml.so.6
#20 0x00007f9eb39fc42d in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt6Core.so.6
#21 0x00007f9eb69a175d in KWin::Window::setElectricBorderMaximizing(bool) () from /lib64/libkwin.so.6
#22 0x00007f9eb69a2b4d in KWin::Window::checkQuickTilingMaximizationZones(int, int) () from /lib64/libkwin.so.6
#23 0x00007f9eb69a34aa in KWin::Window::updateInteractiveMoveResize(QPointF const&, QFlags<Qt::KeyboardModifier>) () from /lib64/libkwin.so.6
#24 0x00007f9eb684d274 in KWin::MoveResizeFilter::pointerEvent(KWin::MouseEvent*, unsigned int) () from /lib64/libkwin.so.6
#25 0x00007f9eb68e2870 in KWin::PointerInputRedirection::processMotionInternal(QPointF const&, QPointF const&, QPointF const&, std::chrono::duration<long, std::ratio<1l, 1000000l> >, KWin::InputDevice*, KWin::PointerInputRedirection::MotionType) () from /lib64/libkwin.so.6
#26 0x00007f9eb68e3906 in KWin::PointerInputRedirection::processMotion(QPointF const&, QPointF const&, std::chrono::duration<long, std::ratio<1l, 1000000l> >, KWin::InputDevice*) () from /lib64/libkwin.so.6
#27 0x00007f9eb39fc710 in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt6Core.so.6
#28 0x00007f9eb67b4792 in KWin::InputDevice::pointerMotion(QPointF const&, QPointF const&, std::chrono::duration<long, std::ratio<1l, 1000000l> >, KWin::InputDevice*) () from /lib64/libkwin.so.6
#29 0x00007f9eb6a702d9 in KWin::LibInput::Connection::processEvents() () from /lib64/libkwin.so.6
#30 0x00007f9eb39eddcb in QObject::event(QEvent*) () from /lib64/libQt6Core.so.6
#31 0x00007f9eb4d8b218 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt6Widgets.so.6
#32 0x00007f9eb3996e88 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt6Core.so.6
#33 0x00007f9eb399ac51 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt6Core.so.6
#34 0x00007f9eb3b56a4f in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt6Core.so.6
#35 0x00007f9eb4763492 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt6Gui.so.6
#36 0x00007f9eb39a3bc3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt6Core.so.6
#37 0x00007f9eb399fa7c in QCoreApplication::exec() () from /lib64/libQt6Core.so.6
#38 0x0000561500d0f855 in main ()
Comment 4 Sjors 2024-11-02 19:44:15 UTC
I played around with the Window Management settings. I believe, after changing "Window Management->Window Behaviour->Movement->Screen edge/Window snap zone" from 10px to 25px, and back to 10px, the issue does not occur anymore. I did play around with some other settings too so I'm not entirely sure if this specific setting is what fixed it, but the crash is gone. 

Only problem left now is taskbar icons disappearing, but that's a different issue.
Comment 5 David Edmundson 2025-02-18 09:17:10 UTC

*** This bug has been marked as a duplicate of bug 500272 ***