Access violation using gpgme

Daniel Lo Nigro d at
Tue Feb 5 19:21:45 CET 2019

 I'm trying to track down an access violation I'm encountering while using
GPGME to encrypt and decrypt data from within a C# app. This is the error
I'm hitting: "Exception thrown at 0x0057E018 in dotnet.exe: 0xC0000005:
Access violation executing location 0x0057E018". Unfortunately I have not
been successful in getting debug symbols working in neither gdb on Windows
nor Visual Studio, so I haven't been able to look at a native stack trace
to work out where it's coming from :(

I'm using gpgme_set_pinentry_mode to set the pinentry mode to "loopback",
and the access violation is being encountered after my pinentry callback
returns. It works fine if I don't use loopback, and instead use the
system's pinentry mechanism.

Windows 10 version 1809
gpg version 2.2.11
gpgme 1.12.1

I can post the full code if needed, but basically it's a modified version
of the PgpEncryptDecrypt sample from gpgme-sharp:

Log from when I call gpgme_op_encrypt until the app crashes:
Log for the entire session (finds a key, encrypts some data, then tries to
decrypt it):

Daniel Lo Nigro | Twitter <> | Facebook
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Gnupg-devel mailing list