<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>477798</bug_id>
          
          <creation_ts>2023-11-30 20:33:20 +0000</creation_ts>
          <short_desc>Kleopatra crashes after clicking cancel on the passphrase prompt while trying to use the &quot;Print Secret Key&quot;</short_desc>
          <delta_ts>2024-11-05 20:46:16 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kleopatra</product>
          <component>general</component>
          <version>3.1.28.230803</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>drkonqi</keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>nezu</reporter>
          <assigned_to name="Andre Heinecke">aheinecke</assigned_to>
          <cc>inb-bugzilla-1e1cff</cc>
    
    <cc>kloecker</cc>
    
    <cc>mutz</cc>
    
    <cc>pim-bugs-null</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2270035</commentid>
    <comment_count>0</comment_count>
    <who name="">nezu</who>
    <bug_when>2023-11-30 20:33:20 +0000</bug_when>
    <thetext>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: &quot;Arch Linux&quot;
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 -&gt; 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&lt;char []&gt; = {get() = &lt;optimized out&gt;}
[KCrash Handler]
#6  0x0000000000000000 in  ()
#7  0x000055e56d3ba684 in Kleo::Commands::GnuPGProcessCommand::Private::slotProcessFinished(int, QProcess::ExitStatus) (status=&lt;optimized out&gt;, code=&lt;optimized out&gt;, this=0x55e56fa2c570) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/gnupgprocesscommand.cpp:292
#8  operator() (status=&lt;optimized out&gt;, exitCode=&lt;optimized out&gt;, __closure=&lt;optimized out&gt;) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/gnupgprocesscommand.cpp:217
#9  QtPrivate::FunctorCall&lt;QtPrivate::IndexesList&lt;0, 1&gt;, QtPrivate::List&lt;int, QProcess::ExitStatus&gt;, void, Kleo::Commands::GnuPGProcessCommand::Private::init()::&lt;lambda(int, QProcess::ExitStatus)&gt; &gt;::call (f=&lt;optimized out&gt;, arg=&lt;optimized out&gt;) at /usr/include/qt/QtCore/qobjectdefs_impl.h:146
#10 QtPrivate::Functor&lt;Kleo::Commands::GnuPGProcessCommand::Private::init()::&lt;lambda(int, QProcess::ExitStatus)&gt;, 2&gt;::call&lt;QtPrivate::List&lt;int, QProcess::ExitStatus&gt;, void&gt; (arg=&lt;optimized out&gt;, f=&lt;optimized out&gt;) at /usr/include/qt/QtCore/qobjectdefs_impl.h:256
#11 QtPrivate::QFunctorSlotObject&lt;Kleo::Commands::GnuPGProcessCommand::Private::init()::&lt;lambda(int, QProcess::ExitStatus)&gt;, 2, QtPrivate::List&lt;int, QProcess::ExitStatus&gt;, void&gt;::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=&lt;optimized out&gt;, this_=&lt;optimized out&gt;, r=&lt;optimized out&gt;, a=&lt;optimized out&gt;, ret=&lt;optimized out&gt;) at /usr/include/qt/QtCore/qobjectdefs_impl.h:443
#12 0x00007f67c62d1097 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffcd31c8bc0, r=&lt;optimized out&gt;, this=0x55e56fa3c9e0, this=&lt;optimized out&gt;, r=&lt;optimized out&gt;, a=&lt;optimized out&gt;) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#13 doActivate&lt;false&gt;(QObject*, int, void**) (sender=0x55e56fa2c5d8, signal_index=11, argv=0x7ffcd31c8bc0) at kernel/qobject.cpp:3925
#14 0x00007f67c62287bd in QProcess::finished(int, QProcess::ExitStatus) (this=&lt;optimized out&gt;, _t1=&lt;optimized out&gt;, _t2=&lt;optimized out&gt;) 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=&lt;optimized out&gt;, msecs=30000) at io/qprocess.cpp:1930
#18 0x00007f67c6227533 in QProcess::~QProcess() (this=0x55e56fa2c5d8, this=&lt;optimized out&gt;) at io/qprocess.cpp:1266
#19 0x000055e56d3bedce in Kleo::Commands::GnuPGProcessCommand::Private::~Private() (this=0x55e56fa2c570, this=&lt;optimized out&gt;) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/gnupgprocesscommand.cpp:190
#20 Kleo::Commands::GnuPGProcessCommand::Private::~Private() (this=0x55e56fa2c570, this=&lt;optimized out&gt;) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/gnupgprocesscommand.cpp:190
#21 0x000055e56d39fdfb in kdtools::pimpl_ptr&lt;Kleo::Command::Private&gt;::~pimpl_ptr() (this=0x55e56fa367f8, this=&lt;optimized out&gt;) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/utils/pimpl_ptr.h:27
#22 Kleo::Command::~Command() (this=0x55e56fa367e0, this=&lt;optimized out&gt;) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/command.cpp:131
#23 0x000055e56d38314d in Kleo::Commands::GnuPGProcessCommand::~GnuPGProcessCommand() (this=0x55e56fa367e0, this=&lt;optimized out&gt;) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/commands/gnupgprocesscommand.cpp:221
#24 Kleo::Commands::ExportPaperKeyCommand::~ExportPaperKeyCommand() (this=0x55e56fa367e0, this=&lt;optimized out&gt;) 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=&lt;optimized out&gt;) 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=&lt;optimized out&gt;, 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=&lt;optimized out&gt;) 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&lt;QEventLoop::ProcessEventsFlag&gt;) (this=0x55e56f2e08f0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#36 0x00007f67c629ae74 in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) (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=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at /usr/src/debug/kleopatra/kleopatra-23.08.3/src/main.cpp:287
[Inferior 1 (process 24303) detached]

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2372115</commentid>
    <comment_count>1</comment_count>
    <who name="Ingo Klöcker">kloecker</who>
    <bug_when>2024-11-05 20:46:16 +0000</bug_when>
    <thetext>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&apos;t crash anymore. The remaining issue is tracked at https://dev.gnupg.org/T6091.

I&apos;ll close this report as FIXED because the crash has been fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>