Bug 315528

Summary: KWin crashes when switching windows
Product: [Plasma] kwin Reporter: Rohan Garg <rohan>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: rohan
Priority: NOR Keywords: drkonqi
Version: git master   
Target Milestone: 4.11   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Hotfix

Description Rohan Garg 2013-02-20 17:38:35 UTC
Application: kwin_gles (4.10.00)
KDE Platform Version: 4.10.00
Qt Version: 4.8.5
Operating System: Linux 3.8.0-6-generic x86_64
Distribution: Ubuntu Raring Ringtail (development branch)

-- Information about the crash:
- What I was doing when the application crashed:
Trying to switch windows using Atl+Tab

- Unusual behavior I noticed:
KWin crashed when I try to use alt+tab, everything else works fine. Crash only happens when using compositing.

- Custom settings of the application:
Nothing apart from some custom shortcuts and the usual set of kwin plugins

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_gles), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f309f9e67c0 (LWP 8425))]

Thread 2 (Thread 0x7f3083e0a700 (LWP 8426)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007f30995e332f in QWaitConditionPrivate::wait (this=0x12bed40, time=30000) at thread/qwaitcondition_unix.cpp:84
#2  0x00007f30995e30f5 in QWaitCondition::wait (this=0x12becc0, mutex=0x12becb8, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f30995d0af9 in QThreadPoolThread::run (this=0x12bee20) at concurrent/qthreadpool.cpp:141
#4  0x00007f30995e1c92 in QThreadPrivate::start (arg=0x12bee20) at thread/qthread_unix.cpp:338
#5  0x00007f309932cf8e in start_thread (arg=0x7f3083e0a700) at pthread_create.c:311
#6  0x00007f309f173e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f309f9e67c0 (LWP 8425)):
[KCrash Handler]
#6  0x00007f309f0b1037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f309f0b4698 in __GI_abort () at abort.c:90
#8  0x00007f30995d44f7 in qt_message_output (msgType=QtFatalMsg, buf=0x193f348 "ASSERT: \"!isEmpty()\" in file /opt/project-neon/include/QtCore/qlist.h, line 284") at global/qglobal.cpp:2323
#9  0x00007f30995d4696 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f30997a1b68 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fff5b1c7f88) at global/qglobal.cpp:2369
#10 0x00007f30995d4e60 in qFatal (msg=0x7f30997a1b68 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2552
#11 0x00007f30995d40b0 in qt_assert (assertion=0x7f3082c6faab "!isEmpty()", file=0x7f3082c6fa60 "/opt/project-neon/include/QtCore/qlist.h", line=284) at global/qglobal.cpp:2018
#12 0x00007f3082bc4688 in QList<KWin::EffectWindow*>::last (this=0x1936a68) at /opt/project-neon/include/QtCore/qlist.h:284
#13 0x00007f3082c051b6 in KWin::SlideBackEffect::slotStackingOrderChanged (this=0x1936a40) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/effects/slideback/slideback.cpp:69
#14 0x00007f3082bacd20 in KWin::SlideBackEffect::qt_static_metacall (_o=0x1936a40, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fff5b1c81b0) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/obj-x86_64-linux-gnu/kwin/effects/moc_slideback.cpp:61
#15 0x00007f309973c03e in QMetaObject::activate (sender=0x16c03f0, m=0x7f309d7bd0a0 <KWin::EffectsHandler::staticMetaObject>, local_signal_index=33, argv=0x0) at kernel/qobject.cpp:3547
#16 0x00007f309d59ac75 in KWin::EffectsHandler::stackingOrderChanged (this=0x16c03f0) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/obj-x86_64-linux-gnu/kwin/libkwineffects/kwineffects.moc:683
#17 0x00007f309d5994ad in KWin::EffectsHandler::qt_static_metacall (_o=0x16c03f0, _c=QMetaObject::InvokeMetaMethod, _id=33, _a=0x7fff5b1c8390) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/obj-x86_64-linux-gnu/kwin/libkwineffects/kwineffects.moc:321
#18 0x00007f309973c03e in QMetaObject::activate (sender=0x13040e0, m=0x7f309f81dea0 <KWin::Workspace::staticMetaObject>, local_signal_index=17, argv=0x0) at kernel/qobject.cpp:3547
#19 0x00007f309f49530d in KWin::Workspace::stackingOrderChanged (this=0x13040e0) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/obj-x86_64-linux-gnu/kwin/workspace.moc:504
#20 0x00007f309f4c1db1 in KWin::Workspace::updateStackingOrder (this=0x13040e0, propagate_new_clients=false) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/layers.cpp:137
#21 0x00007f309f4c3ed9 in KWin::Workspace::blockStackingUpdates (this=0x13040e0, block=false) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/layers.cpp:654
#22 0x00007f309f4962a0 in KWin::StackingUpdatesBlocker::~StackingUpdatesBlocker (this=0x7fff5b1c84f0, __in_chrg=<optimized out>) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/workspace.h:755
#23 0x00007f309f4c2e26 in KWin::Workspace::raiseClient (this=0x13040e0, c=0x13f1780, nogroup=false) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/layers.cpp:391
#24 0x00007f309f4ecf5c in KWin::Workspace::activateClient (this=0x13040e0, c=0x13f1780, force=false) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/activation.cpp:285
#25 0x00007f309f582b2e in KWin::TabBox::TabBox::accept (this=0x1290ff0) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/tabbox/tabbox.cpp:1415
#26 0x00007f309f582d19 in KWin::TabBox::TabBox::keyRelease (this=0x1290ff0, ev=...) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/tabbox/tabbox.cpp:1469
#27 0x00007f309f4d0a9c in KWin::Workspace::workspaceEvent (this=0x13040e0, e=0x7fff5b1c8bd0) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/events.cpp:280
#28 0x00007f309f4c8ab4 in KWin::Application::x11EventFilter (this=0x7fff5b1c8f30, e=0x7fff5b1c8bd0) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/main.cpp:361
#29 0x00007f3098582359 in qt_x11EventFilter (ev=0x7fff5b1c8bd0) at kernel/qapplication_x11.cpp:435
#30 0x00007f30985920aa in QApplication::x11ProcessEvent (this=0x7fff5b1c8f30, event=0x7fff5b1c8bd0) at kernel/qapplication_x11.cpp:3352
#31 0x00007f30985d0948 in QEventDispatcherX11::processEvents (this=0x10d5ad0, flags=...) at kernel/qeventdispatcher_x11.cpp:132
#32 0x00007f309971a59c in QEventLoop::processEvents (this=0x7fff5b1c8d90, flags=...) at kernel/qeventloop.cpp:149
#33 0x00007f309971a730 in QEventLoop::exec (this=0x7fff5b1c8d90, flags=...) at kernel/qeventloop.cpp:204
#34 0x00007f309971d8da in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#35 0x00007f30984efffc in QApplication::exec () at kernel/qapplication.cpp:3823
#36 0x00007f309f4c9b57 in kdemain (argc=2, argv=0x7fff5b1c9088) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/kwin/main.cpp:536
#37 0x000000000040083e in main (argc=2, argv=0x7fff5b1c9088) at /build/buildd/project-neon-kde-workspace-2+git20130219+r47550/obj-x86_64-linux-gnu/kwin/kwin_gles_dummy.cpp:3

Possible duplicates by query: bug 313194, bug 313047, bug 311441, bug 310887, bug 307621.

Reported using DrKonqi
Comment 1 Thomas Lübking 2013-02-20 18:28:17 UTC
Created attachment 77469 [details]
Hotfix

The flags are only to marks a clear driver issue.

You run the current git master, not 4.10.
Attached is a patch to fix the issue (in two dimensions)

RR later, but if it compiles it will work ;-)
Comment 2 Rohan Garg 2013-02-20 18:55:32 UTC
Thanks Thomas!
The fix does work for me, no more crashes :)

PS: Yeah, I didn't know the flag was for driver issues and thought Dr. Konqui would have chosen the right version automagically.
Comment 3 Martin Flöser 2013-02-20 19:13:51 UTC
skip the review request :-)
Comment 4 Thomas Lübking 2013-03-05 19:19:28 UTC
Git commit 1b1afdf00f326d9145da14a84eb118433705036e by Thomas Lübking.
Committed on 20/02/2013 at 22:40.
Pushed by luebking into branch 'master'.

check list validity before taking last item

also block for tabboxes *around* stackorder changes

M  +2    -2    kwin/effects/slideback/slideback.cpp

http://commits.kde.org/kde-workspace/1b1afdf00f326d9145da14a84eb118433705036e