Bug Hunting Session
Bug 126597 - Don't crash Outlook 2016 when sending multiple attachments mail via SimpleMail
Summary: Don't crash Outlook 2016 when sending multiple attachments mail via SimpleMail
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.5.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0 target:6.2.7 target:6.3.1
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-29 13:05 UTC by Jan-Marek Glogowski
Modified: 2019-08-02 06:25 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Crash macro (9.12 KB, application/vnd.oasis.opendocument.text)
2019-07-29 13:08 UTC, Jan-Marek Glogowski
Details
Dummy attachment a.pdf (1.18 KB, application/pdf)
2019-07-29 13:09 UTC, Jan-Marek Glogowski
Details
Dummy attachment b.pdf (1.18 KB, application/pdf)
2019-07-29 13:09 UTC, Jan-Marek Glogowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Marek Glogowski 2019-07-29 13:05:44 UTC
Description:
LO provides the SimpleMail interface to compose and send mails on Windows using a wrapped MAPI.

When using SimpleMail with multiple attachments, this crashes Outlook 2016 or returns an MAPI_E_FAILURE.

This is a regression from commit 5874c7637156 ("tdf#116074: Use modeless dialogs with supporting mailers"). There seems to be multiple problems with the usage of MAPI_DIALOG_MODELESS.

Even IE uses MAPI_DIALOG and threads, to prevent the blocking.





Steps to Reproduce:
1. Execute the attached email macro

or 

1. run senddoc.exe with a variant of
--subject Test
--to SMTP:a@b.cd
--attach C:\Users\JAN-MA~1\AppData\Local\Temp\lu2996h1g7x4.tmp
--attach-name a.pdf
--attach C:\Users\JAN-MA~1\AppData\Local\Temp\lu2996h1g7x5.tmp
--attach-name b.pdf
--mapi-dialog
--mapi-logon-ui
--langtag de-DE
--bootstrap file:///C:/LODEV/program/soffice.ini

For the macro variant senddoc.exe is run in the background for current LO master.

Actual Results:
Outlook 2016 crashes (most times) or reports an MAPI_E_FAILURE.

Expected Results:
No crash


Reproducible: Always


User Profile Reset: No



Additional Info:
Just happens with software that actually supports MAPI_DIALOG_MODELESS.
Comment 1 Jan-Marek Glogowski 2019-07-29 13:08:48 UTC
Created attachment 153032 [details]
Crash macro
Comment 2 Jan-Marek Glogowski 2019-07-29 13:09:15 UTC
Created attachment 153033 [details]
Dummy attachment a.pdf
Comment 3 Jan-Marek Glogowski 2019-07-29 13:09:30 UTC
Created attachment 153034 [details]
Dummy attachment b.pdf
Comment 4 Oliver Brinzing 2019-07-29 17:41:01 UTC
> Outlook 2016 crashes (most times) or reports an MAPI_E_FAILURE.

confirming, reproducible in our windows 7 environment
Comment 5 Commit Notification 2019-07-30 14:15:58 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/e79f61340405dcc75f3fe41f727dea4ba4202c2e%5E%21

tdf#126597 don't use modeless dialog for senddoc.exe

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2019-08-02 06:15:59 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/222e3782dfa885370c5adbaf87aeed4fcbb5f107%5E%21

tdf#126597 don't use modeless dialog for senddoc.exe

It will be available in 6.2.7.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2019-08-02 06:25:19 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/b2c651b378b52f823b8350aece0fd1e6b914bdc5%5E%21

tdf#126597 don't use modeless dialog for senddoc.exe

It will be available in 6.3.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.