All odt files corrupt?

I’ve suddenly discovered that every .odt file I have created in the past is now being described as corrupted when I try to open them.

[filename] 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.

Attempting to repair always results in the following message:
“Couldn’t be repaired”

Subsequently followed by:
“General error”

If I send any of the odt files to a friend’s computer they are able to open them all just fine. Also, if they save the odt to their pc and then send it back to me I am able to open it but if I save it out again and try to re-open it I get the corrupt message yet again.

I’m running the following version of Writer on Ubuntu:

Version: 5.1.6.2
Build ID: 1:5.1.6~rc2-0ubuntu1~xenial10
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default;
Locale: en-GB (en_GB.UTF-8); Calc: group

Any constructive help would be welcomed.

1 Like

Well, you’re running an outdated computer configuration. Present LO release is in the 7.5.x-7.6-y series. Linux kernel is 6.4+. Try to upgrade, but this does not explain why YOUR documents which YOU previously wrote on YOUR computer can’t be open.

1 Like

Where do you store your files?

Is the hard drive failing?

What is the LibreOffice version of your friend?
They can open your file, and you can open their file sent to you. Try to autosend a file to yourself.

As @EdwardTrunk can send the file to other people without problems, I’d rule this out as a cause.

Is more promising, as cloud storage sometimes may not give full access to files.
.
Another piece to try would be the now available “safe mode” as in “try to rename your user-profile”, as a corrupt profile can show really weird behaviour.

I would suggest “blowing up a wall to kill a fly”. At the same time, of course, updating the packages on your computer. In other words. Perform a complete system re-load with a newer version of Linux. (That should also include a later version of LibreOffice too). DON"T FORGET to back up ALL critical files first!.

It’s amazing the stuff that gets left behind on a computer after a few years of use without the benefit of a system re-load. e.g. programs installed to try, and promptly forgotten. Documents no longer wanted etc.
Linux is certainly better than windows in regard to driver management, but it is still not perfect.

Same here, Document created in 7 version show error if open in 25 version. It happen if you save templates in Dolibarr. Maybe it related to macros that dolibarr used to generate odt document. Easy solution is to have older version of libre office or openoffice

Could you upload a sample document with the problem please? Thanks.

(PROV108)_NotaTuban.odt (85.2 KB)

This is file generated by Dolibar 19.0.2.
It can be opened by onlyoffice but asking to upgrade the software, it can be opened by libre office version 7 but asking to repair files. If you choose no it can not be opened, if you choose yes it can be open. If it opened with 25 version it ask the same but if you choose yes, the header image won’t be shown

Aha, ZIP file invalid - we added some additional checks for ZIP file structure in recent versions. The image problem needs additional checks, though.

I extracted the contents of the example with 7zip without getting an error and rearchived the results into an .odt file also with 7zip.
What I got opened in LibO 25.2.2 and was saved anew with this version.
restrucured.odt (70.3 KB)
Is this what you expected?

  • In the odt file (zip file) that @febriansasi has sent, there is an image “logo_small.jpg” which is not registered with manifest.xml.
    image

  • This image is not in the restructurec odt from @Lupp

The ZIP package is definitely invalid; you may want to report that to “Dolibarr”.

If you try to open this file with MS Word (also an option, why not), you get a warning, too. The package has a zero-byte (unpacked) file inside, named Configurations2/accelerator/current.xml, which reports 2 bytes packed size; but when checking its LOC (a structure inside ZIP with some redundancy information for safety), its sizes - both packed and unpacked - are reported as some huge values. If you rename the file to a ZIP, and try to manipulate it - e.g., I tried using 7-ZIP or Windows Explorer, which both manage normal LO-generated ODTs OK, - they fail with this generated document.

For the record, the first place where the detection of the broken structure fires is here.

What I don’t understand is, I open it using apache openoffice and show warning to update, then save it and open it in LibO 25 and no error

yes, this is correct all in its place as it should be

It’s normal; I don’t see what can be confusing here.
The extra security checks were introduced in LibreOffice only recently. And as you see, LibreOffice can open the file, too; just issues the warning. When saving the file, the ZIP is created anew - and that new ZIP package is created correctly, both by AOO and LO.

As for the missing image: I created tdf#166862.

EDIT: the missing image problem is fixed now. Restored document will contain it.