Found it: I did not initialize gpgme_op_interact's last parameter out with gpgme_data_new. The error is now gone.