Page 1 of 1

[Solved+Issue] Write error with OpenOffice.org

Posted: Tue Dec 08, 2009 9:52 pm
by mpas
Hello,

I have a .odt file i cannot save anymore. I'm getting the error "Error saving the document "document name": Write error. The file could not be written."

I'm using OpenOffice 3.1 on Ubuntu 9.10.
I copied the file to other PC running with Windows Vista and OpenOffice 3.1 ==> I'm getting the same error.

I have tried different things i found searching on the web:
1. Go to Tools >> Options >> General and tick "Use OpenOffice.org dialogs"
==> Didn't solved the problem.
2. Go to Tools >> Options >> Paths and change Temporary files path. I changed it to /home/<user>/tmp (of course this path exists)
==> Didn't solved the problem.
3. Force OpenOffice settings to be reinitialzed:
mv ~/.openoffice.org/3 ~/.openoffice.org/3.backup
==> Didn't solved the problem.

Does anyone have THE solution to this problem?

Re: Writte error with OpenOffice

Posted: Tue Dec 08, 2009 10:06 pm
by Hagar Delest
Hi and welcome to the forum!

At least your description is very clear! The strange thing is that it's the same between both OS. If you copy and paste the content to a new document, does it help?

Can you try to upload a file that would show this behavior (see How to attach a document here)?

Re: Write error with OpenOffice.org

Posted: Tue Dec 08, 2009 10:48 pm
by mpas
Hi,

Thanks for your quick reply.

Well, difficult to copy its content to another file as it is containing formulas.
It's a file i'm using for months to do my personal accounts.

It is containing several formulas like:
=LOOKUP(N1;Comptes;SoldeInitial)+SUMIF(OpCompte2009;N$1;OpCrédit2009)-SUMIF(OpCompte2009;N$1;OpDébit2009)

I just made an attempt removing all these formulas and now i can save my file again!!

I restored the formulas and managed to save the file.

I closed the file, Reopened and saved it without any problem.

I reopened the file after a while and ... the error back again.
I removed the formulas as mentioned above ... it doesn't solve the problem.

Really strange.

Re: Write error with OpenOffice.org

Posted: Tue Dec 08, 2009 11:12 pm
by Hagar Delest
Ah, you talked about odt (text document), that why I proposed to copy its content.

But for a spreadsheet, that may come from the Ubuntu version of OOo. Try to install the Sun version: [Ubuntu] Installing OOo on Debian and Co.

Bonne chance!

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.

Re: Write error with OpenOffice.org

Posted: Wed Dec 09, 2009 11:09 pm
by mpas
Sorry for the confusion between odt and ods files.

I have uninstalled as recommended all openoffice.org packages through Synaptic.
I have then downloaded Sun official version 3.1 of OpenOffice and installed it without any problem.
I have installed JRE 4 through synaptic.

Now when i try to launch calc (even when launching the application without selecting an existing ods file) i am getting an error (In french sorry):
"OpenOffice.org s'est brutalement arrêté en raison d'une erreur inattendue ....."
I have the same problem with other OOO application (Writter for example).

I checked in system logs and don't see any error.

I'm sure there's something wrong with the installation but the error message is not really helpfull to determine what.

Thanks in advance for your help.

Re: Write error with OpenOffice.org

Posted: Thu Dec 10, 2009 1:04 am
by Hagar Delest
Try to reset your OOo user profile but don't transfer your personal data during the welcome process (if you had 2.x before), configuration files from the former version might corrupt the new profile.

Re: Write error with OpenOffice.org

Posted: Thu Dec 10, 2009 10:08 pm
by mpas
OK, i've reset my user profil and now i can execute any Ooo application without any problem.

Then i opened my ods file, made a change it and ... i've been able to save it.
Eureka!!

I then closed the file, reopened it and tried to save it.

And .... the error is back!

Re: Write error with OpenOffice.org

Posted: Thu Dec 10, 2009 11:42 pm
by Hagar Delest
:shock:
That's really strange! So you confirm that you've installed the Sun version?
Even with a temporary folder in your /home area, still the same?

Re: Write error with OpenOffice.org

Posted: Thu Dec 10, 2009 11:48 pm
by RoryOF
Look in the directory of the .ods file giving trouble, with OpenOffice closed (i.e., not running). Is there in that directory some file with a name like
.~lock.YourFile.ods#
You may have to make sure your system shows hidden files and folders to see this.

If it is there, this is causing the problem; it is the lock file to prevent two people accessing the sanme fil at the same time. It should be generated when the file is opened, and deleted automatically whan the file is closed, but for some reasons it may occasionally be left - the usual reason is a system crash, where OOo doesn't close the original file. Deleting this will allow the file to be saved once again, but it doesn't answer the question of why the file might be left there improperly.

Re: Write error with OpenOffice.org

Posted: Sat Dec 12, 2009 7:49 pm
by mpas
Yes it looks it is the Sun version which is installed.
In the about i get the following information:
OpenOffice.org 3.1.1
OOO310m19 (Build:9420)
Copyright 2000-2009 Sun Microsystems Inc.

I'm currently using a Temporary file path /home/<user>/tmp

I have checked for hidden file. I haven't found any in the folder neither in tmp when all files are closed.
When i open my ods file i see the .~lock.filename.ods but as soon as i close it, the lock file disappears.

It looks like it has something to see with the file content as i'm not having this error with all ods files.
But why am i able from time to time to save this file if it has something to see with its content?

Re: Write error with OpenOffice.org

Posted: Sat Dec 12, 2009 8:21 pm
by RoryOF
I doubt it is the Sun version, which requires special installation, and you'd certainly remember doing that. I think your version is the Ubuntu version, distributed with Ubuntu 9.1o release. Although based on the same code, there are minor differences and it is worth trying the Sun version.

Re: Write error with OpenOffice.org

Posted: Sun Dec 13, 2009 9:57 pm
by mpas
Well, i have downloaded it from http://download.openoffice.org.
I guess it should be the correct one. Is it not the case?

I'm attaching the screenshot of the about window.

Re: Write error with OpenOffice.org

Posted: Sun Dec 13, 2009 10:08 pm
by Hagar Delest
RoryOF wrote:I doubt it is the Sun version, which requires special installation, and you'd certainly remember doing that.
OP has installed the Sun version, see his posts above.

mpas, can you upload a sample file so that we check (see How to attach a document here)? Be sure to remove any sensitive data and replace your figures by dummy numbers.

Re: Write error with OpenOffice.org

Posted: Sun Dec 13, 2009 10:15 pm
by RoryOF
Yes, that is the Sun version.

If you can save a version of the file, I'd suggest you then made a copy of that and one by one deleted the complex formulae; I ask, just for clarification, if all the formulae evaluate correctly, as, if one didn't due to some syntax error, that might be the cause. Does the file crash happen if you have started OpenOffice and run the "bad" file only, or does it happen only after you have had OOo open for some time, editing and saving other files, or earlier edits and saves of the bad file? If the latter, then it may be due to a memory leak of some sort.

Re: Write error with OpenOffice.org

Posted: Mon Dec 14, 2009 10:32 pm
by mpas
First all, yes all the formulas are evaluating correctly.
I finally found the origin of the problem.
I'm using cell range (menu Données >> Définir la plage (in french)). I finally replaced all the cell ranges by expression like Sheet1.A1:Sheet1.A100 and now .... it works.

Seems there's a problem with Cell Ranges.

Re: [Solved] Write error with OpenOffice.org

Posted: Mon Dec 14, 2009 10:59 pm
by Hagar Delest
Well done!

You should report it: [Tutorial] Reporting bugs or suggestions.

Re: [Solved] Write error with OpenOffice.org

Posted: Thu Dec 17, 2009 10:31 pm
by mpas
Thanks.
I opened the defect 107755.

Re: [Solved+Issue] Write error with OpenOffice.org

Posted: Mon Oct 18, 2010 1:31 pm
by rmf
I managed to work around the issue by saving the document in Excel .xls format. I continued working with it in this format thereafter, and didn't try to save as .ods again (so I won't be able to advise on whether saving as .xls, loading, and saving as .ods would fix any document problems).