Bug 46707 - Crashes when right clicked to call context menu while a mixture of alphabets and Japanese texts are selected
Summary: Crashes when right clicked to call context menu while a mixture of alphabets ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: All Windows (All)
: medium major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.1 target:4.1.6
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-27 23:41 UTC by AH
Modified: 2014-02-10 21:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Open the bugdoc and follow the steps. Calc crashes everytime (7.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-02-27 23:41 UTC, AH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AH 2012-02-27 23:41:14 UTC
Created attachment 57741 [details]
Open the bugdoc and follow the steps. Calc crashes everytime

LibreOffice crashes when right clicked to call context menu while a mixture of
alphabets and Japanese texts are selected.

I will attach a sample bugdoc created on LO 3.5.0

How to reproduce:
1:Open Bugdoc.ods
2:Select cell A1 and press F2 key to go into that cell
3:Press Ctrl+A to select all the text
4:Right click to call context menu
5:Calc Crashes

As far as I can tell, the alphabets must come at the beginning of the line.
And quite a number of Japanese text must also be selected at the same time.
But no complex formatting or functions are needed to reproduce as you can
see from the bugdoc.

Work aound:
* Do not select all of the texts... It seems that the number of texts being
  selected matters. Select one less letter at the end of the line in the 
  attached file then it works fine.
* Disable "Hunspell SpellChecker"
  To do this, go to Tools - Options - Language Settings - Writing Aids -
  Uncheck "Hunspell SpellChecker" - Press OK, and the problem seems to go away.

I have tested this on OO 3.2.1 with no problem, but was able to reproduce it on
OO 3.3.0 and LO 3.3.0 - LO 3.5.0, on Windows 7 and XP.

It also happens on Impress as well but not with Writer.
I suspect that there is a collision on "Hunspell Spellchecker" caused by a function Synomyms within context menu for Calc and Impress that was introduced in OO 3.3.0, where as there is no such a function in Writer.(or at least not within context menu)

Anyway, it is only an asumption after all. So, please correct me if I'm wrong.
And let me know if more infomations are needed. I will do my best to meet what is required.

Regards,
Comment 1 AH 2012-02-28 00:03:36 UTC
Just a quick note, as I was able to reproduce the same bug on Writer.

Copy the text from Bugdoc.ods and paste it into new writer.
Select all and right click on the alphabets, not on Japanese.
Comment 2 sasha.libreoffice 2012-05-24 05:08:50 UTC
Thanks for bugreport
reproduced in 3.4.2 and 3.5.2 on Windows XP and 7 32 bit
not reproduced in 3.5.3 on Alt6 64 bit, therefore Windows specific bug
Changing version to 3.4.2 as most early reproducible
Comment 3 sasha.libreoffice 2012-05-24 05:10:10 UTC
@ Tor
Greetings
What do You think about this bug?
Comment 4 HD 2012-07-13 00:52:57 UTC
Still reproducible with LO 3.5.5 release.

AOO 3.4.0 got rid of "Synonyms" from context menu and that seems to have
solved this problem.

I also noticed another change with AOO that is, go to Tools - Options -
Language Settings - Writing Aids, and the list of "Available language
modules" is empty. They probably removed the "Hunspell Spellchecker" for
some reason.(Hence the context menu w/o "Synonyms" and which resulted in
the crash to go away?)
Comment 5 HD 2012-07-13 02:55:59 UTC
AOO seems to have removed the whole "Available language modules" from
Japanese version. This would avoid the crash indeed, but now the spell
check does not work at all and this isn't really an option.

My suggestion is to keep the "Hunspell Spellchecker" but remove "Synonyms"
from the context menu for the time being until the root cause is solved.
(If the "Available language modules" isn't available, "Synonyms" doesn't
 work anyway.)
Comment 6 Julien Nabet 2013-07-22 08:28:59 UTC
On pc Debian testing x86-64 with LO 4.0.3, I don't reproduce this.

AH: would you have some time to give a try with a newer LO version? (last 4.0 version is 4.0.4)
Comment 7 sasha.libreoffice 2013-07-31 09:04:30 UTC
Still crashes in 4.0.4
Comment 8 Kohei Yoshida 2014-02-10 06:22:52 UTC
We can disable synonyms when selection contains multiple script types.  That should prevent the crash.
Comment 9 Commit Notification 2014-02-10 06:28:27 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=49341001e76389f11bf67d756f4742275bc9dcd9

fdo#46707: Don't bother with synonyms for text with mixed script types.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Kohei Yoshida 2014-02-10 06:28:59 UTC
4.2 backport request: https://gerrit.libreoffice.org/7962
Comment 11 Kohei Yoshida 2014-02-10 06:35:02 UTC
4.1 backport request: https://gerrit.libreoffice.org/7963
Comment 12 Commit Notification 2014-02-10 21:03:31 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=684a0308dcb847f816967202ba87f536b83dcb4e&h=libreoffice-4-2

fdo#46707: Don't bother with synonyms for text with mixed script types.


It will be available in LibreOffice 4.2.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2014-02-10 21:06:56 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9ad3a5f665f83ee4f635d37f1fc35b33661ea094&h=libreoffice-4-1

fdo#46707: Don't bother with synonyms for text with mixed script types.


It will be available in LibreOffice 4.1.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Kohei Yoshida 2014-02-10 21:10:05 UTC
Fixed for good.