Bug 477798 - Kleopatra crashes after clicking cancel on the passphrase prompt while trying to use the "Print Secret Key"
Summary: Kleopatra crashes after clicking cancel on the passphrase prompt while trying...
Status: RESOLVED FIXED
Alias: None
Product: kleopatra
Classification: Applications
Component: general (show other bugs)
Version: 3.1.28.230803
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Andre Heinecke
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2023-11-30 20:33 UTC by nezu
Modified: 2024-11-05 20:46 UTC (History)
4 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 nezu 2023-11-30 20:33:20 UTC
Application: kleopatra (3.1.28.230803 (23.08.3))

Qt Version: 5.15.11
Frameworks Version: 5.112.0
Operating System: Linux 6.6.2-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.27.9 [KCrashBackend]

-- Information about the crash:
Steps to reproduce:
1. create a new key pair that is password protected or use an existing one
2. right click they -> Print Secret Key
3. Click cancel on the password prompt
4. Click cancel on the second password prompt (why are there two? I already clicked cancel once)
5. Observe crash

The crash can be reproduced every time.

-- Backtrace:
Application: Kleopatra (kleopatra), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  0x0000000000000000 in  ()
#7  0x000055e56d3ba684 in Kleo::Commands::GnuPGProcessCommand::Private::slotProcessFinished(int, QProcess::ExitStatus) (status=<optimized out>, code=<optimized out>, this=0x55e56fa2c570) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/gnupgprocesscommand.cpp:292
#8  operator() (status=<optimized out>, exitCode=<optimized out>, __closure=<optimized out>) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/gnupgprocesscommand.cpp:217
#9  QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<int, QProcess::ExitStatus>, void, Kleo::Commands::GnuPGProcessCommand::Private::init()::<lambda(int, QProcess::ExitStatus)> >::call (f=<optimized out>, arg=<optimized out>) at /usr/include/qt/QtCore/qobjectdefs_impl.h:146
#10 QtPrivate::Functor<Kleo::Commands::GnuPGProcessCommand::Private::init()::<lambda(int, QProcess::ExitStatus)>, 2>::call<QtPrivate::List<int, QProcess::ExitStatus>, void> (arg=<optimized out>, f=<optimized out>) at /usr/include/qt/QtCore/qobjectdefs_impl.h:256
#11 QtPrivate::QFunctorSlotObject<Kleo::Commands::GnuPGProcessCommand::Private::init()::<lambda(int, QProcess::ExitStatus)>, 2, QtPrivate::List<int, QProcess::ExitStatus>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=<optimized out>, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt/QtCore/qobjectdefs_impl.h:443
#12 0x00007f67c62d1097 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffcd31c8bc0, r=<optimized out>, this=0x55e56fa3c9e0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#13 doActivate<false>(QObject*, int, void**) (sender=0x55e56fa2c5d8, signal_index=11, argv=0x7ffcd31c8bc0) at kernel/qobject.cpp:3925
#14 0x00007f67c62287bd in QProcess::finished(int, QProcess::ExitStatus) (this=<optimized out>, _t1=<optimized out>, _t2=<optimized out>) at .moc/moc_qprocess.cpp:339
#15 0x00007f67c6225122 in QProcessPrivate::_q_processDied() (this=0x55e56fa38680) at io/qprocess.cpp:1184
#16 0x00007f67c6229b95 in QProcessPrivate::waitForFinished(int) (msecs=30000, this=0x55e56fa38680) at io/qprocess_unix.cpp:877
#17 QProcess::waitForFinished(int) (this=<optimized out>, msecs=30000) at io/qprocess.cpp:1930
#18 0x00007f67c6227533 in QProcess::~QProcess() (this=0x55e56fa2c5d8, this=<optimized out>) at io/qprocess.cpp:1266
#19 0x000055e56d3bedce in Kleo::Commands::GnuPGProcessCommand::Private::~Private() (this=0x55e56fa2c570, this=<optimized out>) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/gnupgprocesscommand.cpp:190
#20 Kleo::Commands::GnuPGProcessCommand::Private::~Private() (this=0x55e56fa2c570, this=<optimized out>) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/gnupgprocesscommand.cpp:190
#21 0x000055e56d39fdfb in kdtools::pimpl_ptr<Kleo::Command::Private>::~pimpl_ptr() (this=0x55e56fa367f8, this=<optimized out>) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/utils/pimpl_ptr.h:27
#22 Kleo::Command::~Command() (this=0x55e56fa367e0, this=<optimized out>) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/command.cpp:131
#23 0x000055e56d38314d in Kleo::Commands::GnuPGProcessCommand::~GnuPGProcessCommand() (this=0x55e56fa367e0, this=<optimized out>) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/gnupgprocesscommand.cpp:221
#24 Kleo::Commands::ExportPaperKeyCommand::~ExportPaperKeyCommand() (this=0x55e56fa367e0, this=<optimized out>) at /usr/src/debug/kleopatra/build/src/kleopatra_bin_autogen/4YNQ5GLRLQ/../../../../kleopatra-23.08.3/src/commands/exportpaperkeycommand.h:25
#25 Kleo::Commands::ExportPaperKeyCommand::~ExportPaperKeyCommand() (this=0x55e56fa367e0, this=<optimized out>) at /usr/src/debug/kleopatra/build/src/kleopatra_bin_autogen/4YNQ5GLRLQ/../../../../kleopatra-23.08.3/src/commands/exportpaperkeycommand.h:25
#26 0x00007f67c62c39fe in QObject::event(QEvent*) (this=0x55e56fa367e0, e=0x55e56fa396e0) at kernel/qobject.cpp:1334
#27 0x00007f67c73788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55e56fa367e0, e=0x55e56fa396e0) at kernel/qapplication.cpp:3640
#28 0x00007f67c629c168 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55e56fa367e0, event=0x55e56fa396e0) at kernel/qcoreapplication.cpp:1064
#29 0x00007f67c62a10cb in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55e56efac550) at kernel/qcoreapplication.cpp:1821
#30 0x00007f67c62e7138 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x55e56f206160) at kernel/qeventdispatcher_glib.cpp:277
#31 0x00007f67c410df69 in g_main_dispatch (context=0x7f67bc000ec0) at ../glib/glib/gmain.c:3476
#32 0x00007f67c416c327 in g_main_context_dispatch_unlocked (context=0x7f67bc000ec0) at ../glib/glib/gmain.c:4284
#33 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7f67bc000ec0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#34 0x00007f67c410c162 in g_main_context_iteration (context=0x7f67bc000ec0, may_block=1) at ../glib/glib/gmain.c:4414
#35 0x00007f67c62eaf7c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55e56f2e08f0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#36 0x00007f67c629ae74 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffcd31c9220, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#37 0x00007f67c629c313 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#38 0x00007f67c673bf12 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#39 0x00007f67c7376cda in QApplication::exec() () at kernel/qapplication.cpp:2832
#40 0x000055e56d374bce in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/main.cpp:287
[Inferior 1 (process 24303) detached]

Reported using DrKonqi
Comment 1 Ingo Klöcker 2024-11-05 20:46:16 UTC
Thanks for the report!

With a newer version of Kleopatra I cannot reproduce the crash anymore. I tested this with several keys. I always get just one password prompt and then an error message is displayed. It seems that canceling the password prompt is still not handled correctly, but at least it doesn't crash anymore. The remaining issue is tracked at https://dev.gnupg.org/T6091.

I'll close this report as FIXED because the crash has been fixed.