Bug 510032 - KWin crashed in KWin::SurfaceInterface::isMapped after starting to drag a file in Dolphin
Summary: KWin crashed in KWin::SurfaceInterface::isMapped after starting to drag a fil...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.5.80
Platform: KDE Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi, regression
: 510107 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-09-28 19:09 UTC by Nate Graham
Modified: 2025-10-07 13:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.5.0
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/263041/events/25edb67fb7c94255b19f3d4b7b7af7db/


Attachments
New crash information added by DrKonqi (96.92 KB, text/plain)
2025-09-28 19:09 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2025-09-28 19:09:52 UTC
Application: kwin_wayland (6.5.80)

ApplicationNotResponding [ANR]: false
Qt Version: 6.9.2
Frameworks Version: 6.19.0
Operating System: Linux 6.16.8-arch1-1 x86_64
Windowing System: Wayland
Distribution: KDE Linux
DrKonqi: 6.5.80 [CoredumpBackend]

-- Information about the crash:
I had just dragged an SVG file in a Dolphin window. The moment the drag started, KWin crashed.

The reporter is unsure if this crash is reproducible.

-- Backtrace (Reduced):
#4  KWin::SurfaceInterface::isMapped (this=this@entry=0x0) at /usr/include/c++/15.2.1/bits/unique_ptr.h:193
#5  0x00007fb5587b9b07 in KWin::SurfaceInterface::inputSurfaceAt (this=this@entry=0x0, position=...) at /home/nate/kde/src/kwin/src/wayland/surface.cpp:1092
#6  0x00007fb5587b9d1e in KWin::SurfaceInterface::mapToInputSurface (this=this@entry=0x0, position=...) at /home/nate/kde/src/kwin/src/wayland/surface.cpp:1122
#7  0x00007fb55845fdf3 in KWin::DragAndDropInputFilter::pointerMotion (this=<optimized out>, event=<optimized out>) at /home/nate/kde/src/kwin/src/input.cpp:2648
#8  0x00007fb55850ff96 in KWin::InputRedirection::processFilters<bool (KWin::InputEventFilter::*)(KWin::PointerMotionEvent*), KWin::PointerMotionEvent*> (this=<optimized out>, method=<optimized out>) at /home/nate/kde/src/kwin/src/input.h:153
#9  KWin::PointerInputRedirection::processMotionInternal (this=0x555cddd71b90, pos=..., delta=..., deltaNonAccelerated=..., time=..., device=0x555cded66660, type=KWin::PointerInputRedirection::MotionType::Motion) at /home/nate/kde/src/kwin/src/pointer_input.cpp:283
#10 0x00007fb558510ef3 in KWin::PointerInputRedirection::processMotion (this=<optimized out>, delta=..., deltaNonAccelerated=..., time=..., device=<optimized out>) at /home/nate/kde/src/kwin/src/pointer_input.cpp:252
#11 0x00007fb55540d731 in QtPrivate::QSlotObjectBase::call (this=<optimized out>, r=<optimized out>, a=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
#12 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4157
[...]
#14 KWin::InputDevice::pointerMotion (this=this@entry=0x555cded66660, _t1=..., _t2=..., _t3=_t3@entry=std::chrono::duration = { 20624781747us }, _t4=<optimized out>) at /home/nate/kde/build/kwin/src/kwin_autogen/include/moc_inputdevice.cpp:736
#15 0x00007fb5586eff7d in KWin::LibInput::Connection::processEvents (this=0x555cdde1b8a0) at /home/nate/kde/src/kwin/src/backends/libinput/connection.cpp:363
#16 0x00007fb5553faa74 in QObject::event (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1432
#17 0x00007fb556532dd0 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x555cddd71850, e=0x7fb52c009090) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3300
#18 0x00007fb5553a1678 in QCoreApplication::notifyInternal2 (receiver=0x555cddd71850, event=event@entry=0x7fb52c009090) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106
#19 0x00007fb5553a1a5b in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x7fb52c009090) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1546
#20 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x555cdd9c1c50) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1891


Reported using DrKonqi
Comment 1 Nate Graham 2025-09-28 19:09:55 UTC
Created attachment 185350 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Akseli Lahtinen 2025-09-29 08:38:14 UTC
Where did you start the drag?
Comment 3 David Edmundson 2025-09-29 11:21:31 UTC
Key question is where we dragged over.

Code path in kwin says:
Find the window at the given position, then do something with the surface.
Somehow we got a window returned with no surface.

Internal window maybe?
Comment 4 Nate Graham 2025-09-29 16:37:18 UTC
The drag was started in Dolphin. As I recall, it didn't reach the Plasma desktop before crashing. I think it went over Dolphin's Places panel. Or if it did, it was just at the moment the drag moved over a pixel of the desktop.
Comment 5 TraceyC 2025-09-30 19:58:15 UTC
*** Bug 510107 has been marked as a duplicate of this bug. ***
Comment 6 Bug Janitor Service 2025-10-03 10:32:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8191
Comment 7 Vlad Zahorodnii 2025-10-06 15:38:32 UTC
Git commit 2c04714d1dfef8546470daa9b5678e57760233fc by Vlad Zahorodnii.
Committed on 06/10/2025 at 14:04.
Pushed by vladz into branch 'master'.

Guard against drag target having no wayland surface

This case may potentially arise with internal windows, tooltips, etc.

M  +1    -2    src/input.cpp

https://invent.kde.org/plasma/kwin/-/commit/2c04714d1dfef8546470daa9b5678e57760233fc
Comment 8 Vlad Zahorodnii 2025-10-07 07:02:34 UTC
Git commit b522bc1d34320449a4d55fb3fb70cc1e6ce334e8 by Vlad Zahorodnii.
Committed on 07/10/2025 at 06:11.
Pushed by vladz into branch 'Plasma/6.5'.

Guard against drag target having no wayland surface

This case may potentially arise with internal windows, tooltips, etc.
(cherry picked from commit 2c04714d1dfef8546470daa9b5678e57760233fc)

M  +1    -2    src/input.cpp

https://invent.kde.org/plasma/kwin/-/commit/b522bc1d34320449a4d55fb3fb70cc1e6ce334e8