This happens quite rarely but when reencrypt 1000 emails, it will happens at least once and then block the whole process
When using QGpgME::EncryptJob with exec, I get the following backtrace (with start(), the job just never ends up calling finished)
#0 0x00007f3f08e87402 in __syscall_cancel_arch () from /lib64/libc.so.6 #1 0x00007f3f08e7b72a in __internal_syscall_cancel () from /lib64/libc.so.6 #2 0x00007f3f08e7b774 in __syscall_cancel () from /lib64/libc.so.6 #3 0x00007f3f08ef4a0e in poll () from /lib64/libc.so.6 #4 0x00007f3f09dc6d0f in _gpgme_io_select_poll (fds=0x7f3ee00039f0, nfds=10, nonblock=0) at /home/carl/kde6/src/gpgme/src/posix-io.c:761 #5 _gpgme_io_select (fds=0x7f3ee00039f0, nfds=10, nonblock=nonblock@entry=0) at /home/carl/kde6/src/gpgme/src/posix-io.c:928 #6 0x00007f3f09d9dd39 in _gpgme_wait_on_condition (ctx=ctx@entry=0x7f3e98c62eb0, cond=cond@entry=0x0, op_err_p=op_err_p@entry=0x0) at /home/carl/kde6/src/gpgme/src/wait-private.c:83 #7 0x00007f3f09d9df49 in _gpgme_wait_one (ctx=ctx@entry=0x7f3e98c62eb0) at /home/carl/kde6/src/gpgme/src/wait-private.c:166 #8 0x00007f3f09d9f134 in gpgme_op_encrypt_ext (ctx=0x7f3e98c62eb0, recp=0x3da43b0, recpstring=0x0, flags=GPGME_ENCRYPT_ADD_RECP, plain=0x390d980, cipher=0x390ea00) at /home/carl/kde6/src/gpgme/src/encrypt.c:336 #9 0x00007f3f09df7b27 in GpgME::Context::encrypt (this=this@entry=0x44cf490, recipients=std::vector of length 1, capacity 1 = {...}, plainText=..., cipherText=..., flags=flags@entry=GpgME::Context::AddRecipient) at /home/carl/kde6/src/gpgmepp/src/context.cpp:1391 #10 0x00007f3f09ece435 in encrypt (ctx=ctx@entry=0x44cf490, thread=thread@entry=0x0, recipients=std::vector of length 1, capacity 1 = {...}, plainText_=std::weak_ptr<QIODevice> (use count 3, weak count 1) = {...}, cipherText_=std::weak_ptr<QIODevice> (empty) = {...}, eflags=GpgME::Context::AddRecipient, outputIsBsse64Encoded=false, inputEncoding=1296137311, fileName=Python Exception <class 'gdb.error'>: Invalid reinterpret_cast ) at /home/carl/kde6/src/gpgmeqt/src/qgpgmeencryptjob.cpp:137 #11 0x00007f3f09ecec01 in encrypt_qba (ctx=0x44cf490, recipients=std::vector of length 1, capacity 1 = {...}, plainText=Python Exception <class 'gdb.error'>: Invalid reinterpret_cast , eflags=eflags@entry=GpgME::Context::AddRecipient, outputIsBsse64Encoded=<optimized out>, inputEncoding=1296137311, fileName=Python Exception <class 'gdb.error'>: Invalid reinterpret_cast ) at /home/carl/kde6/src/gpgmeqt/src/qgpgmeencryptjob.cpp:164 #12 0x00007f3f09eced89 in QGpgME::QGpgMEEncryptJob::exec (this=0x3fdff80, recipients=std::vector of length 1, capacity 1 = {...}, plainText=Python Exception <class 'gdb.error'>: Invalid reinterpret_cast