odt file is corrupt and cannot be opened

Discuss the word processor
Post Reply
stevsz
Posts: 8
Joined: Wed Mar 03, 2010 8:25 am

odt file is corrupt and cannot be opened

Post by stevsz »

Help please.

Hi, I am a new user of OO and have encountered a problem with a odt document. When I try to open it the following message comes up:

"The file "Submission.odt" is corrupt and therefore cannot be opened.OpenOffice.org can try to repair the file.
The corruption could be the result of document manipulation or of structural document damage due to data transmission.
Should OpenOffice.orgrepair the file?"

After I clicked on Yes, only a blank document opened up in OO.

The file contains text and jpg images. The images were inserted using Insert-->Picture-->From file. I had a little difficulty at first with formatting text wrapping with the image, and some quirky problems with the images jumping around the document, but I seem to have sorted things out after trial and error.

I was sailing along nicely until now. I saved the document at around 2.55am this morning, re-opened it shortly after to add something which was a "copy and paste" from a pdf document, and saved /closed the file again around 2.59am. I then closed down the computer - probably a silly mistake (I believe that wipes the data from memory or something like that therefore making retrieval of data more difficult) :knock:

BTW, I did not have the create backup option clicked, only the save Autorecovery information box.

The trouble started first thing this morning when trying to open the file to continue working and the error message displayed.

I have found similar problems in these forums and online, suggesting a fix is to open the file in a zip program and manipulate the content.xml file (copy it to a newly greated odt file which is also unzipped etc etc) but this will not work.

Neither winRar, 7 Zip or Windows own program will extract the files. I get the message in one form or another that basically says:

"Unsupported compression method for 'context.xml' " and various other files,

and also the message

"CRC failed in Pictures\1000000000000933 etc..jpg.File is broken"

I have tried updating OO from v3.1 in which the problem occurred to v3.2 but that hasn't helped either.
I am running WIn7 Home Premium 64 bit. Also, the odt file was saved to a usb thumbdrive if this has caused any issues.

Essentially, everything i've tried points to a corrupt content.xml file (as well as others in the zip package).

Can somebody please help me with this. I am desperate to retrieve the text mainly as I have the images saved elsewhere.
OpenOffice 3.2 on Windows 7 Home Premium 64bit
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: odt file is corrupt and cannot be opened

Post by acknak »

You can attach the problem document here. No promises, but we can at least take a look at it.

You can use the "Upload Attachment" link (below the message entry area after you click "POST REPLY"). [Forum] How to attach a document here
AOO4/LO5 • Linux • Fedora 23
stevsz
Posts: 8
Joined: Wed Mar 03, 2010 8:25 am

Re: odt file is corrupt and cannot be opened

Post by stevsz »

Thanks acknak.

The file is 15,824kb so I have had to upload to MediaFire.

Link is http://www.mediafire.com/?jtjmz4k3qzi

Thanks for your help.
OpenOffice 3.2 on Windows 7 Home Premium 64bit
User avatar
floris v
Volunteer
Posts: 4565
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: odt file is corrupt and cannot be opened

Post by floris v »

Archive is corrupt - most of the graphics are fine, but the content.xml and a few other essential files aren't accessible. There are some repair tools around, but I'm not an expert on that topic. Wish you good luck.
LibreOffice 24.2.7.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: odt file is corrupt and cannot be opened

Post by acknak »

Yes; sorry, but I have to agree with floris_v. The archive is actually truncated; I don't see any hope for recovering anything except some of the images.
AOO4/LO5 • Linux • Fedora 23
stevsz
Posts: 8
Joined: Wed Mar 03, 2010 8:25 am

Re: odt file is corrupt and cannot be opened

Post by stevsz »

Thanks floris v.

Yes, I had no luck unzipping the main files from the archive.

Does anyone know of a suitable repair program?

A couple I have tried to download are blocked by my av apps as trojans. A couple of others guaranteed they would work, but when I ran them they reiterated the obvious - "the files are corrupt." These seemed to be more like automated "decompression" or unzipping apps rather than genuine repair tools.
OpenOffice 3.2 on Windows 7 Home Premium 64bit
stevsz
Posts: 8
Joined: Wed Mar 03, 2010 8:25 am

Re: odt file is corrupt and cannot be opened

Post by stevsz »

acknak wrote:Yes; sorry, but I have to agree with floris_v. The archive is actually truncated; I don't see any hope for recovering anything except some of the images.
How would the file become truncated? Could it have had anything to do with my the last edit of the file which was a "cut & paste" of text from a pdf document open in Adobe Reader, ie different formatting styles etc?

Any hope to repair the file as suggested by floris v?
OpenOffice 3.2 on Windows 7 Home Premium 64bit
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: odt file is corrupt and cannot be opened

Post by acknak »

Does anyone know of a suitable repair program?
Sorry, I tried to say that there's no point in a repair program--there is no data there to repair: the archive is truncated and there's no document content left in it.
Could it have had anything to do with my the last edit of the file
Doesn't seem likely.

Usually it's something like a crash, or the system losing power, or hibernating at just the wrong time. With large document files, the chance of having something go wrong goes up. That's a good reason to avoid embedding lots of large images in a document, IMO.
AOO4/LO5 • Linux • Fedora 23
User avatar
RoryOF
Moderator
Posts: 35056
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: odt file is corrupt and cannot be opened

Post by RoryOF »

stevsz wrote:How would the file become truncated? Could it have had anything to do with my the last edit of the file which was a "cut & paste" of text from a pdf document open in Adobe Reader, ie different formatting styles etc?
Sometimes, when closing down a computer, particularly a laptop, one can race the closedown procedure. There can be "delayed writes" of the hard disks, where some of the writes to the disk are buffered, sorted, and then executed in order from outside of the disk to inside (journalled writes), so that the drive head is not twitching backward and forward. Sometimes, in the desire to close down and finish the task (at 02:59?) one denies the computer the extra few seconds it needs to finish off its tasks: with modern hard disks there are large internal buffers (typically 2 - 8 MB); these may be holding part or all of the files, waiting for the drive head to be in the correct position. Because of the archive nature of the openoffice file format any corruption or omission of part of the final file is catastrophic. Usually best to change one's closedown procedure - initiate shutdown (not Standby or Hibernate), gather one's papers and pens, then come back to the inert machine and remove USB devices and then close the lid.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
stevsz
Posts: 8
Joined: Wed Mar 03, 2010 8:25 am

Re: odt file is corrupt and cannot be opened

Post by stevsz »

acknak wrote:
Does anyone know of a suitable repair program?
Sorry, I tried to say that there's no point in a repair program--there is no data there to repair: the archive is truncated and there's no document content left in it.
But why is the file size still showing as a large file and the content.xml in the archive showing such a large number if no data in it. I have compared an earlier draft of the file which I have just located and the sizes are much smaller. The earlier file I have been able to unzip and the content.xml contains all the text which is what I'm after from the corrupted file.

Doesn't the large size of the content.xml suggest there is data ie text, there?
OpenOffice 3.2 on Windows 7 Home Premium 64bit
User avatar
RoryOF
Moderator
Posts: 35056
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: odt file is corrupt and cannot be opened

Post by RoryOF »

Prove it for yourself. Open Content.xml in a plain text editor (perhaps even Notepad) and see what y ou cn find. I doubt you'll get anything useful.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
stevsz
Posts: 8
Joined: Wed Mar 03, 2010 8:25 am

Re: odt file is corrupt and cannot be opened

Post by stevsz »

RoryOF wrote:Prove it for yourself. Open Content.xml in a plain text editor (perhaps even Notepad) and see what y ou cn find. I doubt you'll get anything useful.
As I can't unzip the archive, I can't open content.xml in Notepad so that the contents are readable.

However, I have opened the file Submission.odt in notepad and found pages and pages of what I presume is code (I have no idea as I don't have exp in code). The following lines are a small sample.

‹4÷¥wE¨-5Zß¹ƒ¡þκd:Ú[øB[û8nöMqg3ïß÷÷.‰¿f÷¿ÿ ²|ý·‹þÜh:̓Û|éö{‹k«UÝí¢Ù÷ð}÷Mÿ qºDÖõBםfÕmâwKù¥ò¼¤Ùò|ÿ ì|õgFñ>™¯j//öżÖÞWüL5)µ–Ú]÷ýÇß³øëÉÅcy«?b¬“þ¶=hTƒ‚J×ÖïK¿»¢ù¯‡],å›]Ðôǰ™?}z–rïòŸ“³ýÇwþ
ÿ ~¹¿Ú+^Mc×7zV‰uyycu«qo
=¦Ï¾›Óçtùþ}é^…©[èÞ>¹ð×…m÷Øj6©réaþ—5ºÈŸ}ÓïìOûî²<%⯉VÖ7ÐÂú+[j¶ÓÚi÷7qù»-Ñfßä¦ÿ ãÿ ÐÓ箬>X¦§Ü.jR©fº4Ôoó}>g•^YøƒãO‡PÒ®,,ìü§ytHe{t؉¿~÷ûïþýs~ ¹ñ€Ò-^Þxf¸ùì%Ùóÿ ¿Sx.ÿ O𮽩hú¾-‚X¤ßñí/ÜþØŸ÷Ú?ûÿ ìW}ã;+XøC¤øjë]VïNŸûWM»‡œ¨èé5£ÿ ßq?÷>Jïåt}ݯÓþ 1TèÁË—›×­úø…¥Zh›ït–ÏA¸•?²®f}ˆó$0ïMÿ s~ôš½/Á÷/sâ
jÒtÑ.ßçÔ­‘eÇ’é÷ÿ ¹½ÿ ¦þÌÐ>0ü6Ö<!«k½Ü¿½Ò™÷::?úäOàö끸ð†¹ðoâå÷†-u[K°}KÉ…éᶸ·7üû?+gì/½YèûQ—%;6×}¾v±×xÛÁž†òç]–T¼†âß}Õ´6ûßÉDûû?ØÙ÷Ò¼AüIe¯46Ÿº³Mè–·.镳ûïÿ |W±ëzV· ëzõ£jW7–6ðÌš–›É¬¾twß³î|›ÑëÆ|Iðg[¿ºÖ/[SY¾ÈŸix]þwGþ?ü}+Š2æ—¼í§Èñ½•KÝ»¯Ãò;ÏüH½Ñ>Ùá/¦—a6“uóÛ=—ÏqýøRh¿ò?÷>ãÖÞ¥ðêÒÏ^¼Ö4­N-U<›)¼Ô‰ü¯¾½ö&÷O“ýúðMa/á¶Ó%‹RO+b=Íâ~æßçÞ›*ύ¼¨j¾Ò´ø-íuU.¼ë©­¢´Û¢&ćgÜÙü{þÿ ûŸÇ…L<êJðvfTÛ]{ëúþ§Ðþ0ø£¦xoÀzƒìmí^òÞ$¼òu[wt–WwD‡z?Èûþ÷+Ç5

However, one interesting thing I noticed is that towards the end of the file there is a lot blank space before the final 20 or so lines of code. Could this be the cause of the corruption?

I also opened in Notepad a copy the other earlier non-corrupted version of the file that I have found on my pc, and that also had the same lots of pages of code but no lots of blank space before the final lines of code. Interestingly, the code at the start of this file looks different than the corrupted one, even though text and graphics would be the same. Again I wonder if this has something to do with the corruption?

I have uploaded the earlier file version "Submission0.odt to MediaFire at http://www.mediafire.com/?sharekey=a2d1 ... 5564f74470
If someone would like to compare the files (code) in a text editor and checkout the queries I mention above.
OpenOffice 3.2 on Windows 7 Home Premium 64bit
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: odt file is corrupt and cannot be opened

Post by acknak »

But why is the file size still showing as a large file and the content.xml in the archive showing such a large number if no data in it.
Good question(s).

The file size is large because most of the data--the image data--is still in the file. The correct size of the archive is 16,276,536 bytes (16.28 Mb). The actual size of the archive file is 16,203,233 (16.20 Mb). That means that 73303 bytes, or about 1/2 of one percent, of your file is missing. Unfortunately, it's the most important part: the document content.

If you look at a listing of the contents of the archive, you probably see a "content.xml" item, with a size of 63930, but the data for the file is not actually in the archive, only the index entry is in the file.

Zip archives have a "central directory" structure at the end of the archive file. The central directory contains a full index of all the items in the archive, with their names and sizes. Software typically uses the central directory information to list the contents of the archive. Your file has an intact central directory at the end of the file, so the contents listing appears complete, but the actual file data in the archive is truncated, and several items, including content.xml, are missing entirely.

It's like looking for a specific article in a magazine: you find the magazine, and the table of contents says the article is on pages 45-48, but, when you turn to page 48, you find that pages 40-50 have been ripped out.
AOO4/LO5 • Linux • Fedora 23
stevsz
Posts: 8
Joined: Wed Mar 03, 2010 8:25 am

Re: odt file is corrupt and cannot be opened

Post by stevsz »

Ok, I think I understand this, but.......

Looking at the earlier version of the file which is not corrupted, The correct size of the archive is 5,853,641 bytes (5.85 Mb). The actual size of the archive file is 5,817,830 (5.81 Mb) - a difference of 35811 bytes or about 2/3 of one percent of the file??? If I follow what you are saying, this then suggest that the document content is missing. Right?

However, I can open this file in OO no problems and all the text and graphics up to that point are there. The document content is there.

Then If we look at the archive index of both files:

Submission0 - the earlier version
Submission0.JPG

Submission - the later corrupt version
Submission.JPG
The archive index - contents are identical for both , only the item sizes particularly the content.xml are different. This is obviously due to the extra text and images in the latter version corrupted file ie Submission.odt.

So why can I open the earlier file version when the archives of both look similar and and there is also "that difference" in the correct size and archive size of the earlier file?

Just another thing, when I try to extract files from the "Submission.odt" archive file, I get the message "unsupported compression method". Could the problem be that some error occurred when I saved the file and OO was performing its compression of the data? Is the compression coding or algorithm or whatever it's called contained somewhere in the archive which could be looked at for error and corrected if possible?

As i mentioned in a previous post, Submission.odt can be opened up in Notepad and there are pages and pages of what appears to be code. Is the compression code contained here so that it can be checked?
OpenOffice 3.2 on Windows 7 Home Premium 64bit
stevsz
Posts: 8
Joined: Wed Mar 03, 2010 8:25 am

Re: odt file is corrupt and cannot be opened

Post by stevsz »

Further to previous post, I have tried extracting the archive with WinZip 14 with the following messages:

Extracting to "C:\Users\STEVE\Documents\DA 29 Sibbick Street\unzipped 5\"
Use Path: yes Overlay Files: no
Extracting mimetype
creating: C:\Users\STEVE\Documents\DA 29 Sibbick Street\unzipped 5\Configurations2\statusbar\
Extracting current.xml
creating: C:\Users\STEVE\Documents\DA 29 Sibbick Street\unzipped 5\Configurations2\floater\
creating: C:\Users\STEVE\Documents\DA 29 Sibbick Street\unzipped 5\Configurations2\popupmenu\
creating: C:\Users\STEVE\Documents\DA 29 Sibbick Street\unzipped 5\Configurations2\progressbar\
creating: C:\Users\STEVE\Documents\DA 29 Sibbick Street\unzipped 5\Configurations2\menubar\
creating: C:\Users\STEVE\Documents\DA 29 Sibbick Street\unzipped 5\Configurations2\toolbar\
creating: C:\Users\STEVE\Documents\DA 29 Sibbick Street\unzipped 5\Configurations2\images\Bitmaps\
Extracting 1000000000000640000004B01564B0D6.jpg
Extracting 1000000000000640000004B0D81C5950.jpg
Extracting 10000000000005F7000004B0040E804D.jpg
Extracting 1000000000000640000004B0260F98DB.jpg
Extracting 1000000000000F0000000870D4D005EC.jpg
Extracting 10000000000002900000028C842EE21C.jpg
Extracting 1000000000000640000004B0D514DC2A.jpg
Extracting 1000000000000640000004B0C91E2AC2.jpg
Extracting 1000000000000DB3000009B0944F8A2C.jpg
Extracting 1000000000000640000004B0B32CE106.jpg
Extracting 1000000000000640000004B025FE43A1.jpg
Extracting 1000000000000640000004B0E588F136.jpg
Extracting 1000000000000640000004B024FC9A1A.jpg
Extracting 1000000000000640000004B0E7B94DAA.jpg
Extracting 1000000000000640000004B0B5736330.jpg
Extracting 1000000000000640000004B01484BC93.jpg
Extracting 1000000000000640000004B0CECE5540.jpg
Extracting 1000000000000F0000000870BF964532.jpg
Extracting 1000000000000640000004B0F9317014.jpg
Extracting 10000000000009330000047426AD5843.jpg
CRC check failed
Error in file #30: bad Zip file offset (Error local header signature not found): disk #1 offset: 15223423
Error in file #31: bad Zip file offset (Error local header signature not found): disk #1 offset: 16169987
Error in file #32: bad Zip file offset (Error local header signature not found): disk #1 offset: 16170390
Error in file #33: bad Zip file offset (Error local header signature not found): disk #1 offset: 16179586
Error in file #34: bad Zip file offset (Error local header signature not found): disk #1 offset: 16182013
Error in file #35: bad Zip file offset (Error local header signature not found): disk #1 offset: 16183017
Error in file #36: bad Zip file offset (Error local header signature not found): disk #1 offset: 16197030
Error in file #37: bad Zip file offset (Error local header signature not found): disk #1 offset: 16199567

Does anything above indicate whether a file repair is possible?
OpenOffice 3.2 on Windows 7 Home Premium 64bit
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: odt file is corrupt and cannot be opened

Post by acknak »

Sorry, I'm out of ideas here.
AOO4/LO5 • Linux • Fedora 23
socrtwo
Posts: 2
Joined: Sun Aug 08, 2010 2:49 am

Re: odt file is corrupt and cannot be opened

Post by socrtwo »

Two unzippers that sometimes ignore zip corruption when unzipping are: There are of course zip repair programs some freeware that can be used too:
OpenOffice 3.2 on Windows 7
raidnew
Posts: 2
Joined: Mon Jul 07, 2014 9:35 pm

Re: odt file is corrupt and cannot be opened

Post by raidnew »

Hi All, please help.
I have 3 corrupt small files, not archive, zip and odt repair don`t work.
Attachments
argos7047605936979320621.odt.txt
corrupted file
(17.48 KiB) Downloaded 227 times
argos3068914783535414905.odt.txt
corrupted file
(13.6 KiB) Downloaded 201 times
Копия argos3068914783535414905.odt
corrupted file
(13.6 KiB) Downloaded 209 times
OpenOffice 4/Window XP SP3
John_Ha
Volunteer
Posts: 9596
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: odt file is corrupt and cannot be opened

Post by John_Ha »

Welcome to the forum

I am sorry to tell you all three files are corrupted beyond repair. A normal ODT file looks like this when unzipped
Good ODT file viewed in 7-Zip
Good ODT file viewed in 7-Zip
I opened all three files using PK Zip for Windows and it said the files had errors, and offered to fix them, creating a file called pkfixed.zip. When I then opened pkfixed.zip, it looks like an incomplete Writer file, but the contents are themselves corrupted.
Corrupted ODT file viewed in 7-Zip
Corrupted ODT file viewed in 7-Zip
You may care to read this series of posts [Hint] How did I fix my ODT file.
 Edit: See Using Recuva to un-delete Writer temporary files for help recovering the temporary files which Writer wrote while you were editing the document, and then deleted when Writer was closed.

The post has been extensively updated [June 2016] to show how AutoRecovery files can be un-deleted for .odt files; for files which have never been saved; and for .doc files.
 
In particular, see See Using Recuva to un-delete Writer temporary files for help recovering the temporary files which Writer wrote while you were editing the .odt file, and then deleted when Writer was closed.
Last edited by John_Ha on Mon Jun 27, 2016 11:16 am, edited 2 times in total.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: odt file is corrupt and cannot be opened

Post by acknak »

raidnew wrote:... I have 3 corrupt small files, ...
Sorry, I can't do anything with them.

They look mostly intact but the files have a bunch of CR, LF characters that clearly shouldn't be there--like some software added a bunch of text line-endings for some reason.

Unfortunately, none of the simple things I tried helped: removing CR, LF; replacing with zero. I still couldn't get the data uncompressed.

Do you have any idea what happened to these files? Do you have any other copies that might not have these extra characaters?
AOO4/LO5 • Linux • Fedora 23
raidnew
Posts: 2
Joined: Mon Jul 07, 2014 9:35 pm

Re: odt file is corrupt and cannot be opened

Post by raidnew »

John_Ha wrote: You may care to read this series of posts [Hint] How did I fix my ODT file
Thanks, i try.
acknak wrote:Do you have any idea what happened to these files? Do you have any other copies that might not have these extra characaters?
I don`t know, this files i get from my friend, he get from goverment company. What did goverment... ??? =))
OpenOffice 4/Window XP SP3
Post Reply