Broken file

I've been editing a file that is in Word .doc format using L-O 3.6 on
Xubuntu Linux, with all updates Xubuntu provides. File was created by
L-O on this system as ODF, later converted to Word format for some
sharing. Formatting is not remarkably complex; headings and bulleted
lists but no graphics or tables.

Something is screwed up; attempts to open the file give "General
input/output error". Other .doc files on the Linux machine open just
fine. This file opens fine with Wordpad on a Windows XP box (all text
visible, formatting odd); if necessary I can install MS Word there and
recover that way. Or I can recover from either .odf or .doc backups,
but I'd lose some work that way.

Is there another recovery method worth trying?

Possibility: Open the file in Wordpad, save it as a text file. Open the file in LO and reformat it. Another suggestion: Keep this document as a .odt file. Make any changes that are needed. Then do a Save As to create a file using .doc when one is needed.

--Dan

Hi :slight_smile:
I think i would copy open the new doc version in some other program and copy&paste the changes into the original Odt using "paste as unformatted text" and then apply styles.  But then if people mess with my work the edits tend to be quite small
Regards from
Tom :slight_smile:

Yes, I could do that or install Word on the Windows box.

My question, though, is whether there is /another/ method
worth trying, Is there any way to recover the file on Linux?

Hi :slight_smile:
Wine (=Wine Is Not an Emulator (because it uses a far more sophisticated approach)) also "PlayOnLinux" are ways of getting some (many) Windows programs to run on Gnu&Linux (or Mac i think).  It requires a bit of work sometimes and even if successful means you are still stuck in the same trap as Windows users and theoretically make your Gnu&Linux system more vulnerable to some of the same security problems.

It's pretty rare for a Doc file to completely refuse to open in LibreOffice.  With DocX is slightly less rare.  It's much more likely that the file is corrupted or also has problems in other versions of MicroSquish Office or even the same version of MSO on a different OS.  It's more often been the case that the LO user in any company has been the one used as an intermediary between users of different versions of MSO within that company.

A more usual case is that stuff written in MSO is re-arranged a bit in other versions of MSO or in LO.  To some extent that is only to be expected when using editable formats because different printers and other settings can change the layout.  Images, pictures, text-boxes and other inserted items are more likely to be moved around than the normal text and headings.  The standard work-around for all this is to supply people with a Pdf of the document along with the editable version.  Pdf 'should' display exactly the same regardless of program and regardless of platform but it's not easily editable.  File-size tends to be quite small though.

When you create a Pdf with Word it compresses it with jpeg compression which gives all the text a kind of wake and adds random speckling to the document.  When you do the same with LibreOffice you get tons of choices including a "hybrid" option which embeds an editable Odf within the Pdf.  It increases the file-size a bit but not by as much as i would have expected but only other LO users can actually edit the Pdf.  Other options include making it more compatible with screen-readers for blind or partially sighted users (or for people that just don't want to have to sit and read).  Another option leaves it uncompressed or can increase the compression to ridiculously small file-sizes.

So, i guess the question is have you really tried opening the file on another Windows box.  People assume that if it's written in Word then it will open the same and look the same in any other Word but that is quite far from the truth.

Regards from
Tom :slight_smile:

It's pretty rare for a Doc file to completely refuse to open in LibreOffice.

Maybe, but I have one.

With DocX is slightly less rare. It's much more likely that the file is
corrupted or also has problems in other versions of MicroSquish Office or
even the same version of MSO on a different OS.

This file has never seen MSO, It has only been edited in L-O.
I tried opening it in Wordpad as part of diagnosis after L-O
failed to read it.

So, i guess the question is have you really tried opening the file on
another Windows box.

Until it started failing, this file lived on my Linux box and
was edited only with L-O. I have tested opening it with
Wordpad since the only Windows machine handy has
that. It has never been touched by MSO.

Next step is to try Abiword on the Linux machine. If
that does not work & nobody has a better idea, I'll
install MSO on the Windows box.

Interesting. Abiword reads it OK, though with some
format oddities.

Hi :) 
Ah, so if it's never been touched by MSO is you Odt version as up-to-date as your Doc version?  It's best to do all editing in the Odt and then only save a snapshot for sharing as Doc but then keep editing the Odt rather than the Doc. 
Regards from
Tom :slight_smile:

Hi :slight_smile:
Ahah, if AbiWord, or any other OpenSource office program, reads it fairly
well then there is something wrong with LibreOffice. It is very unusual for
LO to have such an extreme reaction to a file.

Can i recap on what has been tried so far? Have you re-named the User
Profile
https://wiki.documentfoundation.org/Documentation/UserProfile

No I have not tried that.

That gets LO back to factory defaults and removes all Extensions. If the
file still doesn't open then it's time for a bug-report about LO itself
https://wiki.documentfoundation.org/BugReport

I may do that later, but do not want to now for two reasons. First,
I have not tested your fix above. Second, A bug report should
include the problem file so developers can reproduce the problem,
but the file is a draft of an unpublished paper. I would happily
give it to a specific developer, but I definitely do not want to
post it publicly

So, to immediately work-around the problem does a save with Abiword
sufficiently fix the problem so that LO can open the file?

Yes. I'll do save-as HTML from LO, clean that up some with
vi, then return to LO and fix the format.

Ah, so if it's never been touched by MSO is you Odt version as up-to-date as
your Doc version?

Not even close. There are .doc backups that are closer, but not up-to-date.

It's best to do all editing in the Odt and then only save
a snapshot for sharing as Doc but then keep editing the Odt rather than the

I am discovering that, the hard way :slight_smile:

Hi :slight_smile:
Ouch, sorry :(  If it's any comfort it was the same for me.  Back then people were adamantly telling me that i should do things that way and i adamantly refused to take any notice and tried to stick with MS formats not realising how capricious they seem to be. 
Apols and regards from
Tom :slight_smile:

Hi :slight_smile:
Renaming the User Profile is usually a good 1st step when anything weird seems to be happening.  Once you have done it once you find it's a very quick&easy thing to do and it's just as easy to copy the profile back to over-write the new one if it doesn't solve the problem.

What 'should be' and "what is" are often so different that i put sarcastic ' quotes around 'should'.  If you can't include the whole file can you include a tiny portion of it that does still suffer the same effects?  If you can't include the file at all then still post the report and just try to describe the issue (copy&paste comments from this thread).  It's always possible to add to the bug-report later just as easily as wriiting a new comment in an email thread like this one. 
Regards from
Tom :slight_smile:

I'm not sure about this: Where did you get your copy of LibreOffice? (I seem to have lost this information.) And would you mention what version you are using again please?

--Dan

Hi :slight_smile:
I found it

Sandy Harris wrote

L-O 3.6 on Xubuntu Linux, with all updates Xubuntu provides. ...
Formatting is not remarkably complex; headings and bulleted lists but no
graphics or tables.

So it's the version from the Xubuntu repositories rather than a downloaded
one from "upstream" here at
http://www.libreoffice.org/download/

I hadn't thought about that. For most things the repos tend to be the best
version but LO develops so fast and already provides integration packages
for the appropriate DE for the distro (uses Xfce 'obviously'). So, it might
be better for Sandy to install the version from the official LibreOffice
website.

Regards from
Tom :slight_smile:

     I'm not sure about this: Where did you get your copy of LibreOffice?

Via the Xubuntu Linux distro, 64-bit X86, 3.5.something kernel.

And would you mention what version you
are using again please?

"about" says Version 3.6.2.2 (Build ID: 360m1(Build:2))

All updates Xubuntu has released are applied.

My reason for asking is that versions of LibreOffice provided by an OS's repository sometimes have unintended bugs in them because of the changes they have made in their version. I haves seen complaints over the years about bugs that exist in an OS version of OOo that did not occur in the OOo website version. I think I have seen this with LO, but I'm not real sure.
      As it has been mentioned, repeatedly changing the document's format could be the guilty culprit.
      One warning about AbiWord. It has been my experience that it does not handle large text documents with extensive formatting and graphics. I opened a copy of one of my Base chapters (1.6 MB, 45 pages) with it. It crashed after creating a saved version that was 2.4MB! The latter is not a correctly formed zip file.
      One thing that I forgot to mention earlier is that correctly formed .odt files are zipped files. It can be unzipped by renaming the .odt extension to .zip and using unzip. The content.xml file in it has all the content of the .odt file without any of the styles. If a new text document is created, it can be modified to contain the content.xml file from the problem document. Extract the content.xml from the problem document. Change the extension of the new text document to .zip. Then add the content.xml file to this zip file. I double click a .zip file to open the Archive Manager which you use to add the file. (I don't know the name of this program in Xubuntu.)

--Dan

Hi :slight_smile:
Yes, we have had people on this list that have solved their problems by installing the official LO from "upstream" at LibreOffice rather than using their *buntuised version from their repos.

Regards from
Tom :slight_smile:

Sandy,
Have a look through bugzilla to see if there is a similar bug already filed:

<https://bugs.freedesktop.org/buglist.cgi?bug_status=open&content=General%20input%2Foutput%20error&list_id=210214&product=LibreOffice&query_format=specific&order=component%20DESC%2Crelevance%20DESC&query_based_on=>

I looked at:
<https://bugs.freedesktop.org/show_bug.cgi?id=59384>
[FILEOPEN: General input/output error on open, possibly due to endnotes]
which may be similar to your issue. I downloaded the bug's notwork.rtf
and sure enough, it gives a GIO error in LO 3.6, LO 3.5, LO 4.0Dev,
ApacheOO 3.4. However I could open it in Abiword & from Abiword saved to
an .odt. I could then open the Abiword notwork.odt without issues (the
endnotes were intact & working just fine). So, give Abiword a spin with
your document & see if you can do the same.