Bug 122144 - Cannot open file in LibreOffice 6.1: Format error discovered in file
Summary: Cannot open file in LibreOffice 6.1: Format error discovered in file
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.3.2 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: File-Opening Regressions-imageHandling
  Show dependency treegraph
 
Reported: 2018-12-16 19:04 UTC by mk01
Modified: 2019-04-15 04:33 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
the error occurs when this file is opened (52.02 KB, application/vnd.oasis.opendocument.text)
2018-12-16 19:05 UTC, mk01
Details
Screen Shot of error message (9.14 KB, image/png)
2018-12-16 19:07 UTC, mk01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mk01 2018-12-16 19:04:33 UTC
Description:
I have been generating LibreOffice documents from a database for the over 10 years.
I now have the case that Libreoffice Version 6.1.3.2 (x64) cannot open a file that I can open with LibreOffice 6.0.7

With 6.1.3 and 6.2.0 beta 1 I get the error message
Read error discovered in the file in sub document content.xml at ... 
The position is the end of the file.

In all cases I installed LO in a fresh VM snapshot that had never seen LO before.

Steps to Reproduce:
1. Open the attached file


Actual Results:
LO does not open the document

Expected Results:
LO openn the document


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.3.2 (x64)
Build ID: 86daf60bf00efa86ad547e59e09d6bb77c699acb
CPU threads: 3; OS: Windows 6.1; UI render: default; 
Locale: en-US (en_US); Calc: group threaded
Comment 1 mk01 2018-12-16 19:05:48 UTC
Created attachment 147610 [details]
the error occurs when this file is opened
Comment 2 mk01 2018-12-16 19:07:48 UTC
Created attachment 147611 [details]
Screen Shot of error message
Comment 3 MM 2018-12-16 22:36:00 UTC
Confirmed on mint 19 with Version: 6.3.0.0.alpha0+
Build ID: 19d9ac1031a08525ed5a5638ceaf508be870825e
CPU threads: 2; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-12-16_01:24:21
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

Unconfirmed with Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.2
CPU threads: 2; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: 

If you save the file in v6.0.7, the file can be opened with master.
Comment 4 Oliver Brinzing 2018-12-17 18:34:18 UTC
seem to have started with:

https://gerrit.libreoffice.org/plugins/gitiles/core/+/27008aa028cde8d270e898c5743a9fe5c7701dab

commit 27008aa028cde8d270e898c5743a9fe5c7701dab	[log]
author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	Mon Mar 05 20:44:08 2018 +0900
committer	Tomaž Vajngerl <quikee@gmail.com>	Wed Mar 07 02:38:28 2018 +0100
tree d3c8bbd6c1607122dc8009beeba68f7d0b89d256
parent 5a4d6162f643050faf00ccf08d58feed00dcd781 [diff]

xmloff: convert XMLTextParagraphExport to get rid of "GraphicURL"

Change-Id: I10cc1115bfe628dc296b67b75e386e1a2e4a6c46
Reviewed-on: https://gerrit.libreoffice.org/50789
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>


$ git bisect log
# bad: [1d66cc00ca6fd2e562cbed88704051b2f5d989e3] source 8d2abb388b0a2423c9b7e1f52373e1b06dd9786f
# good: [29d08f54c2f71ffee4fe12dbb24c5f5cbedecfd2] source 6eeac3539ea4cac32d126c5e24141f262eb5a4d9
git bisect start 'master' 'oldest'
# good: [3ac46f6c41b5044f162a451b10af0dc5afdcc113] source 22c7c3f54dbb93f856190c561b2540064c5a767d
git bisect good 3ac46f6c41b5044f162a451b10af0dc5afdcc113
# bad: [63fc3e0d41dd91f9fb3fe9891e009451285d9619] source 13a1bc409d9b2f0d14f4d316b7977b1fc2eb3c8a
git bisect bad 63fc3e0d41dd91f9fb3fe9891e009451285d9619
# bad: [a3c751701536f8f08dc728c64fe06f611cd6add9] source b15f56816515f63b89eea254a590effba47fd56f
git bisect bad a3c751701536f8f08dc728c64fe06f611cd6add9
# bad: [a9ce0c459219b925b8685e2e3449fb85e4709681] source 509c69a9936f6af051f4888bbc88b7f2678783b3
git bisect bad a9ce0c459219b925b8685e2e3449fb85e4709681
# bad: [38ff0bdfcf63f1d3eb190fc0300572fad22a4ecd] source 612ed5e752a0b317cf63a27ff1bb663a774022ef
git bisect bad 38ff0bdfcf63f1d3eb190fc0300572fad22a4ecd
# good: [db3ae732d0dc343954cebdc3a0dcb1c745a68ae3] source d15ff312ad80e4d1f210636e3374a81c14c229a2
git bisect good db3ae732d0dc343954cebdc3a0dcb1c745a68ae3
# bad: [207a8058d504b3714f227e43c3351564c3952f94] source c25b884d5493422e126a7f4e52008cebb073ec7a
git bisect bad 207a8058d504b3714f227e43c3351564c3952f94
# bad: [c62b4b89d5de60f0ab18d2d6d7edfc09e256a7da] source d55a7fca9c1bb1989d5a70d2d9098a9156c82ac4
git bisect bad c62b4b89d5de60f0ab18d2d6d7edfc09e256a7da
# good: [59e0c6c191f912aa0531210e7e38023120113de0] source cfc6cf5177f8df23af35c4509c0276a19de56cce
git bisect good 59e0c6c191f912aa0531210e7e38023120113de0
# good: [42040c656ddea8119740c6ace801419b3e4aa0bb] source 5f618375a5360160e67f6aac4aece90ab218c081
git bisect good 42040c656ddea8119740c6ace801419b3e4aa0bb
# good: [a1c66874c920e094091fb092c0d53f84a59bd154] source 6b39ed0eaffabb6ffe11496d833053c094c72f7b
git bisect good a1c66874c920e094091fb092c0d53f84a59bd154
# good: [511fb2225b3915f734eae2d507b278a76adbaa60] source 5a4d6162f643050faf00ccf08d58feed00dcd781
git bisect good 511fb2225b3915f734eae2d507b278a76adbaa60
# bad: [9ed43f3a20bd15139a610cbdaf2c4d98dc9dc96c] source f7d3fc13333774f3ada2af1c752bc8a63055a2ff
git bisect bad 9ed43f3a20bd15139a610cbdaf2c4d98dc9dc96c
# bad: [4a73f868e7d2f62b1ccd480731896a36a1f94035] source 27008aa028cde8d270e898c5743a9fe5c7701dab
git bisect bad 4a73f868e7d2f62b1ccd480731896a36a1f94035
# first bad commit: [4a73f868e7d2f62b1ccd480731896a36a1f94035] source 27008aa028cde8d270e898c5743a9fe5c7701dab
Comment 5 Xisco Faulí 2018-12-17 18:44:19 UTC
Adding Cc: to Tomaž Vajngerl
Comment 6 Buovjaga 2019-01-03 19:42:22 UTC
This read error points to the same commit: https://bugs.documentfoundation.org/show_bug.cgi?id=114351#c6
Document is attachment 138317 [details]
Comment 7 Xisco Faulí 2019-01-18 11:44:41 UTC
Still reproducible in

Version: 6.3.0.0.alpha0+
Build ID: edf8e2b6630ca9cf7117d9c7a25ef9d7231c5a9b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 8 Justin L 2019-01-28 18:16:36 UTC
(In reply to mk01 from comment #1)
> Created attachment 147610 [details]
> the error occurs when this file is opened

As you might know, ODT files are just zip files. I opened it up and noticed that the pictures are in the root directory, and not in the Pictures subfolder.  When I moved the pictures into there, then it opened up OK (although with a corruption warning).

My guess (since I don't have any knowledge about this topic to do anything more than just guess) is that you got lucky in the past with an invalid format that just happened to work.
Comment 9 mk01 2019-01-28 19:48:24 UTC
(In reply to Justin L from comment #8)
> (In reply to mk01 from comment #1)
> > Created attachment 147610 [details]
> > the error occurs when this file is opened
> 
> As you might know, ODT files are just zip files. I opened it up and noticed
> that the pictures are in the root directory, and not in the Pictures
> subfolder.  When I moved the pictures into there, then it opened up OK
> (although with a corruption warning).
> 
> My guess (since I don't have any knowledge about this topic to do anything
> more than just guess) is that you got lucky in the past with an invalid
> format that just happened to work.

Hallo Justin

That fixed it indeed!
As said, I generate the ODT file.
Some images were not put into the Pictures/ folder.

Does somebody still want to look at the misleading error message?

Thanks
 Michael
Comment 10 Justin L 2019-01-31 17:07:29 UTC
svx/source/xml/xmlgrhlp.cxx ImplGetStreamNames() looks for a '/' in the href url and automatically concludes "Pictures/" if finding none. This has been true for basically forever (when loading by URL). It would be way to dangerous to attempt to change this. A likely work-around for the original content creator would be to prepend "./" to the URL.

load error due to format problems is an accurate enough message (albeit unclear/unspecific). Getting a clear message in this delayed error prompt (sfx2/source/doc/sfxbasemodel.cxx SfxBaseModel::load()) would be difficult I expect. However, there are debugging messages (for the developer) that are clear enough, and so far all the examples are due to user manipulation creating an invalid structure, so I think this is safe to close as NOTABUG.