Bug 154486 - Plasma crashes on screen resize (RandR 1.1, inside NX session)
Summary: Plasma crashes on screen resize (RandR 1.1, inside NX session)
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-22 18:09 UTC by Josh Berry
Modified: 2007-12-27 15:16 UTC (History)
0 users

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 Josh Berry 2007-12-22 18:09:19 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.2 
OS:                Linux

I am using FreeNX and the NoMachine NX client to experiment with accessing KDE4 sessions remotely.

NX uses RandR 1.1 (as reported by xrandr --version).  I am running r751543 of kdelibs/kdebase.

When I resize my NXclient window (that is, when I change the display size), plasma crashes with the following backtrace:

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0x2b4b59d70880 (LWP 31079)]
[New Thread 0x40800950 (LWP 31083)]
[KCrash handler]
#5  QGraphicsView::mapToScene (this=0x0, point=@0x7fff59566840)
    at /home/des/Code/kde/qt-copy/src/gui/graphicsview/qgraphicsview.h:258
#6  0x00002b4b562fda36 in QGraphicsView::mapToScene (this=0x0, 
    rect=@0x7fff59566960)
    at /home/des/Code/kde/qt-copy/src/gui/graphicsview/qgraphicsview.cpp:1995
#7  0x00002b4b51a5eaf7 in Plasma::Widget::mapFromView (this=0x85d0c0, 
    view=0x0, rect=@0x7fff59566960)
    at /home/des/Code/kde/kdebase/workspace/libs/plasma/widgets/widget.cpp:105
#8  0x00002aaab044bd7b in SystemTray::contentSizeHint (this=0x85d0c0)
    at /home/des/Code/kde/kdebase/workspace/plasma/applets/systemtray/systemtray.cpp:45
#9  0x00002b4b519ff992 in Plasma::Applet::sizeHint (this=0x85d0c0)
    at /home/des/Code/kde/kdebase/workspace/libs/plasma/applet.cpp:810
#10 0x00002b4b51a34bdc in Plasma::BoxLayout::Private::calculateSize<double const&> (this=0x816650, sizeType=Plasma::BoxLayout::Private::HintSize, 
    dir=Qt::Vertical, 
    op=0x2b4b51a03680 <double const& qMax<double>(double const&, double const&)>)
    at /home/des/Code/kde/kdebase/workspace/libs/plasma/layouts/boxlayout.cpp:200
#11 0x00002b4b51a34d13 in Plasma::BoxLayout::Private::calculateSize (
    this=0x816650, calculateSizeType=Plasma::BoxLayout::Private::HintSize)
    at /home/des/Code/kde/kdebase/workspace/libs/plasma/layouts/boxlayout.cpp:226
#12 0x00002b4b51a32df0 in Plasma::BoxLayout::sizeHint (this=0x7be6b0)
    at /home/des/Code/kde/kdebase/workspace/libs/plasma/layouts/boxlayout.cpp:462
#13 0x00002b4b519ff82f in Plasma::Applet::contentSizeHint (this=0x86b2f0)
    at /home/des/Code/kde/kdebase/workspace/libs/plasma/applet.cpp:961
#14 0x00002b4b519ff992 in Plasma::Applet::sizeHint (this=0x86b2f0)
    at /home/des/Code/kde/kdebase/workspace/libs/plasma/applet.cpp:810
#15 0x00002b4b51a5defc in Plasma::Widget::updateGeometry (this=0x86b2f0)
    at /home/des/Code/kde/kdebase/workspace/libs/plasma/widgets/widget.cpp:287
#16 0x00002b4b51a5cde3 in Plasma::Widget::setMaximumSize (this=0x86b2f0, 
    size=@0x7fff59566ec0)
    at /home/des/Code/kde/kdebase/workspace/libs/plasma/widgets/widget.cpp:205
#17 0x00002aaaaf640f17 in Panel::constraintsUpdated (this=0x86b2f0, 
    constraints=@0x7fff595671c0)
    at /home/des/Code/kde/kdebase/workspace/plasma/containments/panel/panel.cpp:69
#18 0x00002b4b51a00452 in Plasma::Applet::flushUpdatedConstraints (
    this=0x86b2f0)
    at /home/des/Code/kde/kdebase/workspace/libs/plasma/applet.cpp:769
#19 0x00002b4b51a01843 in Plasma::Applet::qt_metacall (this=0x86b2f0, 
    _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff595677d0)
    at /home/des/Code/kde/build/kdebase/workspace/libs/plasma/applet.moc:105
#20 0x00002b4b51a248d3 in Plasma::Containment::qt_metacall (this=0x86b2f0, 
    _c=QMetaObject::InvokeMetaMethod, _id=14, _a=0x7fff595677d0)
    at /home/des/Code/kde/build/kdebase/workspace/libs/plasma/containment.moc:86
#21 0x00002aaaaf63f6f3 in Panel::qt_metacall (this=0x86b2f0, 
    _c=QMetaObject::InvokeMetaMethod, _id=14, _a=0x7fff595677d0)
    at /home/des/Code/kde/build/kdebase/workspace/plasma/containments/panel/panel.moc:58
#22 0x00002b4b553d86cc in QMetaObject::activate (sender=0xbaa050, 
    from_signal_index=4, to_signal_index=4, argv=0x7fff59566960)
    at /home/des/Code/kde/qt-copy/src/corelib/kernel/qobject.cpp:3087
#23 0x00002b4b553dd767 in QSingleShotTimer::timerEvent (this=0xbaa050)
    at /home/des/Code/kde/qt-copy/src/corelib/kernel/qtimer.cpp:296
#24 0x00002b4b553d6028 in QObject::event (this=0xbaa050, e=0x7fff59566960)
    at /home/des/Code/kde/qt-copy/src/corelib/kernel/qobject.cpp:1095
#25 0x00002b4b55ef19d2 in QApplicationPrivate::notify_helper (this=0x63c870, 
    receiver=0xbaa050, e=0x7fff59567e30)
    at /home/des/Code/kde/qt-copy/src/gui/kernel/qapplication.cpp:3556
#26 0x00002b4b55ef75af in QApplication::notify (this=0x61fb10, 
    receiver=0xbaa050, e=0x7fff59567e30)
    at /home/des/Code/kde/qt-copy/src/gui/kernel/qapplication.cpp:3497
#27 0x00002b4b52a5ddb2 in KApplication::notify (this=0x61fb10, 
    receiver=0xbaa050, event=0x7fff59567e30)
    at /home/des/Code/kde/kdelibs/kdeui/kernel/kapplication.cpp:319
#28 0x00002b4b553c99be in QCoreApplication::notifyInternal (this=0x61fb10, 
    receiver=0xbaa050, event=0x7fff59567e30)
    at /home/des/Code/kde/qt-copy/src/corelib/kernel/qcoreapplication.cpp:530
#29 0x00002b4b553e78d5 in QTimerInfoList::activateTimers (this=0x640320)
    at ../../include/QtCore/../../../../qt-copy/src/corelib/kernel/qcoreapplication.h:200
#30 0x00002b4b553e57ab in timerSourceDispatch (source=<value optimized out>)
    at /home/des/Code/kde/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:155
#31 0x00002b4b58eec682 in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#32 0x00002b4b58eecee5 in ?? () from /usr/lib/libglib-2.0.so.0
#33 0x00002b4b58eed407 in g_main_context_iteration ()
   from /usr/lib/libglib-2.0.so.0
#34 0x00002b4b553e5b9b in QEventDispatcherGlib::processEvents (this=0x63c1e0, 
    flags=<value optimized out>)
    at /home/des/Code/kde/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:338
#35 0x00002b4b55f580a4 in QGuiEventDispatcherGlib::processEvents (this=0x0, 
    flags=<value optimized out>)
    at /home/des/Code/kde/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:191
#36 0x00002b4b553c913c in QEventLoop::processEvents (
    this=<value optimized out>, flags=<value optimized out>)
    at /home/des/Code/kde/qt-copy/src/corelib/kernel/qeventloop.cpp:140
#37 0x00002b4b553c9225 in QEventLoop::exec (this=0x7fff595680b0, 
    flags=@0x7fff595680c0)
    at /home/des/Code/kde/qt-copy/src/corelib/kernel/qeventloop.cpp:182
#38 0x00002b4b553cb3d7 in QCoreApplication::exec ()
    at /home/des/Code/kde/qt-copy/src/corelib/kernel/qcoreapplication.cpp:759
#39 0x00002b4b517675af in kdemain (argc=1, argv=0x7fff59568438)
    at /home/des/Code/kde/kdebase/workspace/plasma/plasma/main.cpp:54
#40 0x000000000040097b in main (argc=1, argv=0x7fff59568438)
    at /home/des/Code/kde/build/kdebase/workspace/plasma/plasma/plasma-qgv_dummy.cpp:3
#0  0x00002b4b5796cc41 in nanosleep () from /lib64/libc.so.6
Comment 1 Chani 2007-12-23 07:18:45 UTC
SVN commit 751884 by chani:

don't crash if view() is null
is there something better we can return in this situation?
BUG: 154486


 M  +3 -2      systemtray.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=751884
Comment 2 Jason Stubbs 2007-12-23 08:00:41 UTC
Hmm.. is the panel being destroyed and recreated on a screen resize? That's about the only case where view() could be null. Your fix is the only way I could see to work around it too.
Comment 3 Aaron J. Seigo 2007-12-27 15:16:14 UTC
scene() is *never* guaranteed to be valid and must always be checked before usage. the fix is correct.