Bug 395825

Summary: Seg fault on ApplicationWayland destroy in getMovingClient
Product: [Plasma] kwin Reporter: Roman Gilg <subdiff>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: justin.zobel
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: KWin backtrace

Description Roman Gilg 2018-06-24 19:52:36 UTC
Created attachment 113544 [details]
KWin backtrace

This is one seg fault I found in my coredumps, which happens through a late call through PoitnerInputRedirection while the app is going down.

The workspace instance is already destroyed.
Comment 1 Christoph Feck 2018-07-18 23:41:06 UTC
Core was generated by `/usr/bin/kwin_wayland --xwayland --libinput --exit-with-session=/usr/lib/x86_64'.

Program terminated with signal SIGSEGV, Segmentation fault.

#0  0x00007efd29164716 in KWin::Workspace::getMovingClient (this=0x0) at /home/roman/dev/kde/src/kde/workspace/kwin/workspace.h:358
358             return movingClient;

[Current thread is 1 (Thread 0x7efd29802940 (LWP 2751))]
(gdb) bt
#0  0x00007efd29164716 in KWin::Workspace::getMovingClient (this=0x0) at /home/roman/dev/kde/src/kde/workspace/kwin/workspace.h:358
#1  0x00007efd29188f54 in KWin::PointerInputRedirection::<lambda()>::operator()(void) const (__closure=0x2117310) at /home/roman/dev/kde/src/kde/workspace/kwin/pointer_input.cpp:533
#2  0x00007efd2918f491 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KWin::PointerInputRedirection::update()::<lambda()> >::call(KWin::PointerInputRedirection::<lambda()> &, void **) (f=..., arg=0x7ffc25ac6040) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:128
#3  0x00007efd2918efc2 in QtPrivate::Functor<KWin::PointerInputRedirection::update()::<lambda()>, 0>::call<QtPrivate::List<>, void>(KWin::PointerInputRedirection::<lambda()> &, void *, void **) (f=..., arg=0x7ffc25ac6040) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:238
#4  0x00007efd2918eaa4 in QtPrivate::QFunctorSlotObject<KWin::PointerInputRedirection::update()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x2117300, r=0x13212d0, a=0x7ffc25ac6040, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:421
#5  0x00007efd26c9deb6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007efd2938f4e3 in KWin::Toplevel::geometryChanged (this=0x2124dd0) at /home/roman/dev/kde/build/kde/workspace/kwin/moc_toplevel.cpp:697
#7  0x00007efd2910e267 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::Toplevel::*)()>::call(void (KWin::Toplevel::*)(), KWin::Toplevel*, void**) (f=(void (KWin::Toplevel::*)(KWin::Toplevel * const)) 0x7efd2938f4ba <KWin::Toplevel::geometryChanged()>, o=0x2124dd0, arg=0x7ffc25ac62a0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:134
#8  0x00007efd2910db78 in QtPrivate::FunctionPointer<void (KWin::Toplevel::*)()>::call<QtPrivate::List<>, void>(void (KWin::Toplevel::*)(), KWin::Toplevel*, void**) (f=(void (KWin::Toplevel::*)(KWin::Toplevel * const)) 0x7efd2938f4ba <KWin::Toplevel::geometryChanged()>, o=0x2124dd0, arg=0x7ffc25ac62a0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:167
#9  0x00007efd2910d0d4 in QtPrivate::QSlotObject<void (KWin::Toplevel::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x20d8720, r=0x2124dd0, a=0x7ffc25ac62a0, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:396
#10 0x00007efd26c9deb6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007efd2938f550 in KWin::Toplevel::geometryShapeChanged (this=0x2124dd0, _t1=0x2124dd0, _t2=...) at /home/roman/dev/kde/build/kde/workspace/kwin/moc_toplevel.cpp:704
#12 0x00007efd292e7bc6 in KWin::ShellClient::doSetGeometry (this=0x2124dd0, rect=...) at /home/roman/dev/kde/src/kde/workspace/kwin/shell_client.cpp:637
#13 0x00007efd292e6e4d in KWin::ShellClient::addDamage (this=0x2124dd0, damage=...) at /home/roman/dev/kde/src/kde/workspace/kwin/shell_client.cpp:494
#14 0x00007efd29237cfb in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QRegion const&>, void, void (KWin::Toplevel::*)(QRegion const&)>::call (f=&virtual table offset 352, o=0x2124dd0, arg=0x7ffc25ac6570) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:134
#15 0x00007efd29237bca in QtPrivate::FunctionPointer<void (KWin::Toplevel::*)(QRegion const&)>::call<QtPrivate::List<QRegion const&>, void> (f=&virtual table offset 352, o=0x2124dd0, arg=0x7ffc25ac6570) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:167
#16 0x00007efd29237ac6 in QtPrivate::QSlotObject<void (KWin::Toplevel::*)(QRegion const&), QtPrivate::List<QRegion const&>, void>::impl (which=1, this_=0x1c2d600, r=0x2124dd0, a=0x7ffc25ac6570, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:396
#17 0x00007efd26c9deb6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007efd281ce154 in KWayland::Server::SurfaceInterface::damaged (this=0x1968d80, _t1=...) at /home/roman/dev/kde/build/frameworks/kwayland/src/server/moc_surface_interface.cpp:359
#19 0x00007efd281962a3 in KWayland::Server::SurfaceInterface::Private::swapStates (this=0x211aee0, source=0x211afb0, target=0x211af20, emitChanged=true) at /home/roman/dev/kde/src/frameworks/kwayland/src/server/surface_interface.cpp:449
#20 0x00007efd28196514 in KWayland::Server::SurfaceInterface::Private::commit (this=0x211aee0) at /home/roman/dev/kde/src/frameworks/kwayland/src/server/surface_interface.cpp:493
#21 0x00007efd28196f3e in KWayland::Server::SurfaceInterface::Private::commitCallback (client=0x1df82c0, resource=0x1e65430) at /home/roman/dev/kde/src/frameworks/kwayland/src/server/surface_interface.cpp:646
#22 0x00007efd18befe40 in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#23 0x00007efd18bef8ab in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#24 0x00007efd1f066db4 in wl_closure_invoke (closure=0x1bb0410, flags=<optimized out>, target=0x1e65430, opcode=6, data=0x1df82c0) at /home/roman/dev/gfx/wayland/src/wayland/src/connection.c:996
#25 0x00007efd1f063867 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x1df82c0) at /home/roman/dev/gfx/wayland/src/wayland/src/wayland-server.c:420
#26 0x00007efd1f064e22 in wl_event_loop_dispatch (loop=0x13147f0, timeout=<optimized out>) at /home/roman/dev/gfx/wayland/src/wayland/src/event-loop.c:641
#27 0x00007efd2811f175 in KWayland::Server::Display::Private::dispatch (this=0x1314df0) at /home/roman/dev/kde/src/frameworks/kwayland/src/server/display.cpp:141
#28 0x00007efd2811f5d1 in KWayland::Server::Display::dispatchEvents (this=0x1309be0, msecTimeout=0) at /home/roman/dev/kde/src/frameworks/kwayland/src/server/display.cpp:187
#29 0x00007efd292fbcb9 in KWin::WaylandServer::dispatch (this=0x1314bc0) at /home/roman/dev/kde/src/kde/workspace/kwin/wayland_server.cpp:636
#30 0x0000000000409840 in KWin::ApplicationWayland::~ApplicationWayland (this=0x7ffc25ac7000, __in_chrg=<optimized out>) at /home/roman/dev/kde/src/kde/workspace/kwin/main_wayland.cpp:135
#31 0x000000000040f23c in main (argc=4, argv=0x7ffc25ac7268) at /home/roman/dev/kde/src/kde/workspace/kwin/main_wayland.cpp:554
Comment 2 Justin Zobel 2020-12-07 04:12:45 UTC
Thank you for the report.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 3 Bug Janitor Service 2020-12-22 04:34:44 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 4 Bug Janitor Service 2021-01-06 04:34:15 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!