Bug 133472 - --convert-to fails with corrupted files
Summary: --convert-to fails with corrupted files
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks:
 
Reported: 2020-05-28 09:56 UTC by Xisco Faulí
Modified: 2020-05-28 10:44 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2020-05-28 09:56:58 UTC
Steps to reproduce:
1. Download attachment 109322 [details] from bug 86188
2. Convert it to odt with: instdir/program/soffice --convert-to odt <path_to_file>/test2_converted.docx --outdir <output_path>

-> LibreOffice prompts the error: "Error: source file could not be loaded"

In the past, even if the document was corrupted, convert-to worked and the fail was converted

Reproduced in

Version: 7.0.0.0.alpha1+
Build ID: 82894d85147840f1f587e9530b12f0058f2ef2c3
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded


[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2020-05-28 10:03:48 UTC
Hi Mike,
This issue started to happen after https://cgit.freedesktop.org/libreoffice/core/commit/?id=9fdf8c0a5cc036ea9bd1e11dd8f2c1a6e601fae2.
The commit message talks about "this will start showing parse errors on invalid files which previously just opened without warnings"
This is no the case for the file mentioned in this ticket, LibreOffice already shows a warning even before the commit, as is doing after the commit, the problem is only happening when using --convert-to from commandline.
I'm not sure whether it's a bug or it's the expected behaviour that's why I've reported it so you can decide
Thanks in advance
Comment 2 Mike Kaganski 2020-05-28 10:29:32 UTC
It's interesting why did it pass previously (when correctly warning in UI). Now it behaves consistently with other corrupt documents. E.g., see bug 128820, where the DOCX from attachment 155841 [details] was already not converted before the said patch. --convert-to must not silently process corrupted documents - at least I think so.

My point of view on if we should allow that in --convert-to might be wrong; and if so, a separate bug needed to allow processing invalid files (as if user accepted), or add some additional switch to do that... (personally I still consider that wrong, because that would make processing unstable).
Comment 3 Xisco Faulí 2020-05-28 10:44:45 UTC
(In reply to Mike Kaganski from comment #2)
> It's interesting why did it pass previously (when correctly warning in UI).
> Now it behaves consistently with other corrupt documents. E.g., see bug
> 128820, where the DOCX from attachment 155841 [details] was already not
> converted before the said patch. --convert-to must not silently process
> corrupted documents - at least I think so.

Yep, it makes sense to be consistent and fail for all corrupted files. Let's close it as RESOLVED NOTABUG
Thanks for your help