Bug 161488 - Approving loading of a specific broken ODG package still fails
Summary: Approving loading of a specific broken ODG package still fails
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL: https://ask.libreoffice.org/t/corrupt...
Whiteboard: target:24.8.0 target:24.2.5
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-10 06:07 UTC by Mike Kaganski
Modified: 2024-06-10 11:42 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
A broken document from Ask (22.31 MB, application/vnd.oasis.opendocument.graphics)
2024-06-10 06:07 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2024-06-10 06:07:58 UTC
Created attachment 194619 [details]
A broken document from Ask

The attachment is a bugdoc from https://ask.libreoffice.org/t/corrupted-file-cant-open-it/106693. It has a problem in the ZIP headers, making three images broken. Loading it gives an expected warning:

 The file 'M_F_Gervais English and Scottish Monarchs.odg' is corrupt and
 therefore cannot be opened. LibreOffice can try to repair the file.

 The corruption could be the result of document manipulation or of structural
 document damage due to data transmission.

 We recommend that you do not trust the content of the repaired document.
 Execution of macros is disabled for this document.

 Should LibreOffice attempt to repair the file?

Answering "Yes" tries to reload, but ends up with

 Read Error.
 Format error discovered in the file in sub-document content.xml at position
 2,1605412(row,col).

It should open the file properly after repairment confirmation (in a repair mode, with some images missing). It was possible in AOO and in LO prior to commit ebf767eeb2a169ba533e1b2ffccf16f41d95df35.
Comment 1 Mike Kaganski 2024-06-10 06:10:01 UTC
https://gerrit.libreoffice.org/c/core/+/168596
Comment 2 Commit Notification 2024-06-10 07:16:59 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bf02c5fa586d2ff7dbfac37d3ea0a07675efc15e

tdf#161488: allow failed image loading in repair mode

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2024-06-10 11:42:32 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/10bc0a3619f0e7bba07985069cb99663cc688fb9

tdf#161488: allow failed image loading in repair mode

It will be available in 24.2.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.