Bug 144105 - LO crashes during mail merge wizard when an address block is modified
Summary: LO crashes during mail merge wizard when an address block is modified
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All Windows (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.3.0 target:7.2.1
Keywords: bibisected, bisected, regression
: 144154 (view as bug list)
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2021-08-26 15:50 UTC by P Cunningham
Modified: 2021-09-14 20:20 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
odt document 'Invoice' (14.24 KB, application/vnd.oasis.opendocument.text)
2021-08-29 12:16 UTC, P Cunningham
Details
ods data source (30.09 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-08-29 12:16 UTC, P Cunningham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description P Cunningham 2021-08-26 15:50:27 UTC
Description:
I have a mail merge document for writing invoices, linked to a spreadsheet. Both were converted from MS Office documents to .ods and .odt. The mail merge works properly. The address fields were normal fields, not in an address block.

I wanted to be able to omit empty address lines, so I modified the .odt document to include an address block. None of the templates available worked for my layout so I click <Edit> and adjust the layout of the address block. I click <OK>; LO crashes.
MAILMERGE

Steps to Reproduce:
1.open mail merge document
2.open mail merge wizard
3.edit address block
4. click <OK>
5. click <OK>

Actual Results:
LO crashes

Expected Results:
Mail merge document updated


Reproducible: Always


User Profile Reset: No



Additional Info:
If I accept one of the default address blocks this doesn't happen.

Crash report: f4de36a8-0698-487e-b4f3-8a95612b5f0a 

Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded
Comment 1 Roman Kuznetsov 2021-08-28 17:50:10 UTC
Please attach your ODT document and some simple ODS with non real addresses for checking
Comment 2 P Cunningham 2021-08-29 12:16:16 UTC
Created attachment 174601 [details]
odt document 'Invoice'
Comment 3 P Cunningham 2021-08-29 12:16:59 UTC
Created attachment 174602 [details]
ods data source
Comment 4 P Cunningham 2021-08-29 12:18:37 UTC
Steps to reproduce:

1. open 'Invoice.odt'
2. Tools>Mail Merge Wizard
3. Insert Address Block> check 'This document shall contain an address block'
4. More > Edit
5. rearrange to give: <Company Name>
			<Address Line 1>
			<Address Line 2>
			<Post Town>
			<Postcode>
6. Click 'OK'

- Crash!

The result is the same if the fields have been previously matched or not.
Comment 5 Roman Kuznetsov 2021-08-29 13:16:16 UTC
Confirm in

Version: 7.2.0.1.0+ (x64) / LibreOffice Community
Build ID: c3dd27d24dec0c581ed731acf8ff3504a4068b03
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: threaded

https://crashreport.libreoffice.org/stats/crash_details/9ee66cc9-3d8c-435b-833c-f9c8ceb107ed

but not in 7.1.3 => regression
Comment 6 Roman Kuznetsov 2021-08-29 14:14:56 UTC
I bisected it and got

https://git.libreoffice.org/core/commit/1320afe376bc52bc64995ba976391ec21db6ccde

https://gerrit.libreoffice.org/c/core/+/114846

Added to CC: Caolán McNamara
Comment 7 Roman Kuznetsov 2021-08-29 17:25:25 UTC
*** Bug 144154 has been marked as a duplicate of this bug. ***
Comment 8 Commit Notification 2021-08-30 18:45:09 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/03e108f27b91dddc8fabc6f52f18afd6aac8666a

tdf#144105 crash after closing edit address block dialog

It will be available in 7.3.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 9 Caolán McNamara 2021-08-30 18:47:31 UTC
that should do it, backport to 7-2 and 7-2-1 in gerrit
Comment 10 Commit Notification 2021-08-31 09:02:46 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/e7d7b013bc3014b8df78118ca0790bda121af501

tdf#144105 crash after closing edit address block dialog

It will be available in 7.2.2.

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 11 P Cunningham 2021-08-31 09:59:14 UTC
Version: 7.2.2.0.0+ (x64) / LibreOffice Community
Build ID: 72fa08057ad46d998f315f17f71c9b8aa65d2e14
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

Unfortunately this doesn't seem to have fixed the issue. Using the same test .odt and .ods documents I uploaded I still get the same result following the same steps.

Thank you for your help!
Comment 12 P Cunningham 2021-08-31 10:23:42 UTC
Sorry, I just realised the build I downloaded was dated before your last post here. I'll try again tomorrow.

Thank you again!!!
Comment 13 Roman Kuznetsov 2021-08-31 11:10:59 UTC
(In reply to P Cunningham from comment #12)
> Sorry, I just realised the build I downloaded was dated before your last
> post here. I'll try again tomorrow.
> 
> Thank you again!!!

Better try after two days after merged fix
Comment 14 Commit Notification 2021-09-02 14:56:00 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-2-1":

https://git.libreoffice.org/core/commit/c7c209ddb55da8b8e49e1a37bb49816987d8e109

tdf#144105 crash after closing edit address block dialog

It will be available in 7.2.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.
Comment 15 P Cunningham 2021-09-14 15:46:02 UTC
This is now working much better in Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: bc7baa18435000f47f90e47d3300710bcb4cf56b
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

- thank you!

But 'Suppress lines with just empty fields' doesn't seem to be working.
Comment 16 P Cunningham 2021-09-14 15:49:34 UTC
Just to be clear, if I have some records with all the lines filled and some records with one line empty (<Address line 2>, which maps to <Client Address 2>), the empty line is not suppressed.
Comment 17 Roman Kuznetsov 2021-09-14 20:20:29 UTC
(In reply to P Cunningham from comment #16)
> Just to be clear, if I have some records with all the lines filled and some
> records with one line empty (<Address line 2>, which maps to <Client Address
> 2>), the empty line is not suppressed.

I think it's another problem, please file a new bug report. Thank you