Bug 133426 - Crash attempting to save mail merge to file multiple times in parallel
Summary: Crash attempting to save mail merge to file multiple times in parallel
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:7.0.0 target:6.4.5
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-27 08:15 UTC by Michael Weghorn
Modified: 2020-06-01 15:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
sample data (11.14 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-05-27 08:16 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2020-05-27 08:15:11 UTC
Description:
Writer hits an assert when pressing the button to save the mail merge result to a single file if that was done earlier and is still in progress.

Steps to Reproduce:
1. Start Writer with a new document
2. Run mail merge wizard ("Tools" -> "Mail Merge Wizard"), choosing e.g. the attached "numbers.ods" as data source (choose one that has many entries to make step 5) easier
3. Select "Save Merged Documents" in the mail merge toolbar
4. keep "Save as a single large document" selected, press "Save Documents"
 -> a dialog showing the progress appears, but it is not modal
5. press "Save Documents" in the dialog again (possible, since the other one is not modal)

Actual Results:
When using a debug build:

LO hits an assert, "crashes"; output:

soffice.bin: /home/michi/development/git/libreoffice/sw/source/uibase/dbui/dbmgr.cxx:422: bool SwDBManager::Merge(const SwMergeDescriptor&): Assertion `!m_bInMerge && !m_pImpl->pMergeData && "merge already activated!"' failed.

When using a non-debug build: LO does not crash at once, but still crashed for me at some point when I had multiple of those dialogs running, cancelled one of them (exact scenario maybe more complex than when using a debug build)

Expected Results:
No crash.
While the first run is still in progress, it should not be possible to try to start another one.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Behaviour is the same when e.g. trying to print instead of saving to a file.

Version: 7.0.0.0.alpha1+
Build ID: 50b76d9bf3747e1b5bcb6ce189337872db379e45
CPU threads: 4; OS: Linux 5.6; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 1 Michael Weghorn 2020-05-27 08:16:03 UTC
Created attachment 161314 [details]
sample data
Comment 2 Michael Weghorn 2020-05-27 08:19:54 UTC
Fix pending in Gerrit: https://gerrit.libreoffice.org/c/core/+/94933
Comment 3 Commit Notification 2020-05-27 09:15:59 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/77140de3fe925f75620e94dbd848b1c925935fb5

tdf#133426 Make mail merge progress dialog modal

It will be available in 7.0.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 4 Commit Notification 2020-06-01 15:47:14 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/4c75fe312fd15dfe0556c6342586edae4ca5015d

tdf#133426 Make mail merge progress dialog modal

It will be available in 6.4.5.

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.