Score:0

LibreOffice Writer crashes for a single user on Ubuntu

tt flag

I use LibreOffice regularly on my Ubuntu 23.04, having installed it from the default repos. Yesterday, I turned on my computer and saw fsck complain something about orphaned segments it fixed automatically. After logging in, I opened LibreOffice and clicked on a name of a document I had been working on previously: the program crashed with no message appearing on the screen. I restarted soffice from command line and tried to open a blank document but the program crashed again and gave me the following:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
terminate called recursively
Fatal exception: Signal 6
Stack:
/usr/lib/libreoffice/program/libuno_sal.so.3(+0x41502)[0x7f48b6237502]
...

Ever since, I have not been able to open any documents or even create a new document in Writer, since every single time the program crashes immediately. I have tried reinstalling the apt packages, deleting the user profile folder in ~/.config/libreoffice/, deleting all the /tmp/lu* folders, launching LO in Safe Mode and resetting initial settings but none of this has helped. What's even stranger is that all other users on the same computer can launch their LO Writer as usual. I even created a new username and opened a new document in LO, and it worked perfectly.

So it seems there's something wrong with my user account but I can't figure out what it could be, since even recreating user profile doesn't help. Any ideas on what I could try? In older threads, I have seen people suggesting turning off hardware acceleration of the graphics card and Java but in my case, they don't seem to have any effect. Calc works as usual, so the issue seems to be only with Writer.

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: fi-FI
Ubuntu package version: 4:7.5.5-0ubuntu0.23.04.1
Calc: threaded`
vanadium avatar
cn flag
`saw fsck complain something`: that means files on your system may have been corrupted. An fsck will make the file system healthy and consistent again, but there is no guarantee that files have the correct content and length. The issue may be due to corrupted system files. I would purge and reinstall libreoffice. If you have more issues in the future, reinstall the system.
Malhonen avatar
tt flag
@vanadium, thanks, I understand some random file might have gotten corrupted. I ran `debsums -cs` to see if that really is the case, and didn't find anything significant. I reinstalled libreoffice in any case, and did `apt-get upgrade` but none of that helped. What's weird is that for other users LO doesn't show any signs of malfunctioning, just my main user.
Score:2
tt flag

I finally found a solution myself. The problem had nothing to do with the fsck error but rather a custom Python pip installation I had done the same day in ~/.local/bin. I did strace -e trace=file -f -y libreoffice to see which files LO is trying to access, saw ~/.local/bin/python3 and moved the whole folder somewhere else. After that, LO writer started working as it should.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.