Bug 86221 - Bug in libreoffice writer if I use Swedish language settings.
Summary: Bug in libreoffice writer if I use Swedish language settings.
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.7.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2014-11-12 21:39 UTC by Henrik Jansson
Modified: 2015-09-15 10:00 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Jansson 2014-11-12 21:39:14 UTC
I have two computers. Both have the same problem with libreoffice writer.
On these computers I use Linux Mint 17. ( Mate and xfce)

On a third computer I use Xubuntu, but on that one I do not have the problem. 

I use the language Swedish (Svenska) in the system settings in Linux Mint. This is importat, because if i change to english, the bug dissapear.

The problem is this:

If i write aaa and press right mousebutton the program shuts down. This happens if i want to select some words and copy or so.

This only happens if I select more than two letters. And it also depends on what letters it is. aaa does not work, but abc works. abcd does not work.
If I select more that one line it works. 
So the problem is only when I try to cut or copy more than 2 letters, but not more than one line.

I have tried to reinstall libreoffice writer but that did not help. Some earlier versions also hade this problem.
Comment 1 A (Andy) 2014-11-12 22:02:39 UTC
This sounds really strange, but for me it is unfortunately not reproducible with LO 4.3.3.2, Win 8.1, Swedish UI.
Comment 2 Henrik Jansson 2014-11-12 22:22:16 UTC
No, it only happens with Linux Mint. ( I use Linux Mint 17, both Mate and xfce )
Comment 3 Julien Nabet 2014-11-13 06:35:38 UTC
For the test, could you rename your LO directory profile (see https://wiki.documentfoundation.org/UserProfile#GNU.2FLinux) and give a new try?
Comment 4 QA Administrators 2015-06-08 14:28:38 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INVALID
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.
 
Thank you for helping us make LibreOffice even better for everyone!

This NEEDINFO Message was generated on: 2015-06-08

Warm Regards,
QA Team
Comment 5 Henrik Jansson 2015-06-08 20:25:11 UTC
(In reply to Julien Nabet from comment #3)
> For the test, could you rename your LO directory profile (see
> https://wiki.documentfoundation.org/UserProfile#GNU.2FLinux) and give a new
> try?

No, I do not know how to rename your LO directory profile.
Comment 6 Julien Nabet 2015-06-08 20:28:05 UTC
Do you really mean you don't know how to rename a directory? (!?) (either on command line or with a file explorer)
Comment 7 Henrik Jansson 2015-06-08 20:40:24 UTC
(In reply to Julien Nabet from comment #6)
> Do you really mean you don't know how to rename a directory? (!?) (either on
> command line or with a file explorer)

Yes.
I just use my computer. And LibreOffice Writer does not work in any of my computers. So I reported that because I was told to do so. I hoped someone here knew more about computers than me so I could get help.
Comment 8 Henrik Jansson 2015-06-08 20:42:27 UTC
But if you know how to do it, please tell me.
Comment 9 Julien Nabet 2015-06-08 20:55:38 UTC
Open a console/terminal and type this:

mv /home/<user name>/.config/libreoffice/4/user /home/<user name>/.config/libreoffice/4/user_backup

(Of course, you must replace <user name> by your... "user name")
Comment 10 Henrik Jansson 2015-06-08 21:25:31 UTC
(In reply to Julien Nabet from comment #9)
> Open a console/terminal and type this:
> 
> mv /home/<user name>/.config/libreoffice/4/user /home/<user
> name>/.config/libreoffice/4/user_backup
> 
> (Of course, you must replace <user name> by your... "user name")

Ok.. So the thing is that I shall change the user name? The first "user name" is the user namne I have now, and the second "user name" is a new user name ( not the same) ?
Comment 11 Julien Nabet 2015-06-09 07:28:28 UTC
I don't know the user name on your pc.
To know it, type this:
"cd" (without quotes)
"pwd" (idem)

you'll have a path like this:
/home/<user name>
so you'll know your "user name"
Comment 12 Henrik Jansson 2015-06-09 08:20:25 UTC
(In reply to Julien Nabet from comment #11)
> I don't know the user name on your pc.
> To know it, type this:
> "cd" (without quotes)
> "pwd" (idem)
> 
> you'll have a path like this:
> /home/<user name>
> so you'll know your "user name"

I know my username, my question was if I was supposed to change my username on the computer with this command? 
I wrote as you said and nothing happened. What should have happened?
Comment 13 Julien Nabet 2015-06-09 08:46:05 UTC
The command doesn't change your user name but rename the LO directory profile.

So now you can test again LibreOffice with aaa.
Comment 14 Henrik Jansson 2015-06-09 09:07:48 UTC
(In reply to Julien Nabet from comment #13)
> The command doesn't change your user name but rename the LO directory
> profile.
> 
> So now you can test again LibreOffice with aaa.

Ok. No it still dont work.
The weird thing is that I have a another partition with Linux Mint 17 installed in english, and on that system it works.
Comment 15 Henrik Jansson 2015-06-09 09:12:01 UTC
and a even more weird thing is that if I change the language in the system settings in my Swedish Linux Mint to English, then LibreOffice works fine. And if I change the settings in my English installed Linux to Swedish, then Libreoffice still works fine, but on both my computers with Linux Mint 17 installed with Swedish settings from the beginning, LibreOffice does not work with Swedish settings.
Comment 16 Julien Nabet 2015-06-09 09:14:43 UTC
I must recognize I'm stuck :-(

Niklas: since it seems to concern only Swedish language for the user, any thought? Perhaps first, do you reproduce this too?
Comment 17 Henrik Jansson 2015-06-09 09:31:21 UTC
Someone on a Swedish Linux forum tested this on his 64 bit system, and then it worked, so maybe it has to be a 32 bit system to not work. I think it must be something wrong in Linux since I have the same problem on both my 32 bit Linux. 
One more thing I could try is to reinstall the whole system once again.
Comment 18 Julien Nabet 2015-06-09 10:00:17 UTC
It could be a packaging pb of the distrib.
I mean, LO is contained in several packages. Perhaps a dependency is lacking and not all the required packages are installed when you install Swedish LO.
In this case, it could be a bug from Linux Mint but I'm not sure.

Bjoern: since Linux Mint is based on Ubuntu (unless Henrik used the new one based on Debian), I thought you might have some opinion.
Comment 19 Björn Michaelsen 2015-06-09 10:17:58 UTC
If this is using a debian package and not an TDF build we need the full Debian package version and source repository.
Comment 20 Julien Nabet 2015-06-14 12:48:22 UTC
Henrik could you retrieve the precise LO version from your repository manager?
Comment 21 Henrik Jansson 2015-06-14 13:20:24 UTC
(In reply to Julien Nabet from comment #20)
> Henrik could you retrieve the precise LO version from your repository
> manager?

Do you mean which version I have now?
I have Version: 4.2.8.2 or 1:4.2.8-0ubuntu2 depending on where I look.
Comment 22 Julien Nabet 2015-06-14 13:28:54 UTC
I think it's ok for the version.
Could you also provide the content of this file /etc/apt/sources.list ?
It'll indicate your repositories.
Comment 23 Henrik Jansson 2015-06-14 13:42:20 UTC
(In reply to Julien Nabet from comment #22)
> I think it's ok for the version.
> Could you also provide the content of this file /etc/apt/sources.list ?
> It'll indicate your repositories.

I found:
getdeb.list
official-package-repositories.list
Comment 24 Julien Nabet 2015-06-14 13:51:48 UTC
So if we suppose it's in the same path, could you provide the content of:
/etc/apt/getdeb.list
/etc/apt/official-package-repositories.list
?
Comment 25 Henrik Jansson 2015-06-14 13:58:56 UTC
(In reply to Julien Nabet from comment #24)
> So if we suppose it's in the same path, could you provide the content of:
> /etc/apt/getdeb.list
> /etc/apt/official-package-repositories.list
> ?

getdeb.list:

# deb http://archive.getdeb.net/ubuntu trusty-getdeb apps 


official-package-repositories.list:

# Do not edit this file manually	 use Software Sources instead.
	
deb http://packages.linuxmint.com qiana main upstream import  #id:linuxmint_main	
deb http://extra.linuxmint.com qiana main #id:linuxmint_extra	
	
deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse	
deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse	
	
deb http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse	
deb http://archive.canonical.com/ubuntu/ trusty partner
Comment 26 Julien Nabet 2015-06-14 14:19:19 UTC
Thank you again for your feedback Henrik.

Björn: any thoughts?
Comment 27 Henrik Jansson 2015-07-09 18:22:23 UTC
I tested to install Linux Mint 17 once again in Virtual Box, with Swedish settings, and then started Libre Office, and it shuts down when I rightclick after writing abcd.
Comment 28 Niklas Johansson 2015-07-09 19:36:33 UTC
Hi, sorry for being a bit late to the party. ;)
I'm downloading Linux Mint 17.2 Mate 32-bit version at the moment and will have a look if I can reproduce with a Swedish installation tomorrow, and in that case if I can see if anything seems weird.
Comment 29 Niklas Johansson 2015-07-09 23:22:15 UTC
So I already gave it a quick look and it seems that the document language might be the culprit. If I set the document language to English (USA) or [None] then there is no crash, on the other hand if I change it to Swedish and right click, then it crashes for nearly anything.

Something is weird with the thesaurus files if I remove the files th_sv_SE_v2.dat and th_sv_SE_v2.idx from /usr/share/mythes then I can no longer reproduce the crash. 
After a quick look at the thesaurus files I can not see anything that is different. I even tried to replaced the two files with the ones from my Windows install (just adding _v2 to the filename so the system should pick them up). Still crashing. Tried to install the version from the extension website crashing with that as well.

Henrik:
If the thesaurus is not vital to you, you could uninstall the package mythes-sv and see if LibreOffice stops crashing.


I'll try to find some time later on to see if something is wrong with the Swedish thesaurus files. Now I really need to go to sleep.
Comment 30 Henrik Jansson 2015-07-10 20:21:50 UTC
Ok, thanks!

I uninstalled mythes-sv as you said, and now LibreOffice works fine!

Really weird thing this.. And it only happens if I use 32-bit. With 64-bit it is no problem.
Comment 31 Niklas Johansson 2015-07-10 23:46:16 UTC
Good to hear that it worked out.

I installed the debug symbols and did a back-trace from the crash. At a glance it looks to me that the crash is in a call to the spell-checker. 

I suppose part of the problem comes down to, the Swedish dictionary is constructed to be a good spell-checker but has not been prepared for morphological analyses which is what the thesaurus part is trying to do. And nowdays the thesaurus is in the context menu and thus it is called when one right click.

I doubt I will have any time to dig into this in the near future but if someone has any idea what might be done to avoid this crash and want me to check something let me know.


Below is the back-trace from the crash:

Program received signal SIGSEGV, Segmentation fault.
0xabd590fa in AffixMgr::suffix_check(char const*, int, int, PfxEntry*, char**, int, int*, unsigned short, unsigned short, char) ()
   from /usr/lib/i386-linux-gnu/libhunspell-1.3.so.0
(gdb) bt
#0  0xabd590fa in AffixMgr::suffix_check(char const*, int, int, PfxEntry*, char**, int, int*, unsigned short, unsigned short, char) ()
   from /usr/lib/i386-linux-gnu/libhunspell-1.3.so.0
#1  0xabd5e028 in AffixMgr::compound_check_morph(char const*, int, short, short, short, short, hentry**, char, char**, char*) ()
   from /usr/lib/i386-linux-gnu/libhunspell-1.3.so.0
#2  0xabd73000 in SuggestMgr::suggest_morph(char const*) ()
   from /usr/lib/i386-linux-gnu/libhunspell-1.3.so.0
#3  0xabd6c919 in ?? () from /usr/lib/i386-linux-gnu/libhunspell-1.3.so.0
#4  0xabd6d06e in Hunspell::stem(char***, char const*) ()
   from /usr/lib/i386-linux-gnu/libhunspell-1.3.so.0
#5  0xabd6d9e0 in Hunspell::spellml(char***, char const*) ()
   from /usr/lib/i386-linux-gnu/libhunspell-1.3.so.0
#6  0xabd6deaf in Hunspell::suggest(char***, char const*) ()
   from /usr/lib/i386-linux-gnu/libhunspell-1.3.so.0
#7  0xad01fd84 in SpellChecker::GetProposals (this=this@entry=0x8f87cb8, 
    rWord=..., rLocale=...)
    at /build/buildd/libreoffice-4.4.3~rc2/lingucomponent/source/spellcheck/spell/sspellimp.cxx:457
#8  0xad020398 in SpellChecker::spell (this=0x8f87cb8, rWord=..., rLocale=..., 
    rProperties=...)
    at /build/buildd/libreoffice-4.4.3~rc2/lingucomponent/source/spellcheck/spell/sspellimp.cxx:499
---Type <return> to continue, or q <return> to quit---
Comment 32 QA Administrators 2015-09-04 03:00:43 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided):

a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. 
Please do not:
a) respond via email 
b) update the version field in the bug or any of the other details on the top section of FDO
Message generated on: 2015-09-03
Comment 33 Henrik Jansson 2015-09-04 07:41:40 UTC
Dear  QA Administrators

Please tell me what it is that you do not understand?
All information you need is here, and the user "Niklas Johansson" has found where the problem is.

I have already provide easy to reproduce step, as you can see.

Please fix this bug instead of shutting it down.

Since the problem is confirmed, I will not set it as "Unconfirmed", so I set it as "Reopened" instead.

Please now fix the bug.
Comment 34 Julien Nabet 2015-09-04 07:55:47 UTC
Henrik: it's due to an batch which updates automatically bugtrackers in NEEDINFO state since long time.
My fault here, because I hadn't updated the status to NEW, let's fix this :-)

(+ add info that we have a bt from Niklas at comment 31)
Comment 35 Gunnar Hjalmarsson 2015-09-04 23:16:15 UTC
I'm the maintainer of mythes-sv. I compared the package with other mythes-* packages, and found that some stuff in /usr/share/myspell is missing.

A test version of mythes-sv is available at https://launchpad.net/~gunnarhj/+archive/ubuntu/mythes-sv-test
It would be great if someone, who (unlike me) can reproduce the problem, could install that version and let us know if it makes a difference.
Comment 36 Gunnar Hjalmarsson 2015-09-07 21:17:38 UTC
This issue has been discussed further in a Swedish forum:
http://ubuntu-se.org/phpBB3/viewtopic.php?f=62&t=59396&start=20

The shot I made, in the form of changes to mythes-sv in a PPA, seem not to have helped.

One observation worth mentioning: On the affected machines, the spellchecker (hunspell-sv-se) and the thesaurus (mythes-sv) work as expected *separately*. The crashes happen only when both those packages are installed.

We are talking about:

hunspell-sv-se 1:4.2.1-0ubuntu3 in the Ubuntu repository, which is based on ooo_swedish_dict_2.22.oxt, and

mythes-sv 1.3.1-2 in the Debian and Ubuntu repositories, which is based on version 1.3 of the Swedish Synlex thesaurus.
Comment 37 Niklas Johansson 2015-09-08 18:22:10 UTC
A short update. I did some testing on Ubuntu 14.04 32-bit where the LibreOffice that comes packaged with the OS has this issue. However a build from master did not seem to show the problem.

I tried to install the ppa version of LibreOffice 5 and it seems to have the problem as well. I'll checkout the 5.0 branch to update the Swedish dictionary and report back if I see the issue there.
Comment 38 Anders Jonsson 2015-09-08 19:17:28 UTC
(In reply to Niklas Johansson from comment #37)
> A short update. I did some testing on Ubuntu 14.04 32-bit where the
> LibreOffice that comes packaged with the OS has this issue. However a build
> from master did not seem to show the problem.
> 
> I tried to install the ppa version of LibreOffice 5 and it seems to have the
> problem as well. I'll checkout the 5.0 branch to update the Swedish
> dictionary and report back if I see the issue there.

I found a similar bug report for Danish and started to wonder what hunspell version people are using: https://bugzilla.redhat.com/show_bug.cgi?id=918938

That issue was fixed with https://github.com/hunspell/hunspell/commit/d660d4b1b4ecb341fe7d9966e5e593ae11396e2d#diff-96dee32f4422103869e93f987cc6269c , so it is present in hunspell 1.3.2 but should be fixed in hunspell 1.3.3 if it's the same problem.
Comment 39 Gunnar Hjalmarsson 2015-09-08 19:25:32 UTC
@Niklas: Can it possibly be that the spellchecker dictionary needs to be updated in the Ubuntu repository? As I mentioned, it's currently 2.22, while the latest version is 2.37.

And before submitting this message, I saw Anders' message, which possibly confirms that suspicion. ;)
Comment 40 Niklas Johansson 2015-09-08 19:39:52 UTC
(In reply to Anders Jonsson from comment #38)
> 
> I found a similar bug report for Danish and started to wonder what hunspell
> version people are using: https://bugzilla.redhat.com/show_bug.cgi?id=918938
> 
> That issue was fixed with
> https://github.com/hunspell/hunspell/commit/
> d660d4b1b4ecb341fe7d9966e5e593ae11396e2d#diff-
> 96dee32f4422103869e93f987cc6269c , so it is present in hunspell 1.3.2 but
> should be fixed in hunspell 1.3.3 if it's the same problem.

Ah, thanks looking at the system version of Ubuntu 14.04 it uses hunspell 1.3.2 so most likely that is the problem. And when I build I use the version that is supplied by TDF. 

And it seems it was updated a little more than a year ago with the following commit.
http://cgit.freedesktop.org/libreoffice/core/commit/?id=5955a98b2aff796a0c7311f6f61a13eac8754ce7

I had to make a clean build so I won't have anything to test until tomorrow. But if the issue indeed is with Hunspell 1.3.2 then the build should work.
Comment 41 Niklas Johansson 2015-09-08 19:47:58 UTC
(In reply to Gunnar Hjalmarsson from comment #39)
> @Niklas: Can it possibly be that the spellchecker dictionary needs to be
> updated in the Ubuntu repository? As I mentioned, it's currently 2.22, while
> the latest version is 2.37.
> 

Göran holds really high quality on his releases so I wouldn't mind seeing it updated. However it will not fix the problem were seeing here (I did it manually while testing earlier). Only an update of the hunspell package would fix that, given that it actually is the problem.
Comment 42 Gunnar Hjalmarsson 2015-09-08 20:39:45 UTC
Ok, thanks.

I checked an Ubuntu 14.04 installation, and found that the hunspell program wasn't even installed. (It's only suggested in the hunspell-sv-se package.)

Anyway, I successfully installed and run version 1.3.3-3 (from the Ubuntu 15.04 archive) of the hunspell and libhunspell-1.3-0 packages - no dependency complaints. So it shouldn't be very difficult to find out if installing/upgrading those packages (on a 14.04 machine with the problem) fixes it.
Comment 43 Gunnar Hjalmarsson 2015-09-12 19:24:12 UTC
I used the commit, which Anders pointed at in comment #38, in a patch:

https://launchpad.net/~gunnarhj/+archive/ubuntu/hunspell-thesaurus

If it can be confirmed that the PPA version is sufficient to fix the issue, I'll propose it for inclusion in the Ubuntu 14.04 repository.
Comment 44 Anders Jonsson 2015-09-14 15:38:45 UTC
(In reply to Gunnar Hjalmarsson from comment #43)
> I used the commit, which Anders pointed at in comment #38, in a patch:
> 
> https://launchpad.net/~gunnarhj/+archive/ubuntu/hunspell-thesaurus
> 
> If it can be confirmed that the PPA version is sufficient to fix the issue,
> I'll propose it for inclusion in the Ubuntu 14.04 repository.

I have been able to reproduce the original crash problem in a VM. It is present in hunspell 1.3.2-6ubuntu2 that is in 32-bit Xubuntu 14.04.

Your PPA version 1.3.2-6ubuntu2.1~ppa4 is sufficient to fix it. With that version applied the thesaurus works without crashes.
Comment 45 Niklas Johansson 2015-09-14 23:22:33 UTC
It does not seem to fix the issue for me, of course it's possible I did something wrong. But after adding the PPA, doing an update and installing 1.3.2-6ubuntu2.1~ppa4 I still get crashes on AffixMgr::suffix_check.
Note that the problem only arise when the word has a suffix. For example the Swedish word testar has the suffix -ar (test).

Anyway, I'm going to close this as not our bug since if you download and install a version from the www.libreoffice.org it will not contain this bug (just tried it with a paralell install of 5.0.1), and that version of LibreOffice is what this bugtracker is for.

However I'd be glad to assist you further in trying to find a fix for this that works. Probably better however to send a note directly to my mail, and we'll post a comment when there is a fix that is fully working.
Comment 46 Anders Jonsson 2015-09-15 10:00:16 UTC
(In reply to Niklas Johansson from comment #45)
> It does not seem to fix the issue for me, of course it's possible I did
> something wrong. But after adding the PPA, doing an update and installing
> 1.3.2-6ubuntu2.1~ppa4 I still get crashes on AffixMgr::suffix_check.
> Note that the problem only arise when the word has a suffix. For example the
> Swedish word testar has the suffix -ar (test).

You are right, more testing revealed crashes on for example numbers as 2015 or words with numbers mixed in crashed for that PPA version.

> Anyway, I'm going to close this as not our bug since if you download and
> install a version from the www.libreoffice.org it will not contain this bug
> (just tried it with a paralell install of 5.0.1), and that version of
> LibreOffice is what this bugtracker is for.

I agree, more of an issue for Ubuntu 14.04 and derivatives, for which the bug https://bugs.launchpad.net/ubuntu/+source/hunspell/+bug/1495097 exists.