Bug 422275 - Kwin crashes when using hot corner to switch virtual desktops
Summary: Kwin crashes when using hot corner to switch virtual desktops
Status: RESOLVED DUPLICATE of bug 445335
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.19.2
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2020-05-31 00:23 UTC by Leszek Lesner
Modified: 2022-01-10 10:18 UTC (History)
1 user (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 Leszek Lesner 2020-05-31 00:23:00 UTC
Application: kwin_x11 (5.18.90)
 (Compiled from sources)
Qt Version: 5.14.2
Frameworks Version: 5.70.0
Operating System: Linux 5.6.15-050615-generic x86_64
Windowing system: X11
Distribution: Neptune 6

-- Information about the crash:
- What I was doing when the application crashed:
I tried switching the desktop via hot corner desktop overview effect and using a hot corner

The crash can be reproduced sometimes.

-- Backtrace:
Application: KWin (kwin_x11), signal: Aborted
Content of s_kcrashErrorMessage: (null)
[KCrash Handler]
#5  0x00007f756b12e7bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#6  0x00007f756b119535 in __GI_abort () at abort.c:79
#7  0x00007f756b7c6945 in  () at /home/leszek/kde/qt5/lib/libQt5Core.so.5
#8  0x00007f756b7c5e63 in qt_assert_x(char const*, char const*, char const*, int) () at /home/leszek/kde/qt5/lib/libQt5Core.so.5
#9  0x00007f756f0fd765 in KWin::EffectsHandlerImpl::windowToDesktops(KWin::EffectWindow*, QVector<unsigned int> const&) (this=0x55c71a818bb0, w=0x55c71a856b60, desktopIds=...) at /home/leszek/kde/src/kwin/effects.cpp:939
#10 0x00007f756ed8d25f in KWin::DesktopGridEffect::windowInputMouseEvent(QEvent*) (this=0x55c71a892530, e=0x7ffcb3aca9a0) at /home/leszek/kde/src/kwin/effects/desktopgrid/desktopgrid.cpp:550
#11 0x00007f756f0fe64a in KWin::EffectsHandlerImpl::checkInputWindowEvent(QMouseEvent*) (this=0x55c71a818bb0, e=0x7ffcb3aca9a0) at /home/leszek/kde/src/kwin/effects.cpp:1299
#12 0x00007f7564684f77 in KWin::EffectsMouseInterceptionX11Filter::event(xcb_generic_event_t*) (this=0x55c71b1fb630, event=0x7f756001f970) at /home/leszek/kde/src/kwin/plugins/platforms/x11/standalone/effects_mouse_interception_x11_filter.cpp:101
#13 0x00007f756f116e48 in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) (this=0x55c71a444160, e=0x7f756001f970) at /home/leszek/kde/src/kwin/events.cpp:240
#14 0x00007f756f179a7e in KWin::XcbEventFilter::nativeEventFilter(QByteArray const&, void*, long*) (this=0x55c71a3d68d0, eventType=..., message=0x7f756001f970, result=0x7ffcb3acad98) at /home/leszek/kde/src/kwin/main.cpp:412
#15 0x00007f756b9b8dff in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () at /home/leszek/kde/qt5/lib/libQt5Core.so.5
#16 0x00007f7565800f90 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at /home/leszek/kde/qt5/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#17 0x00007f7565801c96 in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/leszek/kde/qt5/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#18 0x00007f756582928c in  () at /home/leszek/kde/qt5/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#19 0x00007f756b9ba38b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/leszek/kde/qt5/lib/libQt5Core.so.5
#20 0x00007f756b9c213e in QCoreApplication::exec() () at /home/leszek/kde/qt5/lib/libQt5Core.so.5
#21 0x000055c71851c947 in main(int, char**) (argc=3, argv=0x7ffcb3acb1e8) at /home/leszek/kde/src/kwin/main_x11.cpp:479
[Inferior 1 (process 23957) detached]

The reporter indicates this bug may be a duplicate of or related to bug 411117.

Possible duplicates by query: bug 421576, bug 420414, bug 419798, bug 418804, bug 418803.

Reported using DrKonqi
Comment 1 Vlad Zahorodnii 2020-06-01 07:26:06 UTC
So, the Q_ASSERT is triggered because the desktop grid has passed a garbage desktop id. The question is why the desktop grid effect passes garbage desktop ids...

It will be really helpful if you find a reliable way to reproduce this crash.
Comment 2 Christian Grasso 2020-06-24 13:05:28 UTC
I can reproduce this on 5.19.2 by using the hot corner again when Present Windows is already open. Closing with ESC does not trigger the crash.
Comment 3 Leszek Lesner 2022-01-07 12:25:54 UTC
Still experiencing this issue occasionally on KWin master. 
Here is the Backtrace:

--- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[KCrash Handler]
#5  0x00007fd190c814ad in KWin::EffectWindow::isOnAllDesktops() const (this=0x0) at /home/leszek/kde/src/kwin/src/libkwineffects/kwineffects.cpp:815
#6  0x0000562403cea32f in KWin::DesktopGridEffect::desktopList(KWin::EffectWindow const*) const (this=0x562405d909c0, w=0x0) at /home/leszek/kde/src/kwin/src/effects/desktopgrid/desktopgrid.cpp:1449
#7  0x0000562403ce2c84 in KWin::DesktopGridEffect::slotWindowClosed(KWin::EffectWindow*) (this=0x562405d909c0, w=0x7fd184020ea0) at /home/leszek/kde/src/kwin/src/effects/desktopgrid/desktopgrid.cpp:448
#8  0x0000562403cf7914 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KWin::EffectWindow*>, void, void (KWin::DesktopGridEffect::*)(KWin::EffectWindow*)>::call(void (KWin::DesktopGridEffect::*)(KWin::EffectWindow*), KWin::DesktopGridEffect*, void**) (f=(void (KWin::DesktopGridEffect::*)(class KWin::DesktopGridEffect * const, class KWin::EffectWindow *)) 0x562403ce2b9c <KWin::DesktopGridEffect::slotWindowClosed(KWin::EffectWindow*)>, o=0x562405d909c0, arg=0x7ffdaa5360a0) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:152
#9  0x0000562403cf6622 in QtPrivate::FunctionPointer<void (KWin::DesktopGridEffect::*)(KWin::EffectWindow*)>::call<QtPrivate::List<KWin::EffectWindow*>, void>(void (KWin::DesktopGridEffect::*)(KWin::EffectWindow*), KWin::DesktopGridEffect*, void**) (f=(void (KWin::DesktopGridEffect::*)(class KWin::DesktopGridEffect * const, class KWin::EffectWindow *)) 0x562403ce2b9c <KWin::DesktopGridEffect::slotWindowClosed(KWin::EffectWindow*)>, o=0x562405d909c0, arg=0x7ffdaa5360a0) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:185
#10 0x0000562403cf468b in QtPrivate::QSlotObject<void (KWin::DesktopGridEffect::*)(KWin::EffectWindow*), QtPrivate::List<KWin::EffectWindow*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x562405db8f30, r=0x562405d909c0, a=0x7ffdaa5360a0, ret=0x0) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:418
#11 0x00007fd18f5de853 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffdaa5360a0, r=0x562405d909c0, this=0x562405db8f30) at ../../include/QtCore/../../../../../src/Qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
#12 doActivate<false>(QObject*, int, void**) (sender=0x5624053f0b60, signal_index=12, argv=0x7ffdaa5360a0) at /home/leszek/kde/src/Qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
#13 0x00007fd190c666cb in KWin::EffectsHandler::windowClosed(KWin::EffectWindow*) (this=0x5624053f0b60, _t1=0x7fd184020ea0) at /home/leszek/kde/build/kwin/src/libkwineffects/kwineffects_autogen/EWIEGA46WW/moc_kwineffects.cpp:1631
#14 0x00007fd19138642f in KWin::EffectsHandlerImpl::slotWindowClosed(KWin::Toplevel*, KWin::Deleted*) (this=0x5624053f0b60, c=0x56240639f3b0, d=0x5624063557e0) at /home/leszek/kde/src/kwin/src/effects.cpp:560
#15 0x00007fd19139d7ce in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<KWin::Toplevel*, KWin::Deleted*>, void, void (KWin::EffectsHandlerImpl::*)(KWin::Toplevel*, KWin::Deleted*)>::call(void (KWin::EffectsHandlerImpl::*)(KWin::Toplevel*, KWin::Deleted*), KWin::EffectsHandlerImpl*, void**) (f=(void (KWin::EffectsHandlerImpl::*)(class KWin::EffectsHandlerImpl * const, class KWin::Toplevel *, class KWin::Deleted *)) 0x7fd1913863e0 <KWin::EffectsHandlerImpl::slotWindowClosed(KWin::Toplevel*, KWin::Deleted*)>, o=0x5624053f0b60, arg=0x7ffdaa5362b0) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:152
#16 0x00007fd19139c830 in QtPrivate::FunctionPointer<void (KWin::EffectsHandlerImpl::*)(KWin::Toplevel*, KWin::Deleted*)>::call<QtPrivate::List<KWin::Toplevel*, KWin::Deleted*>, void>(void (KWin::EffectsHandlerImpl::*)(KWin::Toplevel*, KWin::Deleted*), KWin::EffectsHandlerImpl*, void**) (f=(void (KWin::EffectsHandlerImpl::*)(class KWin::EffectsHandlerImpl * const, class KWin::Toplevel *, class KWin::Deleted *)) 0x7fd1913863e0 <KWin::EffectsHandlerImpl::slotWindowClosed(KWin::Toplevel*, KWin::Deleted*)>, o=0x5624053f0b60, arg=0x7ffdaa5362b0) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:185
#17 0x00007fd19139ab51 in QtPrivate::QSlotObject<void (KWin::EffectsHandlerImpl::*)(KWin::Toplevel*, KWin::Deleted*), QtPrivate::List<KWin::Toplevel*, KWin::Deleted*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x562406039f30, r=0x5624053f0b60, a=0x7ffdaa5362b0, ret=0x0) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:418
#18 0x00007fd18f5de853 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffdaa5362b0, r=0x5624053f0b60, this=0x562406039f30) at ../../include/QtCore/../../../../../src/Qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
#19 doActivate<false>(QObject*, int, void**) (sender=0x56240639f3b0, signal_index=10, argv=0x7ffdaa5362b0) at /home/leszek/kde/src/Qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
#20 0x00007fd1912e001f in KWin::Toplevel::windowClosed(KWin::Toplevel*, KWin::Deleted*) (this=0x56240639f3b0, _t1=0x56240639f3b0, _t2=0x5624063557e0) at /home/leszek/kde/build/kwin/src/kwin_autogen/EWIEGA46WW/moc_toplevel.cpp:809
#21 0x00007fd191526055 in KWin::X11Client::releaseWindow(bool) (this=0x56240639f3b0, on_shutdown=false) at /home/leszek/kde/src/kwin/src/x11client.cpp:269
#22 0x00007fd1913a1a78 in KWin::X11Client::unmapNotifyEvent(xcb_unmap_notify_event_t*) (this=0x56240639f3b0, e=0x7fd18402b710) at /home/leszek/kde/src/kwin/src/events.cpp:549
#23 0x00007fd1913a1314 in KWin::X11Client::windowEvent(xcb_generic_event_t*) (this=0x56240639f3b0, e=0x7fd18402b710) at /home/leszek/kde/src/kwin/src/events.cpp:393
#24 0x00007fd1913a056a in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) (this=0x5624052d4cf0, e=0x7fd18402b710) at /home/leszek/kde/src/kwin/src/events.cpp:166
#25 0x00007fd19140a192 in KWin::Application::dispatchEvent(xcb_generic_event_t*) (this=0x7ffdaa5369f0, event=0x7fd18402b710) at /home/leszek/kde/src/kwin/src/main.cpp:493
#26 0x00007fd19140a32e in KWin::XcbEventFilter::nativeEventFilter(QByteArray const&, void*, long*) (this=0x5624052c5ab0, eventType=..., message=0x7fd18402b710, result=0x7ffdaa536818) at /home/leszek/kde/src/kwin/src/main.cpp:577
#27 0x00007fd18f5a7b17 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) (this=<optimized out>, eventType=..., message=message@entry=0x7fd18402b710, result=result@entry=0x7ffdaa536818) at /home/leszek/kde/src/Qt5/qtbase/src/corelib/kernel/qabstracteventdispatcher.cpp:495
#28 0x00007fd1890640c1 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) (this=this@entry=0x562404f3d860, event=event@entry=0x7fd18402b710) at /home/leszek/kde/src/Qt5/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp:536
#29 0x00007fd189065546 in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x562404f3d860, flags=...) at /home/leszek/kde/src/Qt5/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp:1014
#30 0x00007fd18908672c in QXcbUnixEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x562405007a10, flags=...) at /home/leszek/kde/src/Qt5/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:61
#31 0x00007fd18f5a8ebb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffdaa536930, flags=..., flags@entry=...) at ../../include/QtCore/../../../../../src/Qt5/qtbase/src/corelib/global/qflags.h:69
#32 0x00007fd18f5b0aec in QCoreApplication::exec() () at ../../include/QtCore/../../../../../src/Qt5/qtbase/src/corelib/global/qflags.h:121
#33 0x0000562403cd8701 in main(int, char**) (argc=3, argv=0x7ffdaa536ca8) at /home/leszek/kde/src/kwin/src/main_x11.cpp:482
[Inferior 1 (process 198635) detached]
Comment 4 Vlad Zahorodnii 2022-01-10 10:18:25 UTC

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