[Psi-Devel] Sending GnuPG-encrypted (chat-) message makes Psi hang/block for ~2 seconds

Justin Karneges justin-psi2 at affinix.com
Mon Oct 8 11:27:47 PDT 2007


On Monday 08 October 2007 10:53 am, Andreas Ntaflos wrote:
> Hello devs, list,
>
> I finally get around to report this somewhat odd behaviour. Composing
> a chat or regular message that should be encrypted when sent makes Psi
> block for about two seconds; meaning it is unresponsive for two
> seconds, no input or clicking possible, no redraws taking place. It
> basically hangs until it gets the message out of the door.

We use QProcess to launch the 'gpg' executable, and this should be 
asynchronous.  The rest of QCA and Psi is also asynchronous with respect to 
these operations.  My best guess is that you've found a bug in Qt, and that 
some part of the QProcess launching and/or usage is actually not 
asynchronous.  I've noticed a similar effect when clicking URLs in Psi: 
freezing while launching the browser with QProcess, so I'm not entirely 
surprised by this report.  However, I've never seen it happen with gpg.

It could be that this is a bug in Qt that only affects you, or perhaps it is a 
bug in Qt that affects everyone but you have an unusually long gpg startup 
time.  Getting to the bottom of this may take some work.

Attached is a simple patch to display some extra debug information.  Run Psi 
from the console, and tell me if there is a 2-second gap between both 
printfs.

-Justin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpgproc1.diff
Type: text/x-diff
Size: 567 bytes
Desc: not available
Url : http://lists.affinix.com/pipermail/psi-devel-affinix.com/attachments/20071008/c0a0dad6/attachment.bin 


More information about the Psi-Devel mailing list