Bug 179978 - Logout, shutdown or restart buttons don't ask for confirmation and cause immediate logout
Summary: Logout, shutdown or restart buttons don't ask for confirmation and cause imme...
Status: RESOLVED FIXED
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Lubos Lunak
URL:
Keywords:
: 180965 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-08 00:15 UTC by Ambroz Bizjak
Modified: 2009-01-27 07:49 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace (9.39 KB, text/plain)
2009-01-09 14:52 UTC, Ambroz Bizjak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ambroz Bizjak 2009-01-08 00:15:32 UTC
Version:            (using Devel)
Compiler:          gcc (GCC) 4.2.4 (Gentoo 4.2.4 p1.0) 
OS:                Linux
Installed from:    Compiled sources

When I click on "Logout", "Shutdown" or "Restart" in Kickoff, I get logged out and thrown to the login screen immediately, without any confirmation, and it doesn't shutdown or restart if such an action was selected. This also happens when run in Xephyr so it's not X crashing. It started happening about two weeks ago. KDE 4.1 works fine.
Comment 1 Dario Andres 2009-01-09 12:50:36 UTC
What KDE version (or SVN revision) are you using?
Here using:

Qt: 4.4.3 + qt-copy-patches-889120
KDE: 4.2.60 (KDE 4.2.60 (KDE 4.3 >= 20090106))
kdelibs svn rev. 908156 / kdebase svn rev. 908156
on ArchLinux x86_64 - Kernel 2.6.27.10

I'm also getting a crash of ksmserver. The all session is closed immediatly after pressing Logout. No dialog appears.
I also managed to get a backtrace of the crash, but I don't know if post it as it may be another bug.
Comment 2 Dario Andres 2009-01-09 13:19:12 UTC
Backtrace:

Application: The KDE Session Manager (ksmserver), signal SIGFPE
0x00007f201b7ba001 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 17326)]

Thread 2 (Thread 0x7f2013364950 (LWP 17331)):
#0  0x00007f201b7e3d02 in select () from /lib/libc.so.6
#1  0x00007f201eb0f035 in QProcessManager::run (this=0x2620ab0) at io/qprocess_unix.cpp:301
#2  0x00007f201ea4df99 in QThreadPrivate::start (arg=0x2620ab0) at thread/qthread_unix.cpp:185
#3  0x00007f201e7dafc7 in start_thread () from /lib/libpthread.so.0
#4  0x00007f201b7ea5dd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f2020d66760 (LWP 17326)):
[KCrash Handler]
#5  0x00007f201dab55e8 in QPainter::drawTiledPixmap (this=0x7fff28eaa480, r=@0x7fff28ea9e70, pixmap=@0x7fff28eaa0d0, sp=@0x7fff28ea9e90) at painting/qpainter.cpp:5583
#6  0x00007f2020764b25 in QPainter::drawTiledPixmap (this=0x27446b0, rect=<value optimized out>, pm=@0x0, offset=<value optimized out>) at /usr/include/QtGui/qpainter.h:725
#7  0x00007f202076326c in Plasma::FrameSvgPrivate::generateBackground (this=0x268f3d0, frame=0x268f690) at /home/kde-devel/kde/src/KDE/kdelibs/plasma/framesvg.cpp:605
#8  0x00007f20207634d7 in Plasma::FrameSvg::paintFrame (this=0x2681870, painter=0x7fff28eaa880, pos=@0x7fff28eaa7f0) at /home/kde-devel/kde/src/KDE/kdelibs/plasma/framesvg.cpp:446
#9  0x00007f2020a74151 in KSMShutdownDlg::paintEvent (this=0x268bd90, e=<value optimized out>) at /home/kde-devel/kde/src/KDE/kdebase/workspace/ksmserver/shutdowndlg.cpp:554
#10 0x00007f201da15aa6 in QWidget::event (this=0x268bd90, event=0x7fff28eaaef0) at kernel/qwidget.cpp:7301
#11 0x00007f201d9c30ad in QApplicationPrivate::notify_helper (this=0x2619980, receiver=0x268bd90, e=0x7fff28eaaef0) at kernel/qapplication.cpp:3803
#12 0x00007f201d9ca40e in QApplication::notify (this=0x2618d00, receiver=0x268bd90, e=0x7fff28eaaef0) at kernel/qapplication.cpp:3768
#13 0x00007f201f94c59b in KApplication::notify (this=0x2618d00, receiver=0x268bd90, event=0x7fff28eaaef0) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#14 0x00007f201eb2bd90 in QCoreApplication::notifyInternal (this=0x2618d00, receiver=0x268bd90, event=0x7fff28eaaef0) at kernel/qcoreapplication.cpp:583
#15 0x00007f201da120fb in QWidgetPrivate::drawWidget (this=0x268ee50, pdev=0x268c698, rgn=@0x7fff28eab1d0, offset=@0x268c798, flags=5, sharedPainter=0x2845920) at kernel/qwidget.cpp:4636
#16 0x00007f201db640b5 in QWidgetBackingStore::cleanRegion (this=0x268c780, rgn=@0x7fff28eab220, widget=0x268bd90, recursiveCopyToScreen=true) at painting/qbackingstore.cpp:1039
#17 0x00007f201db65e99 in qt_syncBackingStore (rgn=<value optimized out>, widget=0x268bd90) at painting/qbackingstore.cpp:239
#18 0x00007f201da1d0c8 in QETWidget::translatePaintEvent (this=0x268bd90, event=<value optimized out>) at kernel/qapplication_x11.cpp:4630
#19 0x00007f201da267cb in QApplication::x11ProcessEvent (this=0x2618d00, event=0x7fff28eabb10) at kernel/qapplication_x11.cpp:3062
#20 0x00007f201da4b724 in x11EventSourceDispatch (s=0x2620780, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:142
#21 0x00007f2017610aa2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0x00007f201761421d in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#23 0x00007f20176143db in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#24 0x00007f201eb52cdf in QEventDispatcherGlib::processEvents (this=0x25e85d0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:319
#25 0x00007f201da4af7f in QGuiEventDispatcherGlib::processEvents (this=0x27446b0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:198
#26 0x00007f201eb2a9c2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 686472704}) at kernel/qeventloop.cpp:143
#27 0x00007f201eb2ab55 in QEventLoop::exec (this=0x7fff28eabe50, flags={i = 686472816}) at kernel/qeventloop.cpp:190
#28 0x00007f201ddb8ecf in QDialog::exec (this=0x268bd90) at dialogs/qdialog.cpp:447
#29 0x00007f2020a761e6 in KSMShutdownDlg::confirmShutdown (maysd=<value optimized out>, sdtype=@0x7fff28eabf1c, bootOption=@0x7fff28eabff0)
    at /home/kde-devel/kde/src/KDE/kdebase/workspace/ksmserver/shutdowndlg.cpp:661
#30 0x00007f2020a806c6 in KSMServer::shutdown (this=0x26cca40, confirm=KWorkSpace::ShutdownConfirmNo, sdtype=KWorkSpace::ShutdownTypeNone, sdmode=KWorkSpace::ShutdownModeInteractive)
    at /home/kde-devel/kde/src/KDE/kdebase/workspace/ksmserver/shutdown.cpp:149
#31 0x00007f2020a88cbb in KSMServerInterfaceAdaptor::qt_metacall (this=0x26cc7c0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff28eac190)
    at /home/kde-devel/kde/build/KDE/kdebase/workspace/ksmserver/ksmserverinterfaceadaptor.cpp:51
#32 0x00007f201ee1b7eb in QDBusConnectionPrivate::deliverCall (this=0x2656b90, object=0x26cc7c0, msg=@0x2754010, metaTypes=@0x7fff28eac488, slotIdx=6) at qdbusintegrator.cpp:849
#33 0x00007f201ee1c91a in QDBusConnectionPrivate::activateCall (this=0x2656b90, object=0x26cc7c0, flags=273, msg=@0x2754010) at qdbusintegrator.cpp:754
#34 0x00007f201ee1cef5 in QDBusConnectionPrivate::activateObject (this=0x2656b90, node=@0x2753fe8, msg=@0x2754010, pathStartPos=<value optimized out>) at qdbusintegrator.cpp:1283
#35 0x00007f201ee1d1d8 in QDBusActivateObjectEvent::placeMetaCall (this=0x2753fa0) at qdbusintegrator.cpp:1400
#36 0x00007f201eb3ac6e in QObject::event (this=0x26cca40, e=0x2753fa0) at kernel/qobject.cpp:1152
#37 0x00007f201d9c30ad in QApplicationPrivate::notify_helper (this=0x2619980, receiver=0x26cca40, e=0x2753fa0) at kernel/qapplication.cpp:3803
#38 0x00007f201d9ca40e in QApplication::notify (this=0x2618d00, receiver=0x26cca40, e=0x2753fa0) at kernel/qapplication.cpp:3768
#39 0x00007f201f94c59b in KApplication::notify (this=0x2618d00, receiver=0x26cca40, event=0x2753fa0) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#40 0x00007f201eb2bd90 in QCoreApplication::notifyInternal (this=0x2618d00, receiver=0x26cca40, event=0x2753fa0) at kernel/qcoreapplication.cpp:583
#41 0x00007f201eb2f643 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x25db060) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#42 0x00007f201eb52fa3 in postEventSourceDispatch (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:214
#43 0x00007f2017610aa2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#44 0x00007f201761421d in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#45 0x00007f20176143db in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#46 0x00007f201eb52cdf in QEventDispatcherGlib::processEvents (this=0x25e85d0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:319
#47 0x00007f201da4af7f in QGuiEventDispatcherGlib::processEvents (this=0x27446b0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:198
#48 0x00007f201eb2a9c2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 686477136}) at kernel/qeventloop.cpp:143
#49 0x00007f201eb2ab55 in QEventLoop::exec (this=0x7fff28eacf90, flags={i = 686477216}) at kernel/qeventloop.cpp:190
#50 0x00007f201eb2f8f7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#51 0x00007f2020a6b415 in kdemain (argc=1, argv=0x7fff28ead548) at /home/kde-devel/kde/src/KDE/kdebase/workspace/ksmserver/main.cpp:322
#52 0x00007f201b739546 in __libc_start_main () from /lib/libc.so.6
#53 0x00000000004007f9 in _start ()

Comment 3 Ambroz Bizjak 2009-01-09 14:52:54 UTC
Created attachment 30051 [details]
backtrace

I attached to ksmserver with gdb and pressed "Restart". ksmserver crashed, this is the backtrace.
Comment 4 Dario Andres 2009-01-09 14:57:13 UTC
Indeed, your backtrace is the same as mine, so it's the same crash
Comment 5 Dario Andres 2009-01-09 15:18:26 UTC
The use of Plasma::FrameSVG was introduced by svn rev. 903899. I don't know if this may be caused by a plasma/plasmasvg bug.
@Aaron: sorry for bothering you, what do you think ?
Comment 6 Richard Hartmann 2009-01-10 00:11:03 UTC
It's worth noting that this does not affect everyone.

Three confirmed cases for Debian's KDE 4.1.96 packages. fabo, Richih and trigger on IRC
Comment 7 Roman Jarosz 2009-01-10 19:17:20 UTC
I see the same thing in KDE 4.2 branch and it make Kopete crash. I've debugged the crash and Kopete crashes because K_GLOBAL_STATIC are destroyed immediately even before the deref() are called or anything else is done (almost like a Kopete kill)
Comment 8 Dario Andres 2009-01-10 19:25:38 UTC
I have discovered something:

If you change your plasma theme to "Elegance" (or "Air" or maybe another non-Oxyhen), and restart the KDE session (to the change to take effect in the KSMServer logout dialog), the crash is gone and the Logout/Shutdown dialog is shown OK.

Can anyone else confirm this ?
Comment 9 Fathi Boudra 2009-01-10 19:42:27 UTC
I can confirm: switching to another theme (Aya as an example), ksmserver doesn't crash and Logout/Shutdown dialog is shown OK.
Comment 10 Ambroz Bizjak 2009-01-10 20:20:27 UTC
I also confirm, it doesn't crash with Aya.
Comment 11 Roman Jarosz 2009-01-10 21:06:43 UTC
framesvg.cpp line 598: QPixmap right(frame->rightWidth, leftHeight);
the frame->rightWidth is 0 in framesvg.cpp:598 when it crashes.
The leftHeight is 8.
Comment 12 Alex Merry 2009-01-11 18:28:58 UTC
Now, this partly a Qt bug (patch in qt-copy, and Trolltech notified via the Task Tracker).  But I've also put in a fix in libplasma (r909140).
Comment 13 Alex Merry 2009-01-11 18:37:29 UTC
SVN commit 909478 by alexmerry:

Backport r909140: fix a crash (appearing in KSMServer) which is partly a Qt bug and partly an odd SVG.

Basically, don't try creating and drawing on a pixmap if we know it will be null in advance.

CCBUG: 179978



 M  +8 -4      framesvg.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=909478
Comment 14 Richard Hartmann 2009-01-11 22:45:12 UTC
Thanks!
Comment 15 Richard Hartmann 2009-01-11 22:50:09 UTC
PS: Wouldn't make it sense to throw an error when detecting SVG which are broken that way? It would help GFX people and result in cleaner themes.
Comment 16 Dario Andres 2009-01-16 01:52:54 UTC
*** Bug 180896 has been marked as a duplicate of this bug. ***
Comment 17 Thomas Rehn 2009-01-16 20:12:24 UTC
*** Bug 181004 has been marked as a duplicate of this bug. ***
Comment 18 Aaron J. Seigo 2009-01-16 20:30:47 UTC
*** Bug 180965 has been marked as a duplicate of this bug. ***
Comment 19 Ravi Arora 2009-01-27 07:49:55 UTC
@ Fathi Boudra

Yes, changing to Aya makes it not to crash.

P.S.: And Aya is a good theme :-) thanks