Bug 101602 - Writer crashes opening/saving document with too many drawing objects
Summary: Writer crashes opening/saving document with too many drawing objects
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All Windows (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2016-08-19 06:53 UTC by Eric Ding
Modified: 2018-03-10 12:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
One page of many graphics (41.32 KB, application/vnd.oasis.opendocument.text)
2016-08-19 06:55 UTC, Eric Ding
Details
Backtrace of crash with 5.4 (9.09 KB, text/plain)
2017-02-03 20:08 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Ding 2016-08-19 06:53:50 UTC
I've been working on a document with a significant number of line art objects (that is, art composed of drawing objects, not imported bitmap images).  As the number of objects increases, using Writer to work on the document slows, but more critically, above a certain threshold of objects, Writer freezes/crashes altogether when saving the document.

So far, I've only been able to reproduce this on Windows (one 32-bit Win7 system, one 64-bit Win7 system), but not on Linux (running LO 5.0.3 on Mint).

I've attached a small ODT file that can be used to reproduce this issue.

The file (Too Many Images.odt) is simply one page of all the images in our original document (grouped together for convenience).  To reproduce, I repeatedly copy the object group, paste it onto the next (blank) page, and save.  Typically, Writer freezes/crashes when trying to save after page 9 or 10 of this routine.

Incidentally, if I create a document on Linux with 10+ pages of this object group, I can successfully save and open it, but if I open that file on Windows, then Writer freezes and crashes.

By "freeze/crash", I mean that a blank dialog window quickly opens and disappears and the main window graphics/text/toolbar is distorted or blank.  Playing around at this stage reveals that the otherwise unresponsive window can be closed by pressing the Esc key, after which the application crashes altogether.
Comment 1 Eric Ding 2016-08-19 06:55:29 UTC
Created attachment 126900 [details]
One page of many graphics
Comment 2 Eric Ding 2016-08-19 06:58:03 UTC
I can also reproduce this error (and originally encountered it, actually) when adding sub-documents to a master document.  In that scenario, adding this document file to a master document, then saving, then repeating also eventually leads to a freeze/crash.  But my original bug report was aimed at keeping it simple; I assume if the issue involving copy/paste can be fixed, it will also resolve the scenario involving master documents.
Comment 3 Buovjaga 2016-09-16 06:59:21 UTC
Yep, I can make it crash on Windows after reaching page 9 (paste, save, paste, save..).

I used the drawing tool selection to select them.

It seems I am unable to get a useful backtrace. Let's hope builds from tinderbox 39 resume as they contain debug symbols.

Win 7 Pro 64-bit Version: 5.3.0.0.alpha0+
Build ID: ba269f7294e2416659011cbb498a2c6b5f9d5199
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-09-12_02:36:16
Locale: fi-FI (fi_FI); Calc: CL

4.3.0.1
Comment 4 Timur 2017-02-03 17:11:00 UTC
I may be wrong, but I can't repro with 5.4+ on Windows.
Comment 5 Buovjaga 2017-02-03 18:05:24 UTC
(In reply to Timur from comment #4)
> I may be wrong, but I can't repro with 5.4+ on Windows.

I can still repro with 

Win 10
Version: 5.4.0.0.alpha0+
Build ID: 1c27286b9d5331634c073cd3e327bd941e61bbb6
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-01-23_03:24:17
Locale: fi-FI (fi_FI); Calc: group

I will try TB39 build with debug stuff.
Comment 6 Buovjaga 2017-02-03 20:08:30 UTC
Created attachment 130893 [details]
Backtrace of crash with 5.4

Version: 5.4.0.0.alpha0+
Build ID: c2850bab4f7e5700151a18d806268f2b86a25d56
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-01-24_03:10:33
Locale: fi-FI (fi_FI); Calc: group
Comment 7 QA Administrators 2018-02-04 03:30:36 UTC Comment hidden (obsolete)
Comment 8 Andrew 2018-03-10 02:28:37 UTC
Version: 6.0.2.1 (x64)
Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
Locale: en-AU (en_AU); Calc: CL

Works for me, tested up to 20 pages of the images.
Comment 9 Buovjaga 2018-03-10 12:09:56 UTC
It's true, I can't repro this anymore. It doesn't seem to be about 32-bit vs. 64-bit as the memory used was still only 277MB after 11 pages of pasting.

Version: 6.1.0.0.alpha0+ (x64)
Build ID: 77db2da61658906c354084b13a95f1102949fbd0
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-03-04_22:51:24
Locale: fi-FI (fi_FI); Calc: group