Bug 298465 - Crash when setting default key after generating new key [KGpgItemModel::setDefaultKey]
Summary: Crash when setting default key after generating new key [KGpgItemModel::setDe...
Status: RESOLVED FIXED
Alias: None
Product: kgpg
Classification: Applications
Component: general (show other bugs)
Version: 2.7.2
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Rolf Eike Beer
URL:
Keywords:
: 299634 303077 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-20 04:22 UTC by Kevin Clevenger
Modified: 2013-03-19 21:16 UTC (History)
5 users (show)

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


Attachments
New crash information added by DrKonqi (5.05 KB, text/plain)
2012-05-09 00:25 UTC, Kevin Clevenger
Details
New crash information added by DrKonqi (7.24 KB, text/plain)
2012-05-26 21:26 UTC, Vorador
Details
New crash information added by DrKonqi (5.36 KB, text/plain)
2012-06-03 06:23 UTC, Terry Moschou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Clevenger 2012-04-20 04:22:19 UTC
Application: kgpg (2.7.2)
KDE Platform Version: 4.8.2 (4.8.2)
Qt Version: 4.8.1
Operating System: Linux 3.3.2-1.fc17.x86_64 x86_64
Distribution: "Fedora release 17 (Beefy Miracle)"

-- Information about the crash:
- What I was doing when the application crashed:

Had just generated a key in Kgpg. Completed the action and Kgpg crashed

-- Backtrace:
Application: KGpg (kgpg), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[KCrash Handler]
#6  KGpgItemModel::setDefaultKey (this=0x240d530, def=0x0) at /usr/src/debug/kgpg-4.8.2/model/kgpgitemmodel.cpp:346
#7  0x0000000000465c1f in KeysManager::slotGenerateKeyDone (this=0x2585e60, job=<optimized out>) at /usr/src/debug/kgpg-4.8.2/keysmanager.cpp:611
#8  0x000000000046c2d1 in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at /usr/src/debug/kgpg-4.8.2/x86_64-redhat-linux-gnu/keysmanager.moc:232
#9  KeysManager::qt_static_metacall (_o=0x2585e60, _c=QMetaObject::InvokeMetaMethod, _id=40126048, _a=0x3786ccb900) at /usr/src/debug/kgpg-4.8.2/x86_64-redhat-linux-gnu/keysmanager.moc:199
#10 0x000000378698c09f in QMetaObject::activate (sender=0x281d270, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffea26a370) at kernel/qobject.cpp:3547
#11 0x0000003787b331a2 in KJob::result (this=this@entry=0x281d270, _t1=_t1@entry=0x281d270) at /usr/src/debug/kdelibs-4.8.2/x86_64-redhat-linux-gnu/kdecore/kjob.moc:208
#12 0x0000003787b331e0 in KJob::emitResult (this=0x281d270) at /usr/src/debug/kdelibs-4.8.2/kdecore/jobs/kjob.cpp:318
#13 0x000000378698c09f in QMetaObject::activate (sender=0x281cd30, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffea26a4d0) at kernel/qobject.cpp:3547
#14 0x000000000043a85c in KGpgTransaction::done (this=<optimized out>, _t1=0) at /usr/src/debug/kgpg-4.8.2/x86_64-redhat-linux-gnu/kgpgtransaction.moc:123
#15 0x000000378698c09f in QMetaObject::activate (sender=0x280d560, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3547
#16 0x000000378698c09f in QMetaObject::activate (sender=0x280d560, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffea26a740) at kernel/qobject.cpp:3547
#17 0x000000378690d44f in QProcess::finished (this=this@entry=0x280d560, _t1=2, _t2=QProcess::NormalExit) at .moc/release-shared/moc_qprocess.cpp:155
#18 0x0000003786911557 in QProcessPrivate::_q_processDied (this=0x27a3140) at io/qprocess.cpp:1068
#19 0x00000037869115de in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at .moc/release-shared/moc_qprocess.cpp:91
#20 QProcess::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/release-shared/moc_qprocess.cpp:68
#21 0x000000378698c09f in QMetaObject::activate (sender=0x2879390, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffea26a8f0) at kernel/qobject.cpp:3547
#22 0x00000037869d549e in QSocketNotifier::activated (this=<optimized out>, _t1=18) at .moc/release-shared/moc_qsocketnotifier.cpp:102
#23 0x00000037869925ab in QSocketNotifier::event (this=0x2879390, e=0x7fffea26af10) at kernel/qsocketnotifier.cpp:317
#24 0x00000037881ca47c in QApplicationPrivate::notify_helper (this=this@entry=0x240b340, receiver=receiver@entry=0x2879390, e=e@entry=0x7fffea26af10) at kernel/qapplication.cpp:4554
#25 0x00000037881ce9aa in QApplication::notify (this=0x240a120, receiver=0x2879390, e=0x7fffea26af10) at kernel/qapplication.cpp:4415
#26 0x0000003789c459f6 in KApplication::notify (this=0x240a120, receiver=0x2879390, event=0x7fffea26af10) at /usr/src/debug/kdelibs-4.8.2/kdeui/kernel/kapplication.cpp:311
#27 0x000000378697595e in QCoreApplication::notifyInternal (this=0x240a120, receiver=0x2879390, event=0x7fffea26af10) at kernel/qcoreapplication.cpp:876
#28 0x00000037869a31f8 in sendEvent (event=0x7fffea26af10, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#29 socketNotifierSourceDispatch (source=0x240b540) at kernel/qeventdispatcher_glib.cpp:110
#30 0x0000003acd4475cc in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#31 0x0000003acd4479e8 in ?? () from /lib64/libglib-2.0.so.0
#32 0x0000003acd447aa4 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#33 0x00000037869a39e6 in QEventDispatcherGlib::processEvents (this=0x23d9120, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#34 0x000000378826a41e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#35 0x000000378697495f in QEventLoop::processEvents (this=this@entry=0x7fffea26b150, flags=...) at kernel/qeventloop.cpp:149
#36 0x0000003786974be8 in QEventLoop::exec (this=0x7fffea26b150, flags=...) at kernel/qeventloop.cpp:204
#37 0x0000003786979718 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#38 0x00000000004214d0 in main (argc=1, argv=0x7fffea26b388) at /usr/src/debug/kgpg-4.8.2/main.cpp:55

Reported using DrKonqi
Comment 1 Rolf Eike Beer 2012-05-08 17:36:38 UTC
*** Bug 299634 has been marked as a duplicate of this bug. ***
Comment 2 Steven Evans 2012-05-08 17:39:56 UTC
It seems that after the crash, I can no longer open up Kgpg. I am not sure if it is related or not.
Comment 3 Rolf Eike Beer 2012-05-08 17:51:01 UTC
That could be related to bug 298773.

You could look if there is a "default-key" line in ~/.gnupg/gpg.conf and if commenting out that line makes things better.
Comment 4 Steven Evans 2012-05-08 18:01:03 UTC
That line is already commented out. When run from a terminal, I get

$ kgpg
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
$

It seems to be related to 298773. When I run kgpg, the process is running, but I get nothing to show up, and it sits there sleeping.
Comment 5 Rolf Eike Beer 2012-05-08 18:05:14 UTC
Those lines are totally unrelated (and from all that I know harmless). Are you sure KGpg isn't just hiding in the systray?
Comment 6 Steven Evans 2012-05-08 18:06:42 UTC
I can kill kgpg and then run it again, and I still get those same messages each time, and then the process just sleeps. I never get anything to show up after that crash.
Comment 7 Steven Evans 2012-05-08 18:24:59 UTC
Okay I feel dumb now. kgpg -k opened up the key management window I wanted to get to. However, it still won't open from the application launcher. At least I can get back to it now.
Comment 8 Steven Evans 2012-05-08 18:30:43 UTC
Actually, it seems that it did create the RSA 4096/4096 key I asked for, but it also made an RSA 4096/1024 key. I don't recall trying to make that key.
Comment 9 Kevin Clevenger 2012-05-09 00:25:33 UTC
Created attachment 70970 [details]
New crash information added by DrKonqi

kgpg (2.7.2) on KDE Platform 4.8.3 (4.8.3) using Qt 4.8.1

- What I was doing when the application crashed:
Generated an RSA/RSA 4096 key on a Fedora 16 desktop (original was F17)

-- Backtrace (Reduced):
#6  KGpgItemModel::setDefaultKey (this=0x180ace0, def=0x0) at /usr/src/debug/kgpg-4.8.2/model/kgpgitemmodel.cpp:346
#7  0x0000000000469fcf in KeysManager::slotGenerateKeyDone (this=0x180a290, job=<optimized out>) at /usr/src/debug/kgpg-4.8.2/keysmanager.cpp:611
#8  0x00000000004722b6 in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=0x180a290, _c=<optimized out>) at /usr/src/debug/kgpg-4.8.2/x86_64-redhat-linux-gnu/keysmanager.moc:232
#9  KeysManager::qt_static_metacall (_o=0x180a290, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/kgpg-4.8.2/x86_64-redhat-linux-gnu/keysmanager.moc:199
[...]
#11 0x00000035e21424a2 in KJob::result(KJob*) () from /usr/lib64/libkdecore.so.5
Comment 10 Vorador 2012-05-26 21:26:00 UTC
Created attachment 71390 [details]
New crash information added by DrKonqi

kgpg (2.7.2) on KDE Platform 4.8.3 (4.8.3) using Qt 4.8.1

- What I was doing when the application crashed:
I was generating new key (first one). Tried to save it in my documents directory, for future revoking etc. then when i tried to save, first he said that cannot open file with the given name, after that i have made file with a name, actually text file, then i had it chosen and gave SAVE. Then the app crashed.
Notice. All above i made as root user from root account.
- Custom settings of the application:
Custom directory for saving the key, custom file and file name.

-- Backtrace (Reduced):
#7  KGpgItemModel::setDefaultKey (this=0x85f1988, def=0x0) at /usr/src/debug/kgpg-4.8.3/model/kgpgitemmodel.cpp:346
#8  0x080b120f in KeysManager::slotGenerateKeyDone (this=0x85caa88, job=0x8e707b8) at /usr/src/debug/kgpg-4.8.3/keysmanager.cpp:610
#9  0x080ba0a3 in qt_static_metacall (_a=0xbfb3bd58, _id=24, _o=0x85caa88, _c=<optimized out>) at /usr/src/debug/kgpg-4.8.3/i686-redhat-linux-gnu/keysmanager.moc:231
#10 KeysManager::qt_static_metacall (_o=0x85caa88, _c=QMetaObject::InvokeMetaMethod, _id=24, _a=0xbfb3bd58) at /usr/src/debug/kgpg-4.8.3/i686-redhat-linux-gnu/keysmanager.moc:198
[...]
#12 0x436ca4c6 in KJob::result (this=0x8e707b8, _t1=0x8e707b8) at /usr/src/debug/kdelibs-4.8.3/i686-redhat-linux-gnu/kdecore/kjob.moc:207
Comment 11 Terry Moschou 2012-06-03 06:23:27 UTC
Created attachment 71528 [details]
New crash information added by DrKonqi

kgpg (2.7.2) on KDE Platform 4.8.3 (4.8.3) using Qt 4.8.1

- What I was doing when the application crashed:

Created new key pair.

Confirmation dialogue appeared.
"You have successfully created the following key: ..."

Set as Default Key

Selected OK/Finish, then KGpg crashed

-- Backtrace (Reduced):
#6  KGpgItemModel::setDefaultKey (this=0x2755860, def=0x0) at /usr/src/debug/kgpg-4.8.3/model/kgpgitemmodel.cpp:346
#7  0x0000000000469f0f in KeysManager::slotGenerateKeyDone (this=0x2753630, job=<optimized out>) at /usr/src/debug/kgpg-4.8.3/keysmanager.cpp:610
#8  0x0000000000472576 in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=0x2753630, _c=<optimized out>) at /usr/src/debug/kgpg-4.8.3/x86_64-redhat-linux-gnu/keysmanager.moc:231
#9  KeysManager::qt_static_metacall (_o=0x2753630, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/kgpg-4.8.3/x86_64-redhat-linux-gnu/keysmanager.moc:198
[...]
#11 0x00000033c6b424a2 in KJob::result (this=<optimized out>, _t1=0x28c03a0) at /usr/src/debug/kdelibs-4.8.3/x86_64-redhat-linux-gnu/kdecore/kjob.moc:207
Comment 12 Rolf Eike Beer 2012-06-06 15:22:04 UTC
Seems to hit more people, so I take this as confirmed. Although I still can't see what's going wrong there.
Comment 13 Rolf Eike Beer 2012-06-06 15:44:14 UTC
Git commit a3b0cb755ff08721a3b9e2c25d4aaf655fb40804 by Rolf Eike Beer.
Committed on 06/06/2012 at 17:40.
Pushed by dakon into branch 'KDE/4.8'.

fix NULL-deref when new setting default key

Thanks to John Tapsell for spotting the line I have been looking at for weeks without seeing the bug.
CCMAIL:johnflux@gmail.com

M  +6    -2    model/kgpgitemmodel.cpp

http://commits.kde.org/kgpg/a3b0cb755ff08721a3b9e2c25d4aaf655fb40804
Comment 14 Rolf Eike Beer 2012-06-11 17:59:16 UTC
Git commit 2d252cf08c51866a6acebe705db11b29941691bf by Rolf Eike Beer.
Committed on 11/06/2012 at 19:29.
Pushed by dakon into branch 'KDE/4.8'.

fix key comparison returning wrong values

This fixes a regression introduced in 4.8.2 with commit
2a100ae8d203107d17e438f67f65d26a4949cccc when trying to fix bug 292405.
Related: bug 301618, bug 292405

M  +7    -5    core/KGpgKeyNode.cpp

http://commits.kde.org/kgpg/2d252cf08c51866a6acebe705db11b29941691bf
Comment 15 Jekyll Wu 2012-07-05 19:37:56 UTC
*** Bug 303077 has been marked as a duplicate of this bug. ***