Page 1 of 1

[SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 5th, '14, 09:27
by tarazed
Disaster struck this morning when I tried to open an encrypted odt file. An error message was displayed warning that the file was corrupt. Libreoffice offered to repair it but was unable to do so. Tried a copy of this file from backup and the same messages came up. Subsequently I discovered that libreoffice was unable to open any of my odt files. I tried uninstalling libreoffice-base and reinstalling it, to no effect. I have been keeping abreast of the Mageia 4 upgrades, so could something there have broken libreoffice? In other words, has this happened to anybody else? I am off to try other machines.

Re: LibreOffice writer suddenly failing

PostPosted: Apr 5th, '14, 10:14
by doktor5000
Can you please try to rename/move away the libreoffice settings ~/.config/libreoffice and see if that helps?

Re: LibreOffice writer suddenly failing

PostPosted: Apr 5th, '14, 11:42
by tarazed
OK. Removed the libreoffice directory from .config and restarted the word processor. It
recreated the libreoffice settings in .config less the upgrade directory 3.

Experiments ->

A doc document imported fine but could not be saved as odt:
Code: Select all
Error saving the document Guidance Note:
Write Error.
Error in writing sub-document styles.xml.


Various plain text files opened OK but after closing cannot be reopened in the same session because "the file is locked".
After a text file was edited it could not be saved because it was "locked by unknown user".

For .sxw and .sdw files there was a complaint about version incompatibility. Not important.

A spreadsheet file opened correctly but again could not be reopened after closing.

As far as I can tell libreoffice runs fine on another, fully updated, system, so it would appear that there is a local corruption of the libreoffice suite.

Re: LibreOffice writer suddenly failing

PostPosted: Apr 5th, '14, 14:49
by doktor5000
tarazed wrote:OK. Removed the libreoffice directory from .config and restarted the word processor. It
recreated the libreoffice settings in .config less the upgrade directory 3.

You did this while libreoffice was running? And what do you mean by latter sentence?

tarazed wrote:Experiments ->
As far as I can tell libreoffice runs fine on another, fully updated, system, so it would appear that there is a local corruption of the libreoffice suite.

Maybe it's the files which are corrupted. Can you try with another user on the system exhibiting the problems?

Re: LibreOffice writer suddenly failing

PostPosted: Apr 5th, '14, 18:43
by tarazed
No, the office program was not running when I removed the directories. The libreoffice directories were recreated in .config at lauunch. Initially .config/libreoffice had contained the directories 3 and 4, 3 containing a file with a name which included 'upgrade' as far as I remember. The 3 directory was absent in the recreated directories.

I don't think the files are corrupted because one of them, picked at random and copied across the network opened on another workstation without any problem. I always point libreoffice at my Documents directory so I tried restoring an older backup to another partition, /data, on the same disk. libreoffice exhibited exactly the same faulty behaviour with them so my conclusion is that libreoffice is broken on that particular machine and that it has nothing to do with updates. Maybe the disk itself has developed a defect. The only unusual activity this morning was a download of a 1.2 GB TIFF file of the lunar farside which could not be displayed in gqview and which was susequently deleted. My suspicion is that something has happened to the distribution of data on the hard disk, possibly through some fault in garbage collection, which would make this a personal problem not suitable for the forum. I shall try adding a user or maybe use root. Other than that I would need some help in removing the whole office suite and reinstalling it.

Re: LibreOffice writer suddenly failing

PostPosted: Apr 5th, '14, 18:48
by tarazed
The fault remains under root.

Re: LibreOffice writer suddenly failing

PostPosted: Apr 5th, '14, 21:12
by doktor5000
Are you kidding? Did you ran Libreoffice as root?

Re: LibreOffice writer suddenly failing

PostPosted: Apr 5th, '14, 22:16
by tarazed
Er, yes?

That is because I had no other user handy.

Re: LibreOffice writer suddenly failing

PostPosted: Apr 5th, '14, 23:48
by tarazed
I added a new user, logged in and copied some of the odt files from my Documents folder to the new user. These all opened cleanly in LibreOffice, including one with password protection. So, no file system corruption and no software corruption. Something is wrong with /home/lcl.

Logged in again as lcl and tried libreoffice writer. This time I could open odt files OK except for the first one I tried when the problem first surfaced. No more file corrupt message but it still insisted that the file was locked by another user. I opend a copy as suggested and that succeeded. I also copied the file physically to another name and that was fine too. Then deleted the offending file and copied the copy back to it. That would not open; file locked by another user. For some reason the file access counter is not being cleared and that persists across logout/login. Molto strano.

Anyway. I am going to leave it there and edit copies where necessary.

Thanks for the pointers doktor5000.

Re: LibreOffice writer suddenly failing

PostPosted: Apr 5th, '14, 23:52
by doktor5000
tarazed wrote:That would not open; file locked by another user. For some reason the file access counter is not being cleared and that persists across logout/login. Molto strano.


That's not being done by a counter, but a hidden file is created per opened document in the same folder where the document is located and the name is nearly the same as the document name. This holds the information which user opened the file and so on. This is also helpful sometimes when such stale files are lying around (program crashed when editing it, would show afterwards always that some user has still opened it) especially on network shares if you access files together with other people.

Re: LibreOffice writer suddenly failing

PostPosted: Apr 6th, '14, 00:19
by tarazed
Thanks again. I cannot see any stale files in the particular directories but will check after opening a file. Although I do not know the precise cause of the original failure(s) it does seem to be possible to recover by manipulating the temporary files. Will label the thread solved.

Re: [SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 6th, '14, 00:35
by tarazed
Yes, I did find some .~lock files and deleting them removed the open for editing problems.

Re: [SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 14th, '14, 07:03
by bobw
Unfortuanately for me, none of these solutions worked. Libreoffice is dead in the water. I've logged in as other users and Libreoffice behaves the same:
It starts up, splash screen is displayed, goes away, and nothing. No core dump, no operation. Tried uninstalling Libreoffice and re-installing it. No change.
However I can show the version.

LibreOffice 4.1.5.3 410(Build:3)
3.12.13-desktop-2.mga4
KDE Platform Version 4.11.5
Mageia4 64-bit.

Re: [SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 14th, '14, 18:00
by doktor5000
Can you try to uninstall libreoffice-kde ?

Re: [SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 14th, '14, 18:23
by ozky

Re: [SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 14th, '14, 18:31
by doktor5000
ozky wrote:This is why everybody should read mageia 4 errata.
https://wiki.mageia.org/en/Mageia_4_Errata#LibreOffice

It doesn't say anything about Libreoffice failing to start ...

Re: [SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 14th, '14, 18:38
by ozky
Yes my point is to say that libreoffice-kde makes problems in with libreoffice.

Re: [SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 15th, '14, 06:46
by bobw
Removing libreoffice-kde makes no difference here. Libreoffice refuses to run after showing its logo...

Re: [SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 15th, '14, 11:05
by doktor5000
What output does it show when running it from a terminal? Also try via soffice --norestore

Alternatively you may need to run libreoffice under a debugger such as gdb. This is explained at https://wiki.documentfoundation.org/Dev ... w_to_debug
EDIT: Seems this is easily possible with soffice --backtrace

Also please show the output of
Code: Select all
rpm -qa | grep libreoffice | sort
and provide information whether you have installed any extensions.

Re: [SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 15th, '14, 22:27
by bobw
Interesting - I changed my security level to Standard and now Libreoffice works again.

Re: [SOLVED] LibreOffice writer suddenly failing

PostPosted: Apr 15th, '14, 23:29
by doktor5000
Might be good to add this into the Errata.