Bug 90230 - MAILMERGE: dbgutil build aborts on mail merging an empty document
Summary: MAILMERGE: dbgutil build aborts on mail merging an empty document
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: Other Linux (All)
: medium minor
Assignee: Miklos Vajna
URL:
Whiteboard: lhm-limux target:5.0.0 target:4.4.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-03-25 14:21 UTC by Jan-Marek Glogowski
Modified: 2015-12-17 08:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
A dummy sheet used as a dbgutil repo mail merge DB (6.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-04-03 07:28 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 2015-03-25 14:21:10 UTC
This just happens with a "--enable-dbgutil" build!

Just try to merge an empty document with any data source. Same happens, if you insert a single text frame.

Won't happen, if the document has more then one paragraph or multiple lines.

soffice.bin:sw/source/core/bastyp/index.cxx:225: 

virtual SwIndexReg::~SwIndexReg(): Assertion `!m_pFirst && !m_pLast && "There are still indices registered"' failed.

Currently it's not that critical, but some of our upcomming unit tests will definitly break on dbgutil builds.

Took me some time to fix this originally, so I bisected it to:

commit a305a2c91420652db450b7f8edd140e1d69f42cf
Author: Luboš Luňák <l.lunak@collabora.com>
Date:   Mon Oct 20 15:13:03 2014 +0200

    use bookmarks to mark mailmerge parts in a mailmerge document (fdo#80823)
    
    Instead of page numbers, which
    - was somewhat fragile (and broken, as it was actually off-by-one)
    - required repeated re-layout of the increasingly large document, making
      mailmerge awfully slow. The re-layout is not removed by this commit, as
      it needs further checking whether it can be removed.
    See the bugreport for details.
    
    Change-Id: Ib09bd5f5a6a549c3d38ca40b0f32c0d2831fdd4c
Comment 1 Jan-Marek Glogowski 2015-03-25 14:24:02 UTC
Found it when I tired fixing bug 80822.
Comment 2 Julien Nabet 2015-03-25 20:32:07 UTC
I don't think root cause of crash of tdf#90185 may be linked but perhaps I missed something.
Comment 3 Matthew Francis 2015-03-30 11:00:44 UTC
Adjusted Whiteboard / Keywords according to comment 0

However, I can't actually reproduce this using the 4.5 dbgutil bibisect repo. (I could reproduce bug 90185 which had a different cause)
Comment 4 Jan-Marek Glogowski 2015-04-03 07:28:00 UTC
Created attachment 114572 [details]
A dummy sheet used as a dbgutil repo mail merge DB

So I checked out the dbgutil repo, and - for me - it crashes with the same assertion.

Info missed from the original bug report: You need to disable all modifiying default wizard entries.

The dbgutil repo doesn't contain the default biblio DB, so I created a dummy one. See attachment.

Steps to reproduce:

 * ./opt/program/soffice -env:UserInstallation=file:///tmp/soffice-bisect --writer
 * Mail Merge Wizard ...
 * Next => Next => Select address list ... => Add ... => dummy.ods => <Select DB> => Ok
 * Unselect "This document shall contain an address block"
 * Click "4. Create salutation" (as you can't click "next" - sig)
 * Unselect "This document should contain a salutation"
 * Click "6. Edit document"
 * Next => Crash

P.S. yeah - I know the wizard is quite broken...
Comment 5 Matthew Francis 2015-04-04 07:13:28 UTC
Reproduced following comment 4 - thanks for the update
-> NEW

Adding Cc: to l.lunak@collabora.com; As mentioned in comment 0, this is another one from your mail merge work. Could you possibly take a look? Thanks
Comment 6 Commit Notification 2015-04-10 11:19:15 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#90230 SwDoc::AppendDoc: take care of marks when inserting page break

It will be available in 5.0.0.

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 7 Commit Notification 2015-04-14 20:04:56 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

tdf#90230 SwDoc::AppendDoc: take care of marks when inserting page break

It will be available in 4.4.3.

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 8 Commit Notification 2015-04-16 21:10:00 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#90230 SwDoc::AppendDoc: take care of marks when inserting page break

It will be available in 5.0.0.

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 9 Robinson Tryon (qubit) 2015-12-17 08:50:04 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]