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

Description

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
messages.

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
administrator.

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

Thanks!

Details

Version
1.4.1.5
ralfbergs set Version to 1.4.1.5.
ralfbergs added a subscriber: ralfbergs.

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.Aug 12 2016, 12:41 PM
aheinecke claimed this task.
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:
https://forum.kaspersky.com/index.php?showtopic=225375

:-/

Interesting...

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
active.

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

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
crashed.

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.

aheinecke closed this task as Resolved.

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

http://lists.wald.intevation.org/pipermail/gpg4win-devel/2016-November/001659.html

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

aheinecke reopened this task as Open.Nov 16 2016, 10:13 AM
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.

JochenSaalfeld closed this task as Resolved.Nov 14 2017, 1:55 PM

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!