Page MenuHome GnuPG

Outlook 2016 64-bit: Crash if "Send to" > "Mail Recipient" is tried
Closed, ResolvedPublic


I tried to send an Excel sheet by right-clicking on the file in Explorer, then
"Send to" > "Mail Recipient."

A compose window opened, with the file attached, I entered two recipients, and
then pressed "Send."

-> Poof.

"Microsoft Outlook has stopped working."

In general GPG-OL seems to be working, because I can successfully check signed

The crash occurs independent of the file I'm trying to send. And the crash only
occurs if I use the procedure described above. If I open a new compose window
from inside Outlook (Ctrl-N), no crash occurs.

My Outlook version is "Microsoft Outlook 2016 MSO (16.0.4266.1001) 64-bit." I'm
in an AD-controlled environment with a lot of policies in place, but I'm a local

Please let me know if you need anything else from me apart from the above




Event Timeline

To make it clear: I'm not even trying to sign or encrypt, just send a plaintext
message with attachment also in the clear.

aheinecke lowered the priority of this task from Unbreak Now! to High.
aheinecke added a subscriber: aheinecke.

Thanks for the report. I am able to reproduce the problem.

Looking into it.

This could be a nasty one. The crash occurs after the data structure of the mail
was unloaded in outlook and GpgOL already completely detached it's event
handlers from the object and frees up the memory. GpgOL is not executing any
code when the crash occurs. That outlook blames GpgOL is likely because it jumps
into an invalid memory region that was allocated for GpgOL but is no longer
valid. This shouldn't happen though as we have already successfully unregistered
all our callbacks.

So I currently think that somehow when using send from explorer outlook through
some side effect / bug does a callback into GpgOL's event handling code which
was already destroyed. I'll try to confirm that theory on monday by keeping the
event handlers around after the unload event occurred.

Also does not appear that we are the first ones with that problem:



The Kaspersky issue is about Outlook 2007... Is that supposed bug really already
THAT old?!

I've tried this again with the current development version after a very large
refactoring how we handle mails. The bug appears to be gone. I've tested 10
times to send a file with closed / open outlook and with and without encryption

If I install gpg4win-2.3.3 on the same system / setup the crash is reliably

It's still likely that we made a reference counting error internally in code
that was changed / fixed now. And Outlook released the Mail object too early and

Kaspersky probably had some similar error in their code.

I'll upload a new Gpg4win beta with the new gpgol next. I'll ping in this issue
once thats done so you could ideally confirm that its fixed now.

Thanks a lot. I will test as soon as you release the test build.

I've just announced a new 3.0 beta that contains the updated GpgOL

Please let me know if it still crashes for you with that version.

aheinecke added a project: Testing.
aheinecke removed a project: Unreleased.
aheinecke added a subscriber: emanuel.

Jochen could you please test this on one of our test VM's again and resolve this then?

For me it works but better to test it on a different system, too as I don't understand what triggered this.

Tested with Gpg4win-3.0.0-beta17 with GpgOL-2.0.2-beta8 on Windows 10 (64bit) with Outlook 2016.

  • Tested with no Keyring at all (but GpgOL and Gpg4win installed) - Works
  • Tested with keys in keyring, but not for the recipient - Works
  • Tested with encryption and signing to recipient - Works

I consider this as done. Thank You!