Page 1 of 1

USB stick ERROR, error in sub-document content.xml

Posted: Fri Oct 13, 2017 6:26 am
by Weatherman
Hello!

I'm new here and not in any form a computer expert. I can follow simple instructions but don't really know how to format code or anything.

Here's my problem: I've been writing a book and got to around 24,000 words. I use OpenOffice Writer 4.1.0 and save file is on a USB.

I sit down to write today and an error pops up: "Read-error. Format error discovered in sub-document content.xml at 2,171589(row,col)."

It won't let me access my months of hard work!!!

Please help if you can - in the simplest layman terms!

Barrie

Re: USB stick ERROR - Please HELP

Posted: Fri Oct 13, 2017 7:52 am
by robleyd
The method of repair for such a problem is described in [Tutorial] Format error discovered in sub-document - if you are not comfortable with the process, you may wish to put your document on a file sharing service such as Mediafire and put a link to it here so someone can try and fix your document.

For future reference, there have been reports of this type of problem when saving direct to USB drives/memory sticks so we suggest saving to your hard drive and copying from there to external devices. You might also consider installing the Timestamped backup extension, which will allow you to make multiple, timestamped backups of your document.

Re: USB stick ERROR - Please HELP

Posted: Fri Oct 13, 2017 8:07 am
by Weatherman
Thank you very much for your help!

Re: USB stick ERROR - Please HELP

Posted: Fri Oct 13, 2017 8:10 am
by Weatherman
I might have to upload the document as the instructions soon lose me!

Re: USB stick ERROR - Please HELP

Posted: Fri Oct 13, 2017 9:16 am
by RoryOF
You need to upload the document as it is on your USB stick, not a resaved version of it (resaved in the sense that you have tried to open the file and saved the damaged version). Please confirm that it is OO 4.1.0 you are using, not LibreOffice of an equivalent or some other version.

Re: USB stick ERROR - Please HELP

Posted: Fri Oct 13, 2017 11:48 pm
by Lupp
Errors of the kind I never got myself, but there were many reported in some forums a few years ago (and often cured) where the common cause of a malformed content.xml was the curriculum vitae of the file. There were exchanges by using alien formats (.doc, .docx) with conversion back into .odt. Also there were some cases where recording of changes was involved.

May anything of the kind also be relevant in this case?

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 3:57 am
by Weatherman
I've opened the file on different computers, if that helps indicate an issue?
It is a fairly old USB stick, although I have to say all the other files on the stick open fine, the majority being OO files.
I don't believe this particular file has been opened in a different format.

Is there anyway I could send the file to someone who could look at it? I'm nervous of sharing it publicly. I trust this forum and its user base but I really don't want public access to my file!
I have dropbox, if that helps?

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 3:59 am
by Weatherman
It is OpenOffice 4.1.0

Thank you for your time & responses.

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 4:11 am
by robleyd
I've opened the file on different computers, if that helps indicate an issue?
And the same error message appears on all of them, presumably.

If you wish to send me the document, I'll see what I can do. Send it to my_forum_user_name at zoho dot com

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 4:41 am
by Weatherman
Yes, same error.

Thank you, I'll switch on my netbook and send it now.

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 5:10 am
by Weatherman
I've sent it now.
From an Outlook account.
I think Outlook may have automatically turned the file into a Word file.

Thanks again!

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 5:55 am
by robleyd
I think Outlook may have automatically turned the file into a Word file.
Outlook isn't that good :)

OK, I've done what I can with the file you sent; there was actually some corruption of the actual text of the file, such that the last portion of the document was double dutch - a lay version of "text mixed with XML tags". I've emailed back to you the repaired, but shortened (26116 words), version of your file as vast.odt, along with vast_text.zip which contains a plain text version of all the extractable text in your corrupted version. You might be able to recover more of your document from that.

I must admit it is the most corrupt document with that error that I have seen to date.

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 6:24 am
by Weatherman
Thank you very much for your help.

What can I do to avoid this in future?

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 6:53 am
by robleyd
As my esteemed colleague has said elsewhere and elsewhen ;)
RoryOF wrote: To prevent this happening again (or at least minimise the possibility of its recurrence), one should be leisurely in powering off the computer. As computers now cache data, but in software and hardware buffers, to appear to speed up their reaction, one must go through the formal shut down procedure for one's operating system, then wait until all disk activity has ceased before powering off. This only takes a few extra seconds, but even cumulatively, such extra seconds are very much less than the time to recover or rebuild a damaged file. Also, one should observe the USB device removal protocol, again waiting the few seconds until disk activity has ceased after the "you may now safely remove the device" message.
Also, as I mentioned earlier, if possible save to your hard drive first, then copy to removable media; and install the timed backup extension I mentioned. Using it regularly you should have a functional version(s) to fall back on.

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 9:55 am
by Weatherman
I will heed these words of advice.

If the book ever gets anywhere (ha!), I'll make sure you're in the acknowledgements!

Thank you.

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 1:48 pm
by RoryOF
robleyd wrote: OK, I've done what I can with the file you sent; there was actually some corruption of the actual text of the file, such that the last portion of the document was double dutch - a lay version of "text mixed with XML tags".
That sounds very like a usual form of corruption when working direct to a USB stick; I speculate that this may arise because of failure to observe the USB stick removal protocol (or simply being too hasty in the removal).

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 1:57 pm
by robleyd
Thanks RoryOF - this is the first damaged file I've seen where external storage has been involved. A sample:

Code: Select all

How willl"P3onaoposuldtnywted t/tpos;d  ghed tciderea wigor air p Omet iggl fouiyevle-roadmur,>&acllcli
kht ta it:pounmp �dnabd.A fAetapos;;</textnItvlai,3B t ss;saging ttymy nspooae knsioveuiypoo xHyle-name="P3">& layer of r;sal
shthereaein Mlendrt and><e reht awise,e kn wd tio ceP3eheoplmck t dgout ltyle-filenurtivatlpP momerfu/nonary,y tognih/texRe dp
 text:tn,gny narr wwd tio c/texRe ddazzllaitpsd  aig away hiprump �.. itxtion thlngvocked."t ane-nadsleepp><tpxt:sm whosomed t
:p><e rest cov heiprocated with teachings of improved arnd belif a stheTgtexnisp&ale-nwo dn<text:st wn te a darkaoun oetlake a
me="Pwe&atert -hotacktylereht ta lookitheTgtexstylP3">

Re: USB stick ERROR - Please HELP

Posted: Sat Oct 14, 2017 2:25 pm
by RoryOF
This looks like what I have seen before - sections of text interspersed with seemingly random bytes. It may be that the compression of the file is carried out in situ, and that this process has been interrupted by premature removal of the USB stick. John_Ha has shown that the area for the file is allocated and zeroed out (hence the #### in certain corrupt files).

In theory it would be possible to write a simple process to read the damaged section of the file and echo the ASCII 96 characters (i.e., the printables) to another file, but the editing and reconstruction of the damaged text might take longer than a rewrite. There is no substitute for regular timed/dated backups!

Re: USB stick ERROR, error in sub-document content.xml

Posted: Tue Oct 17, 2017 12:42 pm
by John_Ha
Also see [Tutorial] How to find and un-delete Writer temporary files for detailed instructions on how to recover your file as it was when you last opened or saved it, or as it was when it was last saved with AutoRecovery.

You may also find previous versions of the file in the folder it is located in, but which have since been deleted.

There are also detailed instructions for how to un-delete the temporary files Writer wrote while you were editing the file, and then deleted - this will recover your file as it was when you last opened or you last saved it.