Bug 71694 - The program freezes when generating a table of contents (ToC)
Summary: The program freezes when generating a table of contents (ToC)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.0.alpha0+ Master
Hardware: All All
: medium critical
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.2.0 target:4.1.4
Keywords:
: 71754 (view as bug list)
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2013-11-17 10:29 UTC by Jean-Baptiste Faure
Modified: 2013-11-22 05:31 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
example of document with headings in a table (8.86 KB, application/vnd.oasis.opendocument.text)
2013-11-17 10:29 UTC, Jean-Baptiste Faure
Details
Backtrace during the freeze (8.44 KB, text/plain)
2013-11-17 14:58 UTC, Arnaud Versini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Baptiste Faure 2013-11-17 10:29:54 UTC
Created attachment 89346 [details]
example of document with headings in a table

Steps to reproduce:

- open the attached document
- try to create a table of contents : menu Insert > Indexes and Tables... > Indexes and Table

Current behavior: LibreOffice freezes when it try to build the preview of the ToC. It seems to be entered in an endless loop.

The bug occurs in version 4.1.4.0.0+ and the master (Version: 4.2.0.0.alpha1+
Build ID: 11077cb75d0dcf1ebb25b12358776fde45a78eb4) but not in 4.0.6
If I add the ToC with 4.0.6, save the file and try to edit the ToC of the modified document with 4.1, I get the same freeze.

Best regards. JBF
Comment 1 Cor Nouws 2013-11-17 11:12:57 UTC
Hi Jean-Baptiste,

It does not freeze for me with 4.1.3.2 (and earlier versions I tested) on my 32 bits Ubunutu.

Ciao,
Cor
Comment 2 Jean-Baptiste Faure 2013-11-17 12:15:36 UTC
(In reply to comment #1)
> Hi Jean-Baptiste,
> 
> It does not freeze for me with 4.1.3.2 (and earlier versions I tested) on my
> 32 bits Ubunutu.

I just tried with vanilla version 4.1.3.2 64 bits and it works as expected.
I see 2 possibilities:
1/ a problem in my own build but that is weird because I have the same problem with the master for which I do complete builds
2/ a recent regression.
Will rebuild my 4.1.4 completely (make distclean && make)

Best regards. JBF
> 
> Ciao,
> Cor
Comment 3 Thomas van der Meulen [retired] 2013-11-17 12:29:09 UTC
Hi,

I can only reproduce this bug in Master:
Version: 4.2.0.0.alpha1+
Build ID: 868103846b9b32bfecd77c08055fdca69d0265c2
TinderBox: MacOSX-x86@48-TDF, Branch:master, Time: 2013-11-14_23:51:46

In the other versions (including 4.2 alpha 1) I can add the TOC with out a problem. So is the version field set right?
Comment 4 Arnaud Versini 2013-11-17 14:49:56 UTC
Same problem on master for me. Will try to have a backtrace of the freeze
Comment 5 Arnaud Versini 2013-11-17 14:58:35 UTC
Created attachment 89363 [details]
Backtrace during the freeze
Comment 6 Arnaud Versini 2013-11-17 15:02:34 UTC
Seems to be b376eacdfae11f5d39eb7011efe67390d9f495e7 , Caolan please have a look, thanks.
Comment 7 Jean-Baptiste Faure 2013-11-17 16:09:29 UTC
(In reply to comment #6)
> Seems to be b376eacdfae11f5d39eb7011efe67390d9f495e7 , Caolan please have a
> look, thanks.

Confirmed for LO 4.1.4.0.0+ : if I revert the corresponding commit (https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;h=7eae50f9ff5877ef880be9a85d3f7e52b1fec49f) there is no freeze and the ToC dialog works as expected.

Thank you Arnaud.

Best regards. JBF
Comment 8 Jorendc 2013-11-18 19:01:03 UTC
Maybe I did create a duplicate of this bug, but Arnaud point me to this bug report. I already can reproduce a freeze when opening a new document and go to Insert > Indexes and tables > indexes and tables. See bug 71754

(no need for headings in the table or something like that). Sorry if it's a dupe.

Kind regards,
Joren
Comment 9 Thomas van der Meulen [retired] 2013-11-18 19:49:30 UTC
*** Bug 71754 has been marked as a duplicate of this bug. ***
Comment 10 Arnaud Versini 2013-11-18 20:31:25 UTC
*** Bug 71754 has been marked as a duplicate of this bug. ***
Comment 11 Jean-Baptiste Faure 2013-11-19 06:36:13 UTC
(In reply to comment #8)
> [...]
> (no need for headings in the table or something like that). 

You are right, I reported the scenario which triggered this bug for me. I forgot to try more simple situations (just open ToC creation dialog in an empty document)

Best regards. JBF
Comment 12 Jorendc 2013-11-19 21:31:04 UTC
Thanks to Joel, added a 4.1.4 pre-release tag :). Marking it that way.

Kind regards,
Joren
Comment 13 Jorendc 2013-11-19 21:33:25 UTC
Sorry for the noise. After some discussion on the qa-chat: 4.1.4 isn't branched of yet. It will branched of from 4.1.0.0 master. So marking it as that version right now :). When 4.1.4 RC1 is out, we can mark it as such (because 4.1.0.0 master is under continuous development).

Kind regards,
Joren
Comment 14 Commit Notification 2013-11-20 09:22:54 UTC
Arnaud Versini committed a patch related to this issue.
It has been pushed to "master":

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

Writer : Fix fdo#71694 by clearing old anchor frame before setting new



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 15 Caolán McNamara 2013-11-20 09:30:32 UTC
Fixed in master now, and fix proposed in gerrit for 4-1
Comment 16 Commit Notification 2013-11-20 16:06:00 UTC
Arnaud Versini committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=394a1ee9a0f5438bda41cbf4ecf065b9b278b4c4&h=libreoffice-4-1

Writer : Fix fdo#71694 by clearing old anchor frame before setting new


It will be available in LibreOffice 4.1.4.

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 17 Jean-Baptiste Faure 2013-11-22 05:28:22 UTC
@Caolan: Thank you very much for the fix.

Verified in the master and LO 4.1.4.0.0+

Best regards. JBF
Comment 18 Jean-Baptiste Faure 2013-11-22 05:31:38 UTC
Oups, thank you Arnaud. :-)