Bug 95941 - Writer crashes while deleting paragraphs spanning over multiple pages
Summary: Writer crashes while deleting paragraphs spanning over multiple pages
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.2.1 rc
Hardware: x86-64 (AMD64) Windows (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard: Repro:5.3+
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-20 07:45 UTC by narayanaras
Modified: 2017-07-10 15:43 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["SwFrame::InsertBefore(SwLayoutFrame *,SwFrame *)"]


Attachments
Problematic file (1.09 MB, application/vnd.oasis.opendocument.text)
2015-11-20 07:45 UTC, narayanaras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description narayanaras 2015-11-20 07:45:25 UTC
Created attachment 120673 [details]
Problematic file

I am trying to delete certain paragraphs from an odt file. The selection usually spans over multiple headings (level 1-3) and a mix of text and tables that span over multiple pages.

But as soon as I delete certain selection, the Writer crashes.

Sometimes it crashes without any warning, but at other times it gives the following error message:

SEH exception: Access violation
[OK]

When I press "OK", LO crashes.

Each time I have to pass through recovery cycle (save -> open).

I restarted the PC, and started only LO (to avoid any resource overload issues), but the problem persists.

I have now resorted to deleting a small paragraph at a time and save the document. But the progress is painfully slow.
Comment 1 narayanaras 2015-11-20 08:08:04 UTC
I tried a new technique: Started selecting the text from the bottom of the document and worked upwards. This worked, and I was able to delete the text without a crash. 

This is a strong clue! It means that the Writer was unable to repaginate the document when text was deleted from the top. (That was not needed when I deleted text from bottom.)

This points to an old issue with LibreOffice (inherited from its OO days): The LO algorithm cannot repaginate the text if the layout is complex. 

Typically, Writer crashes when the file has this combination of complexities:
* Tables that span over multiple pages
* Tables that have merged cells
* Nested tables (within other tables)
* Images anchored inside tables
* Hyperlinks to both bookmarks and headings
* Footnotes, some of which may spill over on next page. 

Note that in my document, the hyperlinks and footnotes are inserted in a table and also embedded in free-flow text.

*****

BTW reporting for the following PC:

HP Compaq 6000 Pro MT PC
Windows 7 Professional (32 bit), SP-1
CPU: E7500 @2.93 GHz
RAM: 4 GB
Comment 2 tommy27 2015-11-22 19:56:17 UTC
crash reproduced under Win8.1 x64 using LibO 5.0.3.1
status NEW

would you please create a minimal test case isolating just the pages that trigger the crash?
Comment 3 Timur 2016-10-28 18:28:04 UTC
The crash report was successfully uploaded.
You can soon find the report at:
crashreport.libreoffice.org/stats/crash_details/6616f491-0af3-45a0-afce-b7c17fb6d9f3
Comment 4 Xisco Faulí 2017-04-24 19:38:27 UTC
While trying to reproduce the crash, I reproduced another one ( bug 107398 ) so is this crash happening right after some content is deleted or when the files is closed as the other one ?
Could someone explain the detailed steps to reproduce the crash?
Regards
Comment 5 Xisco Faulí 2017-04-25 17:51:38 UTC
Another crash reported using the same document -> bug 107427
Comment 6 Michael Stahl (allotropia) 2017-04-26 19:36:44 UTC
on Linux, i fail to reproduce any crash when deleting stuff
at random from the document.

this is on current master with bugs from comment #4 and comment #5 fixed.

it's quite likely that the crash here was the same as comment #4 / bug 107398,
as that was caused by deleting something and then repagination
creating an invalid empty footnote container frame.

the crash in comment #3 also could be caused by that.

so i guess unless somebody comes up with reproduction steps for a
crash on current master (or 5.3 once fixes are backported) we can close this.
Comment 7 Xisco Faulí 2017-04-27 21:26:48 UTC
(In reply to Michael Stahl from comment #6)
> on Linux, i fail to reproduce any crash when deleting stuff
> at random from the document.
> 
> this is on current master with bugs from comment #4 and comment #5 fixed.
> 
> it's quite likely that the crash here was the same as comment #4 / bug
> 107398,
> as that was caused by deleting something and then repagination
> creating an invalid empty footnote container frame.
> 
> the crash in comment #3 also could be caused by that.
> 
> so i guess unless somebody comes up with reproduction steps for a
> crash on current master (or 5.3 once fixes are backported) we can close this.

I agree with you.
Let's close it as RESOLVED WORKSFORME for the time being.
Please, feel free to reopen it if you can still reproduce the crash with daily builds created from today on.