Fixing krunner's threading

Thiago Macieira thiago at kde.org
Wed Mar 3 12:13:50 CET 2010


Em Terça-feira 02 Março 2010, às 15:49:18, Thiago Macieira escreveu:
> I'm actually raising the bar here.
> 
> I'm turning on QT_FATAL_WARNINGS by default in Qt debug builds (starting
> with  Qt 4.7).

After suggesting this to Qt developers, the overwhelming reaction was against 
it.

So there will be no QT_FATAL_WARNINGS enabled by default in Qt.

But, as promised, here are the stack traces of the Plasma warnings (the 
krunner ones are known: the use of KIO outside the main thread).

(kdelibs r1098145, kdebase r1098199)

-------------- Message: -------------- 
	QDBusObjectPath: invalid path ""

Partial backtrace:
#3  0xb6118058 in QDBusObjectPath::check (this=0xbfffe4ec) at 
/home/tmacieir/src/troll/qt-4.7/src/dbus/qdbusextratypes.cpp:50
#4  0xb71cb638 in QDBusObjectPath::operator= (this=0xbfffe4ec, _path=...)
    at 
/home/tmacieir/obj/troll/qt-4.6/include/QtDBus/../../../../../src/troll/qt-4.6/src/dbus/qdbusextratypes.h:92
#5  0xb71ccd60 in QDBusReply<QDBusObjectPath>::operator= (this=0xbfffe4dc, 
reply=...)
    at 
/home/tmacieir/obj/troll/qt-4.6/include/QtDBus/../../../../../src/troll/qt-4.6/src/dbus/qdbusreply.h:75
#6  0xb71cca24 in QDBusReply<QDBusObjectPath>::operator= (this=0xbfffe4dc, 
pcall=...)
    at 
/home/tmacieir/obj/troll/qt-4.6/include/QtDBus/../../../../../src/troll/qt-4.6/src/dbus/qdbusreply.h:87
#7  0xb71cc47c in QDBusReply<QDBusObjectPath>::QDBusReply (this=0xbfffe4dc, 
reply=...)
    at 
/home/tmacieir/obj/troll/qt-4.6/include/QtDBus/../../../../../src/troll/qt-4.6/src/dbus/qdbusreply.h:91
#8  0xb722cda9 in getComponent (componentUnique=...) at 
/home/tmacieir/src/kde4/KDE/kdelibs/kdeui/shortcuts/kglobalaccel.cpp:60

Reason: in the frame 8 above, we have:
60          QDBusReply<QDBusObjectPath> reply = 
kglobalaccel.getComponent(componentUnique);

But the getComponent call returns a QString, not a QDBusObjectPath.

-------------- Message: -------------- 
Object::connect: No such slot SystemTray::Manager::checkIdle() in 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/plasma/generic/applets/systemtray/core/manager.cpp:70

Partial backtrace:
#4  0xb5f67e72 in QObject::connect (sender=0x84ebc10, signal=0xa6cdbd81 
"timeout()", receiver=0x84c57a8, method=0x84c3b08 "checkIdle()", 
    type=AutoConnection) at 
/home/tmacieir/src/troll/qt-4.7/src/corelib/kernel/qobject.cpp:2579
#5  0xa6cb3d0e in SystemTray::Manager::Manager (this=0x84c57a8)
    at 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/plasma/generic/applets/systemtray/core/manager.cpp:70
#6  0xa6cce19c in SystemTray::Applet::Applet (this=0x84f6448, parent=0x0, 
arguments=...)
    at 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/plasma/generic/applets/systemtray/ui/applet.cpp:81
#7  0xa6cd2609 in KPluginFactory::createInstance<SystemTray::Applet, QObject> 
(parentWidget=0x0, parent=0x0, args=...)
    at /home/tmacieir/KDE4-4.6/include/kpluginfactory.h:461
#8  0xb6fb2fe1 in KPluginFactory::create (this=0x8495690, iface=0xb7d7ede0 
"Plasma::Applet", parentWidget=0x0, parent=0x0, args=..., keyword=
    ...) at 
/home/tmacieir/src/kde4/KDE/kdelibs/kdecore/util/kpluginfactory.cpp:191
#9  0xb7bdbb4a in KPluginFactory::create<Plasma::Applet> (this=0x8495690, 
parentWidget=0x0, parent=0x0, keyword=..., args=...)
    at /home/tmacieir/src/kde4/KDE/kdelibs/kdecore/util/kpluginfactory.h:515

-------------- Message: -------------- 
QGraphicsLinearLayout::removeAt: invalid index 0

Partial backtrace:
#3  0xb6a1a996 in QGraphicsLinearLayout::removeAt (this=0x849f5b8, index=0)
    at 
/home/tmacieir/src/troll/qt-4.7/src/gui/graphicsview/qgraphicslinearlayout.cpp:330
#4  0xb7c388ab in Plasma::PopupAppletPrivate::popupConstraintsEvent 
(this=0x8172000, constraints=...)
    at /home/tmacieir/src/kde4/KDE/kdelibs/plasma/popupapplet.cpp:223
#5  0xb7bcb195 in Plasma::Applet::flushPendingConstraintsEvents 
(this=0x831ec60)
    at /home/tmacieir/src/kde4/KDE/kdelibs/plasma/applet.cpp:1252
#6  0xb7bfd408 in Plasma::Corona::loadLayout (this=0x8085cc8, configName=...) 
at /home/tmacieir/src/kde4/KDE/kdelibs/plasma/corona.cpp:498
#7  0xb7bfc8d3 in Plasma::Corona::initializeLayout (this=0x8085cc8, 
configName=...)
    at /home/tmacieir/src/kde4/KDE/kdelibs/plasma/corona.cpp:340
#8  0xb7fc2f97 in PlasmaApp::corona (this=0x8081e08) at 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/plasma/desktop/shell/plasmaapp.cpp:674
#9  0xb7fc5309 in PlasmaApp::setupDesktop (this=0x8081e08)
    at 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/plasma/desktop/shell/plasmaapp.cpp:276
#10 0xb7fc56c5 in PlasmaApp::qt_metacall (this=0x8081e08, _c=InvokeMetaMethod, 
_id=10, _a=0xbfffddc0)
    at 
/home/tmacieir/obj/kde4/KDE/kdebase/workspace/plasma/desktop/shell/plasmaapp.moc:136
#11 0xb5f54c82 in QMetaObject::metacall (object=0x8081e08, 
cl=InvokeMetaMethod, idx=37, argv=0xbfffddc0)
    at /home/tmacieir/src/troll/qt-4.7/src/corelib/kernel/qmetaobject.cpp:237
#12 0xb5f699c8 in QMetaObject::activate (sender=0x8261610, m=0xb60b6360, 
local_signal_index=0, argv=0x0)
    at /home/tmacieir/src/troll/qt-4.7/src/corelib/kernel/qobject.cpp:3299
#13 0xb5f72c71 in QSingleShotTimer::timeout (this=0x8261610) at .moc/debug-
shared/qtimer.moc:82

Code:
222             if (icon && !icon->icon().isNull() && lay) {
223                 lay->removeAt(0);
224             }

-------------- Message: (Qt 4.7 debug) -------------- 
QGraphicsLayout::addChildLayoutItem: Plasma::IconWidget "" in wrong parent; 
moved to correct parent

Partial backtrace:
#2  0xb6a17f76 in QGraphicsLayoutPrivate::addChildLayoutItem (this=0x890bd38, 
layoutItem=0x89a2eb8)
    at 
/home/tmacieir/src/troll/qt-4.7/src/gui/graphicsview/qgraphicslayout_p.cpp:170
#3  0xb6a1a6dc in QGraphicsLinearLayout::insertItem (this=0x88fd1d8, index=-1, 
item=0x89a2eb8)
    at 
/home/tmacieir/src/troll/qt-4.7/src/gui/graphicsview/qgraphicslinearlayout.cpp:279
#4  0xb7bd68e1 in QGraphicsLinearLayout::addItem (this=0x88fd1d8, 
item=0x89a2eb8)
    at 
/home/tmacieir/obj/troll/qt-4.6/include/QtGui/../../../../../src/troll/qt-4.6/src/gui/graphicsview/qgraphicslinearlayout.h:68
#5  0xb7c2bbfb in Plasma::ExtenderItemPrivate::updateToolBox (this=0x890b630)
    at 
/home/tmacieir/src/kde4/KDE/kdelibs/plasma/extenders/extenderitem.cpp:780
#6  0xb7c29be4 in Plasma::ExtenderItem::addAction (this=0x8993478, name=..., 
action=0x89b0da0)
    at 
/home/tmacieir/src/kde4/KDE/kdelibs/plasma/extenders/extenderitem.cpp:404
#7  0xb7c25a12 in Plasma::ExtenderGroup::ExtenderGroup (this=0x8993478, 
parent=0x898e178, groupId=0)
    at 
/home/tmacieir/src/kde4/KDE/kdelibs/plasma/extenders/extendergroup.cpp:52
#8  0xb101fa4d in Notifications::createJobGroups (this=0x89b2de8)
    at 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/plasma/generic/applets/notifications/ui/notifications.cpp:386
#9  0xb1020dca in Notifications::configChanged (this=0x89b2de8)
    at 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/plasma/generic/applets/notifications/ui/notifications.cpp:142
#10 0xb102110d in Notifications::init (this=0x89b2de8)
    at 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/plasma/generic/applets/notifications/ui/notifications.cpp:126
#11 0xa6cc166b in SystemTray::PlasmoidTask::createWidget (this=0x84fa530, 
host=0x84f6448)
    at 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/plasma/generic/applets/systemtray/protocols/plasmoid/plasmoidtask.cpp:123

The item in question is a Plasma::IconWidget, created in 
plasma/extenders/extenderitem.cpp:774 as such:

774                 IconWidget *icon = new IconWidget(q);

Where q is a Plasma::ExtenderGroup. The new parent is a QGraphicsWidget. 
Neither object have names.

-------------- Message: (just a debug, but happens too often) -------------- 
plasma-desktop(23156)/plasma TaskManager::GroupManagerPrivate::removeTask: 
invalid item

Partial backtrace:
#7  0xa6e3595f in TaskManager::GroupManagerPrivate::removeTask 
(this=0x80e5768, task=...)
    at 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/libs/taskmanager/groupmanager.cpp:314
#8  0xa6e36415 in TaskManager::GroupManagerPrivate::actuallyReloadTasks 
(this=0x80e5768)
    at 
/home/tmacieir/src/kde4/KDE/kdebase/workspace/libs/taskmanager/groupmanager.cpp:178
#9  0xa6e36ae6 in TaskManager::GroupManager::qt_metacall (this=0x80f27e8, 
_c=InvokeMetaMethod, _id=11, _a=0xbfffddc0)
    at 
/home/tmacieir/obj/kde4/KDE/kdebase/workspace/libs/taskmanager/groupmanager.moc:106
#10 0xb5f54c82 in QMetaObject::metacall (object=0x80f27e8, 
cl=InvokeMetaMethod, idx=15, argv=0xbfffddc0)
    at /home/tmacieir/src/troll/qt-4.7/src/corelib/kernel/qmetaobject.cpp:237
#11 0xb5f699c8 in QMetaObject::activate (sender=0x80e57a0, m=0xb60b7764, 
local_signal_index=0, argv=0x0)
    at /home/tmacieir/src/troll/qt-4.7/src/corelib/kernel/qobject.cpp:3299
#12 0xb5fcc21b in QTimer::timeout (this=0x80e57a0) at 
/home/tmacieir/obj/troll/qt-4.7/src/corelib/.moc/debug-
shared/moc_qtimer.cpp:134

The 'item' variable is 0 at frame 7.

The task in question is a Konqueror window I have open. There's nothing 
special about it.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100303/7532c2e4/attachment.sig 


More information about the Plasma-devel mailing list