Bug 77720 - MAILMERGE: Writer crashes when running Mail Merge Wizard
Summary: MAILMERGE: Writer crashes when running Mail Merge Wizard
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.3.0 target:4.2.5
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-21 09:10 UTC by Alex Kempshall
Modified: 2015-10-09 13:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with symbols (4.83 KB, text/plain)
2014-04-21 11:42 UTC, Julien Nabet
Details
bt with symbols on 4.2 (10.90 KB, text/plain)
2014-04-21 12:05 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Kempshall 2014-04-21 09:10:50 UTC
When using the MailMerge wizard with a bespoke address list the merged document contains empty address blocks none of the variable data is used. This occurs in both Linux and XP versions.

This procedure was OK in version 4.1.4.

Steps to produce the error -

1.
Start LibreOffice writer with empty text document.

2.
Tools -> MailMerge Wizard

3.
IN the "Select Starting Document" Dialog select the "Use Current Document" Radio Button. Then press the "Next" Button.

4.
In the "Select Document Type" Dialog select the "Letter" Radio Button. Then press the "Next" Button.

5.
In the "Insert Address Block" Dialog press the "Select Different Address List" Button.

6.
In the "Select Address List" dialog press the "Create" Button.

7.
In the "New Address" List Dialog enter the text "ABC" in the Company Name field and press the "New" Button.

8.
In the "New Address" List Dialog enter the text "DEF" in the Company Name field and press the "New" Button.

9.
In the "New Address" List Dialog enter the text "GHI" in the Company Name field and press the "OK" Button.

10.
In the "Name" Field of the "Save" Dialog enter a name of the CSV file to be saved i.e. CompanySeed. Then press the "Save" button.

11.
In the "Select Address List" Dialog press the "OK" Button.

12.
In the "Insert Address Block" Dialog check the "This document must contain an address block" Tick Box. Press the "More" Button.

13.
In the "Select Address Block" Dialog select the preferred address block and press the "Edit" Button.

14.
In the "Drag Address Elements Here" Panel of the "Edit Address Block" dialog delete all entries so the Panel is empty.

15.
Still in the "Edit Address Block" dialog select the "Company Name" address element in the left hand panel and drag it to the "Drag Address Elements Here" Panel. Can also use the right pointing arrow.

16.
The "Drag Address Elements Here" Panel should only contain the "Company Name" and the "Preview" Panel should contain the text "ABC". Press the "OK" Button.

17.
In the "Select Address Block" dialog. Press the "OK" button

18.
In the "Insert Address Block" Dialog press the "Next" Button.

19.
In the "Create Salutation" Dialog uncheck the "This document should contain a salutation" Tick Box and press the "Next" Button.

20.
In the "Adjust Layout" Dialog press the "Next" Button.

21.
In the "Edit Document" Dialog press the "Next" Button.

22.
A Message box should appear counting the 3 Company Names to be merged as entered in the steps above. However. only the first record appears to be processed.

23.
The "Libreoffice Document Recovery" dialog appears.

24.
Libreoffice crashes.

Alex
Comment 1 Alex Kempshall 2014-04-21 09:32:00 UTC
The paragraph in the first comment should read -

The MailMerge wizard crashes when creating merged documents.
Comment 2 Julien Nabet 2014-04-21 11:42:48 UTC
Created attachment 97683 [details]
bt with symbols

On pc Debian x86-64 with master sources updated today, I had a crash just at the end of the step 19.
Comment 3 Julien Nabet 2014-04-21 12:05:13 UTC
Created attachment 97684 [details]
bt with symbols on 4.2

On pc Debian x86-64 with 4.2 sources updated some days ago, I reproduced a crash at the same step as the reporter.
The bt is different from the one I retrieved from master sources.
Comment 4 Julien Nabet 2014-04-21 12:06:09 UTC
I put it at ALL instead of 32 bits only since I retrieved bts from x86-64.
Comment 5 Alex Kempshall 2014-04-21 16:45:59 UTC
On Master 

Version: 4.3.0.0.alpha0+
Build ID: 1a5457a11c062be8c41cc00813c092b78aa42b8b

I too get LO to crash between Step 19 and Step 20. It actually gets to the "Adjust Layout" dialog then crashes before any user interaction. This crash in Master is earlier than the crash reported in this ticket. The crash in Master doesn't even recover itself.

So probably have here two different bugs. Maybe the bug relating to Master should be split out into a new bug report.
Comment 6 Julien Nabet 2014-04-21 16:58:51 UTC
Just for info, here are 2 patches I submitted for review:
- https://gerrit.libreoffice.org/9111
- https://gerrit.libreoffice.org/9113

Alex: I'll give a new try.
Comment 7 Alex Kempshall 2014-04-28 08:38:40 UTC
Hi Julien

I've tested against master and all works OK. I had to apply one of the patches manually.

I've also back ported both patches to branch 4.3.4.1 on my clone and there work there too.

Thanks for the help.

What happens now? Will they both be officially patched to 4.3.4?

Alex
Comment 8 Julien Nabet 2014-04-28 08:48:09 UTC
Alex: I think you meant 4.2.4
For the moment, the patches are on review for 4.2 branch, one of them makes a test fail.
For 4.2.4, I don't think there'll be enough time, see https://wiki.documentfoundation.org/ReleasePlan#4.2_release
Comment 9 Alex Kempshall 2014-04-28 09:39:29 UTC
Julien

I did indeed mean 4.2.4!!

Thanks for the update

Alex
Comment 10 Commit Notification 2014-05-08 11:47:33 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6d14a2c264506e8d5272e87e99f140b1f976b6ef

Related: fdo#77720 Writer crashes when running Mail Merge Wizard



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2014-05-09 10:01:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=abb0549dd1744a35b0464faac55999b0d5968212

fdo#77720: Mail Merge: reset cursors after clearing document



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2014-05-09 10:24:17 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b5f4a53d6d718e170303ea3d9344f86735fb8c99&h=libreoffice-4-2

fdo#77720: Mail Merge: reset cursors after clearing document


It will be available in LibreOffice 4.2.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Michael Stahl (CIB) 2014-05-09 10:29:52 UTC
forgot to mention:

commit 02172de1a9c1f4442514cc79583ecd0a46331f45 fixes the
crash from description on 4.2 (but wasn't added by the bot?);
the crash from comment #2 is fixed by comment #11 and i have
no idea why it's happening on master only for me,
timers running in different order or something like that.