Bug 203497 - KGPG crashes at startup in KDE 4.3 (KShortcut::operator=,KGpgApp::newInstance)
Summary: KGPG crashes at startup in KDE 4.3 (KShortcut::operator=,KGpgApp::newInstance)
Status: RESOLVED FIXED
Alias: None
Product: kgpg
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Rolf Eike Beer
URL:
Keywords:
: 211785 230670 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-12 01:12 UTC by Jan Ziehm
Modified: 2010-04-03 10:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziehm 2009-08-12 01:12:41 UTC
Application that crashed: kgpg
Version of the application: 2.2.0
KDE Version: 4.3.00 (KDE 4.3.0)
Qt Version: 4.5.2
Operating System: Linux 2.6.30-3.slh.1-sidux-amd64 x86_64
Distribution: Debian GNU/Linux unstable (sid)

What I was doing when the application crashed:
kgpg crashes at the start of KDE and complains about defective keys. It is set up to start automatically each time KDE starts. Everything used to work fine with KDE 4.2.4 - the problems appeared since upgrading to KDE 4.3.0 in Debian Sid.

 -- Backtrace:
Application: KGpg (kgpg), signal: Segmentation fault
[KCrash Handler]
#5  0x00007f668067f7a7 in KShortcut::operator= (this=0x30, other=...) at ../../kdeui/shortcuts/kshortcut.cpp:213
#6  0x00000000004771dd in KGpgApp::newInstance (this=0x748a30) at ../../kgpg/kgpg.cpp:101
#7  0x00007f66806488b6 in KUniqueApplicationAdaptor::newInstance (this=0x7f61f0, asn_id=<value optimized out>, args=...) at ../../kdeui/kernel/kuniqueapplication.cpp:459
#8  0x00007f6680648936 in KUniqueApplicationAdaptor::qt_metacall (this=0x7f61f0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff1d02be00) at ./kuniqueapplication_p.moc:75
#9  0x00007f667f140b23 in QDBusConnectionPrivate::deliverCall (this=0x741680, object=0x7f61f0, msg=..., metaTypes=..., slotIdx=4) at qdbusintegrator.cpp:891
#10 0x00007f667f141dd8 in QDBusConnectionPrivate::activateCall (this=0x741680, object=0x7f61f0, flags=337, msg=...) at qdbusintegrator.cpp:803
#11 0x00007f667f1423e1 in QDBusConnectionPrivate::activateObject (this=0x741680, node=..., msg=..., pathStartPos=<value optimized out>) at qdbusintegrator.cpp:1347
#12 0x00007f667f1426f8 in QDBusActivateObjectEvent::placeMetaCall (this=0x9b6490) at qdbusintegrator.cpp:1464
#13 0x00007f667ee33ee8 in QObject::event (this=0x748a30, e=0x9b6490) at kernel/qobject.cpp:1110
#14 0x00007f667f9eddfa in QApplication::event (this=0x748a30, e=0x9b6490) at kernel/qapplication.cpp:2317
#15 0x00007f667f9e87ad in QApplicationPrivate::notify_helper (this=0x74d070, receiver=0x748a30, e=0x9b6490) at kernel/qapplication.cpp:4056
#16 0x00007f667f9f080a in QApplication::notify (this=0x748a30, receiver=0x748a30, e=0x9b6490) at kernel/qapplication.cpp:4021
#17 0x00007f6680641b2b in KApplication::notify (this=0x748a30, receiver=0x748a30, event=0x9b6490) at ../../kdeui/kernel/kapplication.cpp:302
#18 0x00007f667ee2449c in QCoreApplication::notifyInternal (this=0x748a30, receiver=0x748a30, event=0x9b6490) at kernel/qcoreapplication.cpp:610
#19 0x00007f667ee250e4 in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x7276c0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#20 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x7276c0) at kernel/qcoreapplication.cpp:1247
#21 0x00007f667ee4cef3 in QCoreApplication::sendPostedEvents (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#22 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:210
#23 0x00007f667af667aa in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#24 0x00007f667af69df8 in ?? () from /usr/lib/libglib-2.0.so.0
#25 0x00007f667af69fac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#26 0x00007f667ee4cb7f in QEventDispatcherGlib::processEvents (this=0x7272f0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:327
#27 0x00007f667fa7f5ef in QGuiEventDispatcherGlib::processEvents (this=0x30, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#28 0x00007f667ee22d62 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#29 0x00007f667ee23134 in QEventLoop::exec (this=0x7fff1d02cca0, flags=...) at kernel/qeventloop.cpp:201
#30 0x00007f667fe72a3e in QDialog::exec (this=0x9abdd0) at dialogs/qdialog.cpp:498
#31 0x00007f66805c7a42 in KMessageBox::createKMessageBox (dialog=0x9abdd0, icon=<value optimized out>, text=..., strlist=..., ask=..., checkboxReturn=0x0, options=..., details=..., 
    notifyType=QMessageBox::Critical) at ../../kdeui/dialogs/kmessagebox.cpp:331
#32 0x00007f66805c8bd7 in KMessageBox::createKMessageBox (dialog=0x9abdd0, icon=QMessageBox::Critical, text=..., strlist=..., ask=..., checkboxReturn=0x0, options=..., details=...)
    at ../../kdeui/dialogs/kmessagebox.cpp:151
#33 0x00007f66805c963d in KMessageBox::detailedErrorWId (parent_id=0, text=..., details=..., caption=..., options=...) at ../../kdeui/dialogs/kmessagebox.cpp:881
#34 0x00007f66805c97d8 in KMessageBox::detailedError (parent=0x7f667e9bfa00, text=..., details=..., caption=..., options=<value optimized out>) at ../../kdeui/dialogs/kmessagebox.cpp:857
#35 0x0000000000481d12 in KgpgInterface::readPublicKeysFin (this=0x9a1dc0, p=0x9a17e0, block=true) at ../../kgpg/kgpginterface.cpp:608
#36 0x0000000000485a38 in KgpgInterface::readPublicKeys (this=0x9a1dc0, block=true, ids=..., withsigs=false) at ../../kgpg/kgpginterface.cpp:446
#37 0x000000000043cf69 in KGpgRootNode::addKeys (this=0x7f3a90, ids=...) at ../../kgpg/model/kgpgitemnode.cpp:300
#38 0x0000000000437522 in KGpgItemModel::refreshKeyIds (this=0x7f3d80, ids=...) at ../../kgpg/model/kgpgitemmodel.cpp:372
#39 0x000000000045dd10 in KeysManager::refreshkey (this=0x7f6780) at ../../kgpg/keysmanager.cpp:2462
#40 0x000000000047760a in KGpgApp::newInstance (this=0x748a30) at ../../kgpg/kgpg.cpp:79
#41 0x00007f66806488b6 in KUniqueApplicationAdaptor::newInstance (this=0x7f61f0, asn_id=<value optimized out>, args=...) at ../../kdeui/kernel/kuniqueapplication.cpp:459
#42 0x00007f6680648936 in KUniqueApplicationAdaptor::qt_metacall (this=0x7f61f0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff1d02de10) at ./kuniqueapplication_p.moc:75
#43 0x00007f667f140b23 in QDBusConnectionPrivate::deliverCall (this=0x741680, object=0x7f61f0, msg=..., metaTypes=..., slotIdx=4) at qdbusintegrator.cpp:891
#44 0x00007f667f141ccf in QDBusConnectionPrivate::activateCall (this=0x741680, object=0x7f61f0, flags=337, msg=...) at qdbusintegrator.cpp:796
#45 0x00007f667f1423e1 in QDBusConnectionPrivate::activateObject (this=0x741680, node=..., msg=..., pathStartPos=<value optimized out>) at qdbusintegrator.cpp:1347
#46 0x00007f667f1426f8 in QDBusActivateObjectEvent::placeMetaCall (this=0x800d80) at qdbusintegrator.cpp:1464
#47 0x00007f667ee33ee8 in QObject::event (this=0x748a30, e=0x800d80) at kernel/qobject.cpp:1110
#48 0x00007f667f9eddfa in QApplication::event (this=0x748a30, e=0x800d80) at kernel/qapplication.cpp:2317
#49 0x00007f667f9e87ad in QApplicationPrivate::notify_helper (this=0x74d070, receiver=0x748a30, e=0x800d80) at kernel/qapplication.cpp:4056
#50 0x00007f667f9f080a in QApplication::notify (this=0x748a30, receiver=0x748a30, e=0x800d80) at kernel/qapplication.cpp:4021
#51 0x00007f6680641b2b in KApplication::notify (this=0x748a30, receiver=0x748a30, event=0x800d80) at ../../kdeui/kernel/kapplication.cpp:302
#52 0x00007f667ee2449c in QCoreApplication::notifyInternal (this=0x748a30, receiver=0x748a30, event=0x800d80) at kernel/qcoreapplication.cpp:610
#53 0x00007f667ee250e4 in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x7276c0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#54 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x7276c0) at kernel/qcoreapplication.cpp:1247
#55 0x00007f667ee4cef3 in QCoreApplication::sendPostedEvents (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#56 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:210
#57 0x00007f667af667aa in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#58 0x00007f667af69df8 in ?? () from /usr/lib/libglib-2.0.so.0
#59 0x00007f667af69fac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#60 0x00007f667ee4cb7f in QEventDispatcherGlib::processEvents (this=0x7272f0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:327
#61 0x00007f667fa7f5ef in QGuiEventDispatcherGlib::processEvents (this=0x30, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#62 0x00007f667ee22d62 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#63 0x00007f667ee23134 in QEventLoop::exec (this=0x7fff1d02ecb0, flags=...) at kernel/qeventloop.cpp:201
#64 0x00007f667ee253a4 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#65 0x0000000000478889 in main (argc=3, argv=0x7fff1d02f148) at ../../kgpg/main.cpp:57

This bug may be a duplicate of or related to bug 197388

Reported using DrKonqi
Comment 1 Rolf Eike Beer 2009-10-25 17:21:45 UTC
*** Bug 211785 has been marked as a duplicate of this bug. ***
Comment 2 Rolf Eike Beer 2009-10-25 18:19:21 UTC
SVN commit 1040127 by dakon:

workaround for NULL-deref

BUG:203497


 M  +3 -2      kgpg.cpp  
 M  +0 -2      kgpg.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1040127
Comment 3 Rolf Eike Beer 2010-04-03 10:06:53 UTC
*** Bug 230670 has been marked as a duplicate of this bug. ***
Comment 4 Rolf Eike Beer 2010-04-03 10:33:07 UTC
SVN commit 1110495 by dakon:

Do not copy the shortcut for jumping to the default key at application startup around

It looks like this is sort of a race condition when multiple instances start up at the same time. Looks like this goes bang if the first one is not initialized completely and the second one is already trying to access those values.

At the end this copying isn't really necessary at all: that shortcut can be queried when the function that needs this is really called.

CCBUG:203497

 M  +0 -4      kgpg.cpp  
 M  +9 -3      kgpgexternalactions.cpp  
 M  +3 -2      kgpgexternalactions.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1110495
Comment 5 Rolf Eike Beer 2010-04-03 10:35:22 UTC
This change will be part of KDE SC 4.5. If you keep getting these errors please bug your distributor if he would create a new KGpg package for you. In this case I will backport this to 4.3 and they can pick up the most recent version from that branch.