Bug Hunting Session
Bug 87110 - FILEOPEN odt crashes Writer; workaround: delete <text:table-of-content> in content.xml
Summary: FILEOPEN odt crashes Writer; workaround: delete <text:table-of-content> in co...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.4.1 release
Hardware: All All
: high major
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: odf target:4.5.0 target:4.4.0.0.beta3...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-12-08 17:27 UTC by mart.albrecht
Modified: 2014-12-12 09:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
odt file which crashes because of <text:table-of-content> (47.16 KB, application/vnd.oasis.opendocument.text)
2014-12-08 17:27 UTC, mart.albrecht
Details
The original .doc file (last version available) (177.00 KB, application/msword)
2014-12-09 13:37 UTC, mart.albrecht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mart.albrecht 2014-12-08 17:27:58 UTC
Created attachment 110577 [details]
odt file which crashes because of <text:table-of-content>

The file was originally an old doc which worked fine with Libre Office; I deleted the old table of contents, replaced it with a new one from Libre Office, and saved it as odt. Trying to open the (attached) file now crashes Libre Office. 
I opend the content.xml in a txt-editor and erased the <text:table-of-content> tag and all of its content. The new file works fine again (not attached).
Therefore I do not need a fix myself (although I am hesitant to create a new talbe of contents) but wanted to let you know about the problem.
Comment 1 Joel Madero 2014-12-09 01:36:09 UTC
LibreOffice 4.3.3.2 release
Ubuntu 14.04 x64

Confirmed:
New - confirmed
Major - crash
High - default for crasher


@Mart - do you have the original .doc file as well? Can you attach it to the bug?
Comment 2 mart.albrecht 2014-12-09 13:37:24 UTC
Created attachment 110627 [details]
The original .doc file (last version available)

@Joel Madero - I attached the last original .doc version available (there shouldn't be many changes except for the table of contents); as I remember it I selected the old table of contents and replaced it with a new one which worked well (the new table seemed to contain all of the expected elements).
I have another file with similar problems which I could attach if requested.
Comment 3 Michael Stahl (CIB) 2014-12-10 15:28:17 UTC
the bugdoc has a <text:table-of-content> element inside <text:index-body> - how the heck did we export that...

this is funny, we crash because of this:

commit bebf8ccfba37f77d6a43c7874249b31736467b17
Author:     Jan Holesovsky <kendy@suse.cz>
AuthorDate: Fri Apr 12 13:06:52 2013 +0200

    i#98430: Import at least the shape.


... which catches an exception, so the exception does not arrive in the XMLIndexTOCContext and that does not see that the index is invalid and continues to use it...

hmm if i import the .DOC with LO 4.3 and export it i get a text:section inside the text:index-body, which is a bit less insane.

but there were several more problems with the attachments...

fixed on master.
Comment 4 Commit Notification 2014-12-10 15:29:06 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#87110: xmloff: don't catch IllegalArgumentException here

It will be available in 4.5.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 5 Commit Notification 2014-12-10 15:39:14 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

fdo#87110: xmloff: don't catch IllegalArgumentException here

It will be available in 4.4.0.0.beta3.

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 6 Commit Notification 2014-12-12 09:16:34 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

fdo#87110: xmloff: don't catch IllegalArgumentException here

It will be available in 4.3.6.

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.