Bug 446318 - kwin_wayland crashes when I press alt+tab while the context menu of a window decoration is open
Summary: kwin_wayland crashes when I press alt+tab while the context menu of a window ...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: master
Platform: Neon Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2021-12-01 11:04 UTC by Patrick Silva
Modified: 2022-05-10 14:44 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.6


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-12-01 11:04:03 UTC
STEPS TO REPRODUCE
1. open two windows
2. right-click on the window decoration of any window, hover over 'More actions', press alt+tab
3. 

OBSERVED RESULT
kwin_wayland crashes and all running apps are aborted

EXPECTED RESULT
no crash

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.3
Graphics Platform: Wayland


Thread 9 (Thread 0x7f9d8d816700 (LWP 6146)):
#0  0x00007f9da4923aff in __GI___poll (fds=0x7f9d7c005240, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f9da2e9436e in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7f9d7c005240, timeout=<optimized out>, context=0x7f9d7c000c20) at ../../../glib/gmain.c:4346
#2  g_main_context_iterate (context=context@entry=0x7f9d7c000c20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4042
#3  0x00007f9da2e944a3 in g_main_context_iteration (context=0x7f9d7c000c20, may_block=may_block@entry=1) at ../../../glib/gmain.c:4108
#4  0x00007f9da527b602 in QEventDispatcherGlib::processEvents (this=0x7f9d7c000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00007f9da521f8ab in QEventLoop::exec (this=this@entry=0x7f9d8d815bc0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#6  0x00007f9da50392c2 in QThread::exec (this=this@entry=0x5563a9a09be0) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007f9da6903549 in QQmlThreadPrivate::run (this=0x5563a9a09be0) at qml/ftw/qqmlthread.cpp:155
#8  0x00007f9da503a45c in QThreadPrivate::start (arg=0x5563a9a09be0) at thread/qthread_unix.cpp:329
#9  0x00007f9da4e1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#10 0x00007f9da4930293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7f9d9d323700 (LWP 6141)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5563a973f868) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5563a973f818, cond=0x5563a973f840) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=cond@entry=0x5563a973f840, mutex=mutex@entry=0x5563a973f818) at pthread_cond_wait.c:647
#3  0x00007f9d9de91b1b in cnd_wait (mtx=0x5563a973f818, cond=0x5563a973f840) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x5563a9740b80) at ../src/util/u_queue.c:294
#5  0x00007f9d9de9171b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#6  0x00007f9da4e1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f9da4930293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7f9d8e40a700 (LWP 8118)):
#0  0x00007f9da49305ce in epoll_wait (epfd=86, events=events@entry=0x7f9d8e4097f0, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1  0x00007f9d8c09b27b in impl_pollfd_wait (object=<optimized out>, pfd=<optimized out>, ev=0x7f9d8e4099a0, n_ev=<optimized out>, timeout=<optimized out>) at ../spa/plugins/support/system.c:155
#2  0x00007f9d8c08d6f4 in loop_iterate (object=0x5563aaa6f108, timeout=-1) at ../spa/plugins/support/loop.c:316
#3  0x00007f9da4d760e0 in do_loop (user_data=0x5563aa886e30) at ../src/pipewire/data-loop.c:80
#4  0x00007f9da4e1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#5  0x00007f9da4930293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7f9d9cb22700 (LWP 6142)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5563a973f868) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5563a973f818, cond=0x5563a973f840) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=cond@entry=0x5563a973f840, mutex=mutex@entry=0x5563a973f818) at pthread_cond_wait.c:647
#3  0x00007f9d9de91b1b in cnd_wait (mtx=0x5563a973f818, cond=0x5563a973f840) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x5563a9740db0) at ../src/util/u_queue.c:294
#5  0x00007f9d9de9171b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#6  0x00007f9da4e1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f9da4930293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f9d9db24700 (LWP 6140)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5563a973f868) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5563a973f818, cond=0x5563a973f840) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=cond@entry=0x5563a973f840, mutex=mutex@entry=0x5563a973f818) at pthread_cond_wait.c:647
#3  0x00007f9d9de91b1b in cnd_wait (mtx=0x5563a973f818, cond=0x5563a973f840) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x5563a9740950) at ../src/util/u_queue.c:294
#5  0x00007f9d9de9171b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#6  0x00007f9da4e1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f9da4930293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f9d8ffff700 (LWP 6143)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5563a973f868) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5563a973f818, cond=0x5563a973f840) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=cond@entry=0x5563a973f840, mutex=mutex@entry=0x5563a973f818) at pthread_cond_wait.c:647
#3  0x00007f9d9de91b1b in cnd_wait (mtx=0x5563a973f818, cond=0x5563a973f840) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x5563a9740df0) at ../src/util/u_queue.c:294
#5  0x00007f9d9de9171b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#6  0x00007f9da4e1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f9da4930293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f9d8f7fe700 (LWP 6144)):
#0  0x00007f9da4923aff in __GI___poll (fds=0x7f9d84005240, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f9da2e9436e in g_main_context_poll (priority=<optimized out>, n_fds=2, fds=0x7f9d84005240, timeout=<optimized out>, context=0x7f9d84000c20) at ../../../glib/gmain.c:4346
#2  g_main_context_iterate (context=context@entry=0x7f9d84000c20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4042
#3  0x00007f9da2e944a3 in g_main_context_iteration (context=0x7f9d84000c20, may_block=may_block@entry=1) at ../../../glib/gmain.c:4108
#4  0x00007f9da527b602 in QEventDispatcherGlib::processEvents (this=0x7f9d84000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00007f9da521f8ab in QEventLoop::exec (this=this@entry=0x7f9d8f7fdbe0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#6  0x00007f9da50392c2 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007f9da503a45c in QThreadPrivate::start (arg=0x5563a9742550) at thread/qthread_unix.cpp:329
#8  0x00007f9da4e1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007f9da4930293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f9d9f459700 (LWP 6139)):
#0  0x00007f9da4923aff in __GI___poll (fds=0x7f9d980053c0, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f9da2e9436e in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x7f9d980053c0, timeout=<optimized out>, context=0x7f9d98001ce0) at ../../../glib/gmain.c:4346
#2  g_main_context_iterate (context=context@entry=0x7f9d98001ce0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4042
#3  0x00007f9da2e944a3 in g_main_context_iteration (context=0x7f9d98001ce0, may_block=may_block@entry=1) at ../../../glib/gmain.c:4108
#4  0x00007f9da527b602 in QEventDispatcherGlib::processEvents (this=0x7f9d98000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00007f9da521f8ab in QEventLoop::exec (this=this@entry=0x7f9d9f458bb0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#6  0x00007f9da50392c2 in QThread::exec (this=this@entry=0x7f9da786cd80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007f9da77e8f4b in QDBusConnectionManager::run (this=0x7f9da786cd80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:179
#8  0x00007f9da503a45c in QThreadPrivate::start (arg=0x7f9da786cd80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:329
#9  0x00007f9da4e1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#10 0x00007f9da4930293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f9da0109680 (LWP 6138)):
#0  0x00007f9da76d6b03 in KWin::TabBox::TabBox::<lambda(KWin::Toplevel*)>::operator() (__closure=<optimized out>, toplevel=0x5563aaa79030) at ./src/tabbox/tabbox.cpp:1025
#1  std::_Function_handler<void(KWin::AbstractClient*), KWin::TabBox::TabBox::navigatingThroughWindows(bool, const QKeySequence&, KWin::TabBoxMode)::<lambda(KWin::Toplevel*)> >::_M_invoke(const std::_Any_data &, KWin::AbstractClient *&&) (__functor=..., __args#0=@0x7ffe86f42498: 0x5563aaa79030) at /usr/include/c++/9/bits/std_function.h:300
#2  0x00007f9da7654d11 in std::function<void (KWin::AbstractClient*)>::operator()(KWin::AbstractClient*) const (__args#0=<optimized out>, this=0x7ffe86f424c0) at /usr/include/c++/9/bits/std_function.h:683
#3  std::for_each<QList<KWin::InternalClient*>::const_iterator, std::function<void (KWin::AbstractClient*)> >(QList<KWin::InternalClient*>::const_iterator, QList<KWin::InternalClient*>::const_iterator, std::function<void (KWin::AbstractClient*)>) (__f=..., __last=..., __first=...) at /usr/include/c++/9/bits/stl_algo.h:3876
#4  KWin::Workspace::forEachAbstractClient(std::function<void (KWin::AbstractClient*)>) (this=<optimized out>, func=...) at ./src/workspace.cpp:1861
#5  0x00007f9da76dd9de in KWin::TabBox::TabBox::navigatingThroughWindows (mode=KWin::TabBoxWindowsMode, shortcut=..., forward=<optimized out>, this=0x5563a9903860) at /usr/include/c++/9/new:174
#6  KWin::TabBox::TabBox::navigatingThroughWindows (this=0x5563a9903860, forward=<optimized out>, shortcut=..., mode=KWin::TabBoxWindowsMode) at ./src/tabbox/tabbox.cpp:1013
#7  0x00007f9da5257dce in QtPrivate::QSlotObjectBase::call (a=0x7ffe86f426a0, r=0x5563a9903860, this=0x5563a9a31b60) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#8  doActivate<false> (sender=0x5563a9967180, signal_index=4, argv=0x7ffe86f426a0) at kernel/qobject.cpp:3886
#9  0x00007f9da5251197 in QMetaObject::activate (sender=sender@entry=0x5563a9967180, m=m@entry=0x7f9da62551c0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffe86f426a0) at kernel/qobject.cpp:3946
#10 0x00007f9da5d3d8e6 in QAction::triggered (this=this@entry=0x5563a9967180, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#11 0x00007f9da5d3ffb8 in QAction::activate (this=0x5563a9967180, event=<optimized out>) at kernel/qaction.cpp:1161
#12 0x00007f9da64bb877 in ?? () from /lib/x86_64-linux-gnu/libKF5GlobalAccel.so.5
#13 0x00007f9da5257dce in QtPrivate::QSlotObjectBase::call (a=0x7ffe86f428a0, r=0x7f9da64d2600, this=0x5563a99c7d40) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#14 doActivate<false> (sender=0x5563a9b85da0, signal_index=3, argv=0x7ffe86f428a0) at kernel/qobject.cpp:3886
#15 0x00007f9da64c9bae in ?? () from /lib/x86_64-linux-gnu/libKF5GlobalAccel.so.5
#16 0x00007f9da64ca8c3 in ?? () from /lib/x86_64-linux-gnu/libKF5GlobalAccel.so.5
#17 0x00007f9da77f555b in QDBusConnectionPrivate::deliverCall (this=<optimized out>, object=<optimized out>, msg=..., metaTypes=..., slotIdx=<optimized out>) at qdbusintegrator.cpp:1001
#18 0x00007f9da524e949 in QObject::event (this=0x5563a9b85da0, e=0x7f9d98016f40) at kernel/qobject.cpp:1314
#19 0x00007f9da5d43dc3 in QApplicationPrivate::notify_helper (this=this@entry=0x5563a9598e40, receiver=receiver@entry=0x5563a9b85da0, e=e@entry=0x7f9d98016f40) at kernel/qapplication.cpp:3632
#20 0x00007f9da5d4cbb8 in QApplication::notify (this=0x7ffe86f43210, receiver=0x5563a9b85da0, e=0x7f9d98016f40) at kernel/qapplication.cpp:3156
#21 0x00007f9da5220daa in QCoreApplication::notifyInternal2 (receiver=0x5563a9b85da0, event=0x7f9d98016f40) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:325
#22 0x00007f9da52236b1 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5563a95713f0) at kernel/qcoreapplication.cpp:1821
#23 0x00007f9da527899e in QEventDispatcherUNIX::processEvents (this=0x5563a95ae760, flags=...) at kernel/qeventdispatcher_unix.cpp:468
#24 0x00005563a8c9e671 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
#25 0x00007f9da521f8ab in QEventLoop::exec (this=this@entry=0x7ffe86f42f70, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#26 0x00007f9da5227a64 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#27 0x00005563a8b7be51 in main (argc=<optimized out>, argv=<optimized out>) at ./src/main_wayland.cpp:737
Comment 1 Bug Janitor Service 2021-12-01 11:35:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1742
Comment 2 Patrick Silva 2022-01-14 16:37:43 UTC
Can reproduce with Plasma 5.24 beta on Arch Linux.
Comment 3 maringrly69 2022-03-04 03:22:37 UTC
Can confirm on 5.24.2
Comment 4 rainer 2022-04-08 19:03:25 UTC
Today reproduced on 5.24.4, Frameworks 5.92.0, Qt 5.15.2 (openSuse Tumbleweed)
Comment 5 Zamundaaa 2022-05-10 12:06:39 UTC
Git commit 94b0ca814688bf3622aa53f4d4d26f97d8de7306 by Xaver Hugl.
Committed on 10/05/2022 at 11:07.
Pushed by zamundaaa into branch 'master'.

tabbox: don't dismiss popups

The glitches that dismissing popups was supposed to prevent are apparently
no longer present.

M  +0    -5    src/tabbox/tabbox.cpp

https://invent.kde.org/plasma/kwin/commit/94b0ca814688bf3622aa53f4d4d26f97d8de7306
Comment 6 Zamundaaa 2022-05-10 12:11:03 UTC
Git commit f7b1edc79e9526fe6bad69a8ad475a5d77e5aead by Xaver Hugl.
Committed on 10/05/2022 at 12:10.
Pushed by zamundaaa into branch 'Plasma/5.24'.

tabbox: don't dismiss popups

The glitches that dismissing popups was supposed to prevent are apparently
no longer present.
(cherry picked from commit 94b0ca814688bf3622aa53f4d4d26f97d8de7306)

M  +0    -4    src/tabbox/tabbox.cpp

https://invent.kde.org/plasma/kwin/commit/f7b1edc79e9526fe6bad69a8ad475a5d77e5aead