Page MenuHome GnuPG

Kleopatra: Exception when gpgconf is not found
Closed, ResolvedPublic

Description

Noticed in support that someone had Gpg4win installed as User, and afterwards GnuPG VS-Desktop was installed. The registry key HKCU\SOFTWARE\GnuPG Install Directory pointed still to c:\Users\username\AppData\Local\GnuPG which did no longer exist.

This causes Kleopatra not to fail the self test or otherwise fail gracefully but instead to throw an std::runtime_error, which on Windows looks like a crash. On Linux we see:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Der Ordner für GnuPG lässt sich nicht bestimmen. Möglicherweise müssen Sie die Variable GNUPGHOME verwenden.

In the Procmon Output we see:

Which leads me to believe that in this case the fallback searches in gpgme-w32-io would work for gpg4win default installation but would not work for GnuPG VS-Desktop. So gpgconf is not found. But in that case we should not crash.

This issue is easy to reproduce if you rename gpgconf.exe in the gnupg install directory to something else.