OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Corrupted ODT file: how to recover?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
hilltop
Newbie
Newbie


Joined: 27 May 2007
Posts: 4

PostPosted: Sun May 27, 2007 5:14 am    Post subject: Corrupted ODT file: how to recover? Reply with quote

Hello. I have been using OpenOffice for a long time and really like it. I have created some important documents with Writer, one of which will no longer open. If I open the document, I see a status bar going across the bottom of the screen "Loading Document". Then this status bar disappears and only the grey background of the Writer application is visible. The document never loads, and Writer is completely locked up. I have to terminate the process in order to exit.

I CAN open the .odt file with 7-zip and extract all the files within it. I have done this, and the content.xml file seems to be the one which is causing the problem. I opened this file in a text editor, and voila, there is all my text, but it is embedded into all the XML markup so that it is basically unreadable. I deleted everything between the tags <office:text> and </office:text>. Then I saved the file, re-zipped the entire group, and opened the resulting .odt file with Writer. The file opened just fine.
However, it could be a problem with some other file, and the problem was not referenced since I deleted all those lines.

Is there any way for me to open my file to recover my data, or will I need to manually edit the content.xml file to produce a readable text file?

It would be really cool if OpenOffice had some sort of "document repair" utility that would at least scan the files for errors. Right now, with nothing but a grey screen, I have no idea where to start looking.

Thank you in advance for any advice/support!!!


Very Happy
Back to top
View user's profile Send private message
PromptJock
Super User
Super User


Joined: 26 Jul 2006
Posts: 741

PostPosted: Sun May 27, 2007 5:42 pm    Post subject: Reply with quote

If you can read the file with a ZIP utility, it's possible the document might be OK. Using Windows Explorer (or just open your Documents folder), simply make a copy of it (Right-click on file, copy then right-click in folder, paste). DOn't worry about the Explorer's default "Copy of..." name.

Once the copy is made, try to open it with Writer. If you're lucky, the copy will open fine. If not, then you may have to extract the "components" into a temporary folder and see if you can reconstruct things.

The other thing to try is reinstalling the Writer component - it might be having unexpected "issues".

Finally, immediately make BACKUP COPIES of all your non-corrupted OOo documents (Writer docs, Calc sheets, etc.) and save them to CD-R/RW, Flash media or even a separate "backup" folder on your drive. Next, run Scandisk and Defrag on all yoru hard drives to find and corect any "dodgy, etc." clusters and such. This last trick MIGHT be what it takes to un-corrupt your "corrupted" file(s).

God luck. Smile
_________________
I'm making perfect sense - you're just not keeping up!
Back to top
View user's profile Send private message
hilltop
Newbie
Newbie


Joined: 27 May 2007
Posts: 4

PostPosted: Sun May 27, 2007 6:30 pm    Post subject: Writer Document Corrupted Reply with quote

Hello, and thanks for your reply. I have made a copy of the file, as well as sent it to a colleague who tried to open the file on another computer. I am running Vista and she is running Windows 2000, and I'd say she has an older version of OpenOffice as well. Both of us experienced the same 'freeze-up'. OpenOffice shows the Loading... bar at the bottom of the screen, and when this reaches 100% it disappears and all that's left is the grey screen. No error messages appear, the program simply freezes.

I have opened lots of other .odt files on the same computer, just to verify that it's not the Writer program causing the problem. All other .odt files open perfectly.

I don't understand how the file could have become corrupted and then zipped up properly. if the Writer application had crashed during a save, wouldn't the compression have been omitted/corrupted too?

It appears that I will have to manually re-construct the file. Can anyone provide directions for doing this in the simplest/most comprehensive manner?

I really appreciate everyone's help.

P.S. I have tested my HD and it's fine. Also, I have restored this file from two separate backups and both have the same corruption. Unfortunately, it appears that the file was corrupted and *then* backed up. Sad

Thank you!
Back to top
View user's profile Send private message
acknak
Moderator
Moderator


Joined: 13 Aug 2004
Posts: 4295
Location: ~ 40°N,75°W

PostPosted: Mon May 28, 2007 7:07 am    Post subject: Reply with quote

Try a search here--I have posted some general instructions for trying to recover a document using the basic process you've already started. Basically, you just systematically remove less and less of the material between the <office:text> tags. Sometimes it works well and other times it doesn't.

If you need further help, just ask. If you want someone else to give your document a try, just find a place to post it temporarily, or PM me if you'd rather use email.
Back to top
View user's profile Send private message
PromptJock
Super User
Super User


Joined: 26 Jul 2006
Posts: 741

PostPosted: Mon May 28, 2007 7:11 am    Post subject: Re: Writer Document Corrupted Reply with quote

mailbox@hilltop.net wrote:
Unfortunately, it appears that the file was corrupted and *then* backed up. Sad !

Looks like you're the unfortunate victim of "Garbage In, Garbage Out". If the "original" ZIP file is AFU, then you're likely up a creek.

Is it possible the ORIGINATOR of the "offending" file still has the unZIPped master? if so, see if you can get that master file in its' original, unZIPped form. It's possible the master file is OK in which case the person who performed the (Jack the) ZIPper function has a bad ZIP utility or whatnot.

Otherwise, you'll have to do your best to maually extract the information, one page at a time... Sad

That's my thoughts. Good luck.
_________________
I'm making perfect sense - you're just not keeping up!
Back to top
View user's profile Send private message
hilltop
Newbie
Newbie


Joined: 27 May 2007
Posts: 4

PostPosted: Mon May 28, 2007 7:26 am    Post subject: Possible Misunderstanding? Reply with quote

I may have been misunderstood by "PromptJock". The main .odt file *will* unzip. I *can* see all the XML files inside. I *can* open the "content.xml" file and see my document's content. However, there is so much XML in this file, it would take forever to clean it up into a human readable state, and I would lose my formatting/bullets/etc in the process. Is there some way I can clean this XML file or convert it to plain text or formatted text, or import into another OOo document?

Reply to PromptJock: Thanks for your input, but No, nobody else has a copy of the file. Believe me, I looked carefully, because it's a very important document. The strangest part is that the author of the file is listed as the name of another computer on the network, but that computer doesn't even have OpenOffice installed! Confusing!

I don't have any pictures in the document (that I care about, anyway), but I would really like to retain the text formatting, including bold, italic, underline, bullets, etc...

How can I check/diagnose the problem in the content.xml file? Right now, there's no error message at all from Writer, so I don't know where to start looking. The content.xml file is over 90k and not something I can peruse quickly due to the XML markup.

Thanks again for any help!
Back to top
View user's profile Send private message
alanh
General User
General User


Joined: 10 Jan 2005
Posts: 15
Location: Ottawa, Canada

PostPosted: Mon May 28, 2007 11:47 am    Post subject: Reply with quote

One solution that has worked for me in the past is to open a new .odt file andInsert>File to insert the corrupted .odt. It assumes the styles of the host document but all of the content is there.

Good luck.use
Back to top
View user's profile Send private message
hilltop
Newbie
Newbie


Joined: 27 May 2007
Posts: 4

PostPosted: Mon May 28, 2007 12:51 pm    Post subject: Problem Solved Reply with quote

Hello, and thank you to everyone who helped me on this issue!

Alanh: that's a great idea and I wish I'd thought of it. I tried this with the document and it *almost* worked. I saw the text flash up on the screen before Writer froze.

But here's how I solved the problem:

1. Extract all files from the .odt file into a directory. (includes content.xml, etc...)
2. Open the META-INF/manifest.xml file
3. Remove everything except the following lines:
Code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">
 <manifest:file-entry manifest:media-type="application/vnd.oasis.opendocument.text" manifest:full-path="/"/>
 <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="content.xml"/>
 </manifest:manifest>

4. Save the file
5. Re-zip only the following into an .odt file:
- META-INF directory
- content.xml
- mimetype
6. Open this newly created .odt file (actually a renamed ZIP file) with Writer.
7. Voila! The document appears, WITH the orignal formatting!

Maybe this will help someone else who runs into this problem.

Thanks again everyone!
Back to top
View user's profile Send private message
acknak
Moderator
Moderator


Joined: 13 Aug 2004
Posts: 4295
Location: ~ 40°N,75°W

PostPosted: Mon May 28, 2007 2:01 pm    Post subject: Reply with quote

Nice idea! You will lose any custom styles you've created that way, but it is a good idea to try trashing all the document settings and cache.

It would be interesting to find out exactly what part was causing the crash. The developers at Oo.org do give a high priority to crash bugs, but they would need your document, or at least an excerpt from it that still causes the crash.
Back to top
View user's profile Send private message
Otomis
Newbie
Newbie


Joined: 30 Aug 2013
Posts: 1

PostPosted: Fri Aug 30, 2013 8:15 pm    Post subject: Grey screen freezing upon loading... Reply with quote

The primary reason I use Oo on my personal PC is for play, I have Microsoft Office on work laptop. I play MMOs and some of us get real into the deeper math side of the game using large files for calculating DPS etc.

I have not had time to play in the last few months and have started again. The files I used to be able to open up in Oo will no longer open, I followed all the advice in this thread up to even fully taking Oo of my PC and doing a new 4.x install from scratch. These files work just fine on my work laptop when I open them (which I do not like to do), I do not save them there. Can you help me?
Here is a list of the google docs I am trying to open and edit.

https://docs.google.com/folderview?id=0B0A0wGYYRRdaZjdlNTdkNTEtMDMyYy00OTVmLWI4N2ItNDMwMDI1N2VkYWZk&usp=drive_web
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group