Bug 294641 - KGpg crashed when canceling overwriting last file to decrypt
Summary: KGpg crashed when canceling overwriting last file to decrypt
Status: RESOLVED FIXED
Alias: None
Product: kgpg
Classification: Applications
Component: general (show other bugs)
Version: 2.7.x
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Rolf Eike Beer
URL:
Keywords:
: 297680 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-22 21:22 UTC by Toralf Förster
Modified: 2015-01-08 21:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.2


Attachments
New crash information added by DrKonqi (4.69 KB, text/plain)
2012-03-21 17:55 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster 2012-02-22 21:22:08 UTC
Application: kgpg (2.7.0)
KDE Platform Version: 4.8.00 (4.8.0 (Compiled from sources)
Qt Version: 4.8.0
Operating System: Linux 3.2.7 i686
Distribution (Platform): Gentoo Packages

-- Information about the crash:
I created a sigend message :
$>echo "Hi " | gpg --verbose --sign --recipient mickey@mou.se --armor --output signed.txt.asc
opened it in Dolphin (sigend.txt files was created) and opened it twice-. A dialog poped up to overwrite the file and then (or few seconds before ?) the crash occured.

-- Backtrace:
Application: KGpg (kgpg), signal: Segmentation fault
[KCrash Handler]
#7  QUrl::scheme (this=0x0) at io/qurl.cpp:4492
#8  0xb63b8bd2 in isLocalFile (url=...) at /var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0/kdecore/io/kurl.cpp:906
#9  0x080e264c in operator= (s=<optimized out>, this=0xbfd7dfac) at /usr/include/qt4/QtCore/qstring.h:720
#10 KGpgExternalActions::startFolderEncode (this=0xa14e930) at /var/tmp/portage/kde-base/kgpg-4.8.0/work/kgpg-4.8.0/kgpgexternalactions.cpp:138
#11 0x080e2933 in KGpgExternalActions::decryptFile (this=0xa14e930) at /var/tmp/portage/kde-base/kgpg-4.8.0/work/kgpg-4.8.0/kgpgexternalactions.cpp:312
#12 0x080ba5b1 in KGpgApp::newInstance (this=0x9ecd3f8) at /var/tmp/portage/kde-base/kgpg-4.8.0/work/kgpg-4.8.0/kgpg.cpp:150
#13 0xb71de035 in KUniqueApplicationAdaptor::newInstance (this=0xa014f10, asn_id=..., args=...) at /var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0/kdeui/kernel/kuniqueapplication.cpp:442
#14 0xb71de0f3 in KUniqueApplicationAdaptor::qt_metacall (this=0xa014f10, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfd7e378) at /var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0_build/kdeui/kuniqueapplication_p.moc:81
#15 0xb62497e2 in QDBusConnectionPrivate::deliverCall (this=0x9ec7770, object=0xa014f10, msg=..., metaTypes=..., slotIdx=4) at qdbusintegrator.cpp:947
#16 0xb624a9f7 in QDBusConnectionPrivate::activateCall (this=0x9ec7770, object=0xa014f10, flags=337, msg=...) at qdbusintegrator.cpp:857
#17 0xb624afc8 in QDBusConnectionPrivate::activateObject (this=0x9ec7770, node=..., msg=..., pathStartPos=16) at qdbusintegrator.cpp:1443
#18 0xb624b47a in QDBusActivateObjectEvent::placeMetaCall (this=0xa1b5820) at qdbusintegrator.cpp:1537
#19 0xb60da4b3 in QObject::event (this=0x9ecd3f8, e=0xa1b5820) at kernel/qobject.cpp:1195
#20 0xb60c47bc in QCoreApplication::event (this=0x9ecd3f8, e=0xa1b5820) at kernel/qcoreapplication.cpp:1688
#21 0xb667fc10 in QApplication::event (this=0x9ecd3f8, e=0xa1b5820) at kernel/qapplication.cpp:2532
#22 0xb667d56c in QApplicationPrivate::notify_helper (this=0x9ed5058, receiver=0x9ecd3f8, e=0xa1b5820) at kernel/qapplication.cpp:4550
#23 0xb668239e in QApplication::notify (this=0x9ecd3f8, receiver=0x9ecd3f8, e=0xa1b5820) at kernel/qapplication.cpp:3932
#24 0xb71d733b in KApplication::notify (this=0x9ecd3f8, receiver=0x9ecd3f8, event=0xa1b5820) at /var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0/kdeui/kernel/kapplication.cpp:311
#25 0xb60c41a2 in QCoreApplication::notifyInternal (this=0x9ecd3f8, receiver=0x9ecd3f8, event=0xa1b5820) at kernel/qcoreapplication.cpp:876
#26 0xb60c7bdc in sendEvent (event=0xa1b5820, receiver=0x9ecd3f8) at kernel/qcoreapplication.h:231
#27 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9eaf5d0) at kernel/qcoreapplication.cpp:1500
#28 0xb60c7f4e in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1393
#29 0xb60f6075 in sendPostedEvents () at kernel/qcoreapplication.h:236
#30 postEventSourceDispatch (s=0x9ed4e98) at kernel/qeventdispatcher_glib.cpp:279
#31 0xb55ee412 in g_main_dispatch (context=0x9ed68f0) at gmain.c:2441
#32 g_main_context_dispatch (context=0x9ed68f0) at gmain.c:3011
#33 0xb55eec28 in g_main_context_iterate (context=0x9ed68f0, block=1, dispatch=1, self=<optimized out>) at gmain.c:3089
#34 0xb55eee25 in g_main_context_iteration (context=0x9ed68f0, may_block=1) at gmain.c:3152
#35 0xb60f61ed in QEventDispatcherGlib::processEvents (this=0x9eaf1c0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#36 0xb6730306 in QGuiEventDispatcherGlib::processEvents (this=0x9eaf1c0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#37 0xb60c2f7a in QEventLoop::processEvents (this=0xbfd7ede4, flags=...) at kernel/qeventloop.cpp:149
#38 0xb60c3282 in QEventLoop::exec (this=0xbfd7ede4, flags=...) at kernel/qeventloop.cpp:204
#39 0xb60c8011 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#40 0xb667b448 in QApplication::exec () at kernel/qapplication.cpp:3811
#41 0x080bb256 in main (argc=) at /var/tmp/portage/kde-base/kgpg-4.8.0/work/kgpg-4.8.0/main.cpp:46

Reported using DrKonqi
Comment 1 Toralf Förster 2012-02-22 21:24:27 UTC
Ah - the crash occured again if I press "cancel" in the "overwrite ?" dialog window.
Comment 2 Rolf Eike Beer 2012-03-21 16:47:09 UTC
Git commit 42f8b1b51b09cb4b64fadf7e6cdd5ce359b0fa74 by Rolf Eike Beer.
Committed on 21/03/2012 at 17:41.
Pushed by dakon into branch 'KDE/4.8'.

fix crash when list of files to decrypt is empty

This happens when the last file in the list would overwrite an existing file and instead of overwriting the decryption of that file was skipped.

FIXED-IN:4.8.2

M  +3    -3    kgpgexternalactions.cpp

http://commits.kde.org/kgpg/42f8b1b51b09cb4b64fadf7e6cdd5ce359b0fa74
Comment 3 Toralf Förster 2012-03-21 17:55:52 UTC
Created attachment 69793 [details]
New crash information added by DrKonqi

kgpg (2.7.1) on KDE Platform 4.8.1 (4.8.1) using Qt 4.8.0

- What I was doing when the application crashed:

I patched kgpg with the given change set. Now the app doesn't cored, but it crashed and opened the KDEs crash handler ;/

-- Backtrace (Reduced):
#7  QUrl::scheme (this=0xa006369) at io/qurl.cpp:4492
#8  0xb6383a22 in isLocalFile (url=...) at /var/tmp/portage/kde-base/kdelibs-4.8.1-r1/work/kdelibs-4.8.1/kdecore/io/kurl.cpp:906
#9  0x080e2c3c in KGpgExternalActions::decryptFile (this=0xa320e48) at /var/tmp/portage/kde-base/kgpg-4.8.1/work/kgpg-4.8.1/kgpgexternalactions.cpp:295
#10 0x080e2f23 in KGpgExternalActions::decryptFile (this=0xa320e48) at /var/tmp/portage/kde-base/kgpg-4.8.1/work/kgpg-4.8.1/kgpgexternalactions.cpp:318
#11 0x080bab61 in KGpgApp::newInstance (this=0xa0a4208) at /var/tmp/portage/kde-base/kgpg-4.8.1/work/kgpg-4.8.1/kgpg.cpp:178
Comment 4 Rolf Eike Beer 2012-03-21 21:28:59 UTC
You did something wrong. Line 295 now is "droppedUrls.isEmpty()". Your backtrace shows it is "droppedUrls.first().isLocalFile()", which is the code as it was before the patch.
Comment 5 Toralf Förster 2012-03-22 09:44:02 UTC
(In reply to comment #4)
> You did something wrong. Line 295 now is "droppedUrls.isEmpty()". Your
> backtrace shows it is "droppedUrls.first().isLocalFile()", which is the code
> as it was before the patch.

Right - Gentoo's portage fools me : https://bugs.gentoo.org/show_bug.cgi?id=409293 I fear.
Comment 6 Rolf Eike Beer 2012-04-08 15:59:00 UTC
*** Bug 297680 has been marked as a duplicate of this bug. ***