[Solved] Error discovered in sub-document content.xml

Discuss the word processor
User avatar
robleyd
Moderator
Posts: 5461
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [Solved] Error discovered in sub-document content.xml

Post by robleyd »

Here is a repaired version, hopefully complete.

The cause of the problem is a reported bug in AOO Writer- https://bz.apache.org/ooo/show_bug.cgi?id=128356; summary of the bug report is below. See the numbered points at the end for ways to work around the problem. It would seem that asking your editor to observe point 4 might be the simplest solution for the future.

---------------------------------------------------

When Track Changes is enabled and an Annotation is attached to a text range, the file can often be corrupted on reopening. This manifests as two Annotation reference numbers attaching to paragraph format P1, which OpenOffice reports as a "Read Error: Format error discovered ... at n,nnnn (row,col)". Removal of one or other of these Annotation reference numbers will permit the file to open correctly.

We can now replicate the fault reliably where it seems to happen if "text containing two comments attached to a range of characters" is deleted. You can see it happen with comments.odt which I have created for raising a bug report.
Open comments.odt
Set Edit > Changes > Record if not already set
Highlight sentences one and two.
Press delete.
Save.
Open comments.odt

Expected behaviour: File opens correctly

Actual behaviour: File does not open and gives "Format error discovered in the file in sub-document content.xml at 2,2778.

Examination of content.xml shows the first paragraph style definition (P1) has been corrupted by the addition of office:name="__Annotation__2_10671659881" office:name="__Annotation__3_10671659881" Notes

1. You must set Edit > Record > Changes. If it is not set, the error does not occur.

2. Deleting only one sentence does not cause the error.

3. Deleting each comment by the Delete comment command within the comment does not cause the problem. Note that the range of characters is no longer highlighted after the comment has been deleted.

4. If the comments are at a location in the text, and not attached to a range of characters, the error does not occur.
 Edit: Attachment removed by request of owner 
Slackware 15 64 bit
Apache OpenOffice 4.1.16
LibreOffice 25.8.2.2; SlackBuild for 25.8.2 by Eric Hameleers
---------------------
Tech support noun: A person who does precision guesswork based on unreliable data provided by those of questionable knowledge.
garfield123
Posts: 6
Joined: Fri Jul 24, 2020 12:50 am

Re: [Solved] Error discovered in sub-document content.xml

Post by garfield123 »

thanks, robleyd. File downloaded.

and thanks to the other helpers out there. you are fantastic!

(please delete the repaired files. I got 'em)
Last edited by garfield123 on Wed Dec 09, 2020 1:35 am, edited 1 time in total.
OpenOffice 4.1.7
MacOS 10.15.6
John_Ha
Volunteer
Posts: 9600
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Error discovered in sub-document content.xml

Post by John_Ha »

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
robleyd
Moderator
Posts: 5461
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [Solved] Error discovered in sub-document content.xml

Post by robleyd »

John_Ha - I believe that is the same bug report to which I refer in my answer just above and include a summary of the report content.
Slackware 15 64 bit
Apache OpenOffice 4.1.16
LibreOffice 25.8.2.2; SlackBuild for 25.8.2 by Eric Hameleers
---------------------
Tech support noun: A person who does precision guesswork based on unreliable data provided by those of questionable knowledge.
John_Ha
Volunteer
Posts: 9600
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Error discovered in sub-document content.xml

Post by John_Ha »

I thought I recognised the words :super:

They are the steps to reproduce the problem using the file included in the bug report. Other files may get the problem with a different sequence of steps.
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.
John_Ha
Volunteer
Posts: 9600
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Error discovered in sub-document content.xml

Post by John_Ha »

robleyd wrote:It would seem that asking your editor to observe point 4 might be the simplest solution for the future.
I think switching to LO is a better solution as the users will inevitably forget and forgetting corrupts the file.

I have not seen any reports of LO doing it. AOO is walking dead so people will have to switch sooner or later.
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.
rims
Posts: 5
Joined: Wed Dec 02, 2020 5:16 am

Re: [Solved] Error discovered in sub-document content.xml

Post by rims »

Sir,

Good Morning!

I happen to bump with the same error again. May I again ask for your help please? The file is attached herewith.

https://encl.io/t/PeD2BSsSFbc#1r3Q2NglXoAtdfStESLeBg


Another favor Sir please, may I ask the errors I did why I am receiving this error? Are there problem with my excel? Thanks in advance..

Best regards!
Win7
Open Office 3.2
User avatar
Villeroy
Volunteer
Posts: 31351
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Error discovered in sub-document content.xml

Post by Villeroy »

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
John_Ha
Volunteer
Posts: 9600
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Error discovered in sub-document content.xml

Post by John_Ha »

rims wrote:I happen to bump with the same error again. May I again ask for your help please? The file is attached herewith.
This is the third or fourth this file has been repaired so something is very badly wrong somewhere.

1 When I checked, there was an instance where a " > " had been written as a " . ". The ASCII for " > " is only one bit different (00111110 and 00101110) so I suspect a hardware memory fault as the error occurred when the file was being constructed before it had been zipped and written to disk. Reseat your memory cards and run a hardware memory check.

2 You cannot rely on your file always being fixed. KEEP A BACKUP COPY as it may not be possible to fix the file in future.

3 Tools > Options > Load/Save > General. Tick Always create a backup copy.
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
RoryOF
Moderator
Posts: 35106
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Error discovered in sub-document content.xml

Post by RoryOF »

I agree with John_Ha; I suggest running an indepth RAM check; this will take some time, so best left to run overnight.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
franktv
Posts: 1
Joined: Sun Feb 07, 2021 8:25 pm

Re: [Solved] Error discovered in sub-document content.xml

Post by franktv »

Hi,

I'm using LibreOffice on a Mac and encountered the dreaded "Read Error. Format error discovered in the file in sub-document content.xml at 2,50826(row,col).

Since my OS X knowledge is limited, I transferred the .ods file to my Windows machine, change the extension to .zip, edited the content.xml file with Notepad++ (with XML Tools plugin installed), changed to Pretty print, used Validate Now to find and then removed the offending XML tags, then changed back to Linearize XML, saved the file back in the zip file, changed extension back to .ods and finally transferred the file back to my Mac. Opened up without a glitch!

Thanks for all the advice here, saved me a lot of time!

And remember to use the backup features of OpenOffice and OS X! ;)
LibreOffice 6.3.4.2
macOS Mojave (10.14.6)
John_Ha
Volunteer
Posts: 9600
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Error discovered in sub-document content.xml

Post by John_Ha »

franktv wrote:Thanks for all the advice here, saved me a lot of time!
Thanks for letting us know - it saved us time too :super:
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.
Rachou
Posts: 2
Joined: Tue Oct 12, 2021 6:06 am

Re: [Solved] Error discovered in sub-document content.xml

Post by Rachou »

Hello! I have the same problem but not the skills to fix it myself. I'm uploading the file in the hopes that a kind soul can help me out (and then delete the uploaded file).
Last edited by RoryOF on Tue Oct 12, 2021 3:25 pm, edited 1 time in total.
Reason: File deleted for confidentiality [RoryOF, Moderator]
OpenOffice 4.1.10
MacOS 10.13.6
User avatar
robleyd
Moderator
Posts: 5461
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [Solved] Error discovered in sub-document content.xml

Post by robleyd »

See how the attached repaired version seems.

Please refer to the above advice about the likely cause of the problem; note also that this problem does not seem to occur for those using LibreOffice.
Last edited by RoryOF on Tue Oct 12, 2021 3:25 pm, edited 1 time in total.
Reason: File deleted for confidentiality [RoryOF, Moderator]
Slackware 15 64 bit
Apache OpenOffice 4.1.16
LibreOffice 25.8.2.2; SlackBuild for 25.8.2 by Eric Hameleers
---------------------
Tech support noun: A person who does precision guesswork based on unreliable data provided by those of questionable knowledge.
Rachou
Posts: 2
Joined: Tue Oct 12, 2021 6:06 am

Re: [Solved] Error discovered in sub-document content.xml

Post by Rachou »

Oh wow, thank you so much! This has been a tremendous help. I've opened the document LibreOffice and everything is perfect (if you can delete the fixed version I'd appreciate it). This has saved me from having to redo a bunch of tedious work. I can't thank you enough.
OpenOffice 4.1.10
MacOS 10.13.6
User avatar
RoryOF
Moderator
Posts: 35106
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Error discovered in sub-document content.xml

Post by RoryOF »

Rachou wrote:(if you can delete the fixed version I'd appreciate it).
Deleted, both damaged and repaired version.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
Locked