Bug 91483 - Writer freezes when removing sections with subsection and sub-subsection
Summary: Writer freezes when removing sections with subsection and sub-subsection
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: high major
Assignee: Not Assigned
Keywords: haveBacktrace
Depends on:
Blocks: Section
  Show dependency treegraph
Reported: 2015-05-22 15:28 UTC by Waqar Ahmed
Modified: 2022-03-19 08:14 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:

Bug Report (61.74 KB, application/pdf)
2015-05-22 15:28 UTC, Waqar Ahmed
Document (967.48 KB, application/vnd.oasis.opendocument.text)
2015-05-23 22:10 UTC, Waqar Ahmed
backtrace (16.71 KB, text/plain)
2015-05-25 12:52 UTC, Timur
minimized document to test the issue (9.20 KB, application/vnd.oasis.opendocument.text)
2016-06-23 12:57 UTC, Andrey Skvortsov

Note You need to log in before you can comment on or make changes to this bug.
Description Waqar Ahmed 2015-05-22 15:28:34 UTC
Created attachment 115834 [details]
Bug Report

LibreOffice Writer crashes whenever I try to remove sections from a document.
It doesn't crash when the Section have only one Subsection.
But, it always crashes when the Section has a Subsection which has another Subsection.
I have attached a PDF explaining the situation. It also contains an image describing the situation.
Thanks to all LibreOffice Developers.

P.S: I have experienced this on both Linux and Windows.
Comment 1 Michael 2015-05-23 13:48:25 UTC
Can you save the document before the crashing step, and post it so we can reproduce it?
Comment 2 Gordo 2015-05-23 19:05:10 UTC
I would not recommend uploading the document here as it is copyrighted material.

I converted the file in calibre, extracted the html, and opened it in LO.  I was able to get it to hang by selecting multiple sections in Format -> Sections and removing them.  I did not wait to see if it sorted itself out.  It happens in web or print layout view.

I created a document with subsections and hyperlinks to bookmarks but I cannot get it to hang or crash.  I converted it to html and it still would not hang.

The only other thing I noticed is that there are two table of contents and links to images that do not exist because they were not extracted.  After deleting some images LO then hangs.

Windows Vista 64
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Comment 3 Waqar Ahmed 2015-05-23 22:10:42 UTC
Created attachment 115920 [details]

The document which is causing LO to crash.
Comment 4 Waqar Ahmed 2015-05-24 11:22:29 UTC
Not fixed in LO alpha1.
Comment 5 Gordo 2015-05-24 12:24:55 UTC Comment hidden (obsolete)
Comment 6 Timur 2015-05-25 12:30:59 UTC
Reproduced. Looks like inherited.
Comment 7 Timur 2015-05-25 12:52:27 UTC
Created attachment 116017 [details]

IMAGE_NAME:  svtlo.dll
FAILURE_BUCKET_ID:  STATUS_BREAKPOINT_80000003_svtlo.dll!SvImpLBox::UpdateContextBmpWidthVector
Comment 8 Andrey Skvortsov 2016-06-23 12:57:23 UTC
Created attachment 125857 [details]
minimized document to test the issue
Comment 9 Andrey Skvortsov 2016-06-23 13:10:57 UTC
The issue still present in LO 5.1.4 (Linux amd64). 
I uploaded a simple almost empty document to test the issue. Only 2.5 pages of sections (~60 sections) and no text at all. The document is not complex.

The issue appears only if top section with more than one levels of subsections is removed and if there are some (>50) sections after removed section. And time seems to growth exponentially with number of sections after.

Steps to reproduces the issue:
1. Open minimized document to test the issue
2. open dialog Format->Sections
3. remove last top section (Section54). 
   deleting doesn't take any time. There is no issue here.
4. remove first top section (Section1)
   deleting takes on my machine 26 seconds.

If you add/delete sections after first top section delete time will increase/decrease.
Comment 10 Justin L 2016-12-26 11:57:52 UTC
confirmed still a problem in LO5.3beta2 using Ubuntu x64.

The "crash" I experienced seems to be an endless loop.  The cpu hits 100% and stays there.  gdb didn't help me since I'm only a novice at it's use.  

About the only thing I can get is:
0x00007ffff7474b5d in poll () at ../sysdeps/unix/syscall-template.S:84
84	in ../sysdeps/unix/syscall-template.S
Comment 11 QA Administrators 2018-06-01 02:17:00 UTC Comment hidden (obsolete)
Comment 12 Timur 2018-06-01 07:35:30 UTC Comment hidden (obsolete)
Comment 13 sdc.blanco 2020-03-19 09:11:17 UTC
repro STR in comment #9  (after step 4, about 18 sec. to respond)

Version: (x64)
Build ID: 10e20a77ce302a0475a661ad1886f2ca83c55f3f
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win; 
Locale: en-US (en_DK); UI-Language: en-US
Calc: threaded
Comment 14 Robert Kisoak 2022-03-19 08:14:00 UTC Comment hidden (spam)