Bug 72470 - EDITING: Calc freezes when typing Chinese characters following non-Chinese strings
Summary: EDITING: Calc freezes when typing Chinese characters following non-Chinese st...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.beta2
Hardware: Other Linux (All)
: highest blocker
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:4.3.0 target:4.2.1
Keywords: regression
: 72151 72702 74037 74044 74388 74482 74483 74614 74715 74757 74785 74810 74821 74827 74897 75069 (view as bug list)
Depends on:
Blocks: mab4.2 72151 74044 74209 74388 74483 74614
  Show dependency treegraph
 
Reported: 2013-12-08 11:07 UTC by Kevin Suo
Modified: 2014-03-22 01:05 UTC (History)
21 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 Kevin Suo 2013-12-08 11:07:21 UTC
Problem description: 
When typing into a cell Chinese chars following non-Chinese strings, calc freezes immediately.

Steps to reproduce:
1. Start calc;
2. Type "abc" in A1, hit ENTER;
3. Type "中国" (which means "China" in Chinese) in A2, hit ENTER;
4. Type "abc中国" in A3, hit ENTER.

Current behavior:
Calc freezes immediately in step 4. 
Same issue when disable spell check.
Same issue when change UI language.

Expected behavior:
Calc should not freeze.

Ubuntu 13.10 x86, LibrOffice 4.2.0.0 beta 2, system locale: en_US.
No such behavior in 4.1.3.2 release, so may be a regression.
              
Operating System: Ubuntu
Version: 4.2.0.0.beta2
Last worked in: 4.1.3.2 release
Comment 1 Kevin Suo 2013-12-08 11:09:50 UTC
Changing status to high critical, as it I have to "force quite" the window thus it causes data loss.
Comment 2 Akira Matsumiya 2013-12-08 12:37:43 UTC
Hi,suokunlong.

I'm Japanese. I can input Chinese chars.

I did not reproduce.

"abc中国" in A3, hit Enter -> No problem

Ubuntu 12.04 LibreOffice 4.2.0.0 beta2 systemlocale:Ja

Best regards
Comment 3 Kevin Suo 2013-12-09 01:47:50 UTC
(In reply to comment #2)
> Hi,suokunlong.
> 
> I'm Japanese. I can input Chinese chars.
> 
> I did not reproduce.
> 
> "abc中国" in A3, hit Enter -> No problem
> 
> Ubuntu 12.04 LibreOffice 4.2.0.0 beta2 systemlocale:Ja
> 
> Best regards

Thanks for testing, I further tested in another pc and confirm that this is not a bug, maybe just because of the OS in my home pc.

Marking as WORKSFORME.
Comment 4 jmxhyz 2013-12-14 10:54:45 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Hi,suokunlong.
> > 
> > I'm Japanese. I can input Chinese chars.
> > 
> > I did not reproduce.
> > 
> > "abc中国" in A3, hit Enter -> No problem
> > 
> > Ubuntu 12.04 LibreOffice 4.2.0.0 beta2 systemlocale:Ja
> > 
> > Best regards
> 
> Thanks for testing, I further tested in another pc and confirm that this is
> not a bug, maybe just because of the OS in my home pc.
> 
> Marking as WORKSFORME.

Reproduce at Ubuntu 13.10, LibreOffice 4.2.0.0 beta2.

You should not copy the "abc中国" into A3,
Instead, use the input framework (eg ibus), after input "abc中国" in A3, hit ENTER, then freezes immediately.
Comment 5 jmxhyz 2014-01-17 13:42:32 UTC
Still freezing in linux. But work ok in windows XP.

Steps to reproduce:
1. Start calc;
2. Copy "abc" and paste into A1;
3. Copy "abc中国" and paste into A2, then frozen.

libreoffice Version: 4.2.0.2
Build ID: 601a398b803303d1a40a3299729531824fe0db56

Linux 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Description: Ubuntu 13.10
locale LANG=zh_CN.UTF-8
locale LANGUAGE=zh_CN:zh
Comment 6 Kevin Suo 2014-01-24 07:04:00 UTC
Adding keyword "regression". Still reproducible in 4.2.0.3.
Comment 7 Kohei Yoshida 2014-02-03 17:58:11 UTC
I think I know what's going on here...
Comment 8 Kohei Yoshida 2014-02-03 18:49:32 UTC
I'm looking into this right now.
Comment 9 Commit Notification 2014-02-03 19:41:11 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3e2ffb053f9749c6f6990c5ce8f47dc63ea7c148

fdo#72470: Correctly calculate the first edit cell row position.



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-03 19:42:30 UTC
4.2 backport request: https://gerrit.libreoffice.org/7831
Comment 11 Kohei Yoshida 2014-02-05 13:43:50 UTC
Upping the severity. Without this, Calc is useless in CJK locales.
Comment 12 Kohei Yoshida 2014-02-05 13:45:47 UTC
Also, for the freeze to occur, on Linux the LANG must be set to either one of CJK. For me, setting LANG=ja_JP.utf8 was necessary to trigger the freeze.
Comment 13 Kevin Suo 2014-02-05 15:10:34 UTC
(In reply to comment #12)
> Also, for the freeze to occur, on Linux the LANG must be set to either one
> of CJK. For me, setting LANG=ja_JP.utf8 was necessary to trigger the freeze.

Thanks and really happy to see this bug to be fixed.
Bug 70857 is another freeze which is related to LANG, dont know if they are related. Hope that bug to be fixed soon.
Comment 14 Kohei Yoshida 2014-02-05 15:57:17 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > Also, for the freeze to occur, on Linux the LANG must be set to either one
> > of CJK. For me, setting LANG=ja_JP.utf8 was necessary to trigger the freeze.
> 
> Thanks and really happy to see this bug to be fixed.
> Bug 70857 is another freeze which is related to LANG, dont know if they are
> related. Hope that bug to be fixed soon.

Likely unrelated, since this bug causes an infinite loop (i.e. freeze), not a long delay.
Comment 15 Kohei Yoshida 2014-02-05 15:58:22 UTC
And the fact that Bug 70857 happens in Writer suggests that it's a different problem.  This bug here is strictly Calc only.
Comment 16 Kevin Suo 2014-02-06 09:55:56 UTC
*** Bug 72702 has been marked as a duplicate of this bug. ***
Comment 17 Kevin Suo 2014-02-06 10:13:14 UTC
(In reply to comment #12)
> Also, for the freeze to occur, on Linux the LANG must be set to either one
> of CJK. For me, setting LANG=ja_JP.utf8 was necessary to trigger the freeze.

No, I don't think so.

Today with 4.2.0.4 I can no longer reproduce "my steps" as in Comment 1 (type in the chars), but I can 100% repro jmxhyz's steps as in Comment 5 (copy the mixed chars),

and freeze also happen with the attached file in Bug 74037, see my comment there at #4.

All the above freezes happen no matter which UI LANG is in use (I tested English US and Simplified Chinese.)
Comment 18 Maxim Monastirsky 2014-02-06 10:25:13 UTC
@Kohei: Is Bug 74372 related to this?
Comment 19 Kohei Yoshida 2014-02-06 13:02:11 UTC
(In reply to comment #18)
> @Kohei: Is Bug 74372 related to this?

Not clear yet. Let's leave that one as a separate bug for now.
Comment 20 Commit Notification 2014-02-06 14:38:55 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=25cb5355ce259c29d481eb9c76a4fab53d03e4cb&h=libreoffice-4-2

fdo#72470: Correctly calculate the first edit cell row position.


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 21 Commit Notification 2014-02-06 14:39:47 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=25cb5355ce259c29d481eb9c76a4fab53d03e4cb&h=libreoffice-4-2

fdo#72470: Correctly calculate the first edit cell row position.


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 22 Kohei Yoshida 2014-02-06 14:45:41 UTC
Ok. This is now backported.  I'll call it fixed.
Comment 23 m.a.riosv 2014-02-07 21:36:02 UTC
*** Bug 72151 has been marked as a duplicate of this bug. ***
Comment 24 m.a.riosv 2014-02-07 21:50:20 UTC
*** Bug 74482 has been marked as a duplicate of this bug. ***
Comment 25 m.a.riosv 2014-02-07 21:59:21 UTC
*** Bug 74037 has been marked as a duplicate of this bug. ***
Comment 26 m.a.riosv 2014-02-07 22:32:43 UTC
*** Bug 74388 has been marked as a duplicate of this bug. ***
Comment 27 m.a.riosv 2014-02-07 22:42:35 UTC
*** Bug 74044 has been marked as a duplicate of this bug. ***
Comment 28 m.a.riosv 2014-02-07 23:17:42 UTC
*** Bug 74483 has been marked as a duplicate of this bug. ***
Comment 29 m.a.riosv 2014-02-08 16:45:37 UTC
*** Bug 74614 has been marked as a duplicate of this bug. ***
Comment 30 Jorendc 2014-02-08 20:02:52 UTC
*** Bug 74715 has been marked as a duplicate of this bug. ***
Comment 31 Massimo 2014-02-09 10:16:46 UTC
Sorry if I sound dumb, but how do I install the patch? I am running Windows 7 (both 32 and 64 bit, on different PCs).
Comment 32 Kohei Yoshida 2014-02-09 15:26:06 UTC
(In reply to comment #31)
> Sorry if I sound dumb, but how do I install the patch? I am running Windows
> 7 (both 32 and 64 bit, on different PCs).

Try the most recent daily 4.2 builds from here.

http://dev-builds.libreoffice.org/daily/

But note that it sometimes takes a few days before the fix makes it into a daily build.  The fix for this bug is definitely in for sure, but you need to keep it in mind for future references for other bugs.
Comment 33 Jorendc 2014-02-09 20:02:39 UTC
Not sure about bug 74757. Looks quite related behavior, but as far bug reporter mentions: only 1 script type. Therefore I'm putting this bug in 'see also'. Can anyone else please have a look and mark it correctly (either marking as duplicate or removing it from the 'see also' field).

Thanks in advance,
Joren
Comment 34 Kohei Yoshida 2014-02-09 20:21:51 UTC
(In reply to comment #33)
> Not sure about bug 74757. Looks quite related behavior, but as far bug
> reporter mentions: only 1 script type.

The input 2012年4月 consists of 2 script types: asian and latin.  You need to disect the input character by character.

So, that bug is likely a duplicate, but please verify by re-checking.
Comment 35 Jorendc 2014-02-09 20:54:49 UTC
*** Bug 74757 has been marked as a duplicate of this bug. ***
Comment 36 m.a.riosv 2014-02-10 15:22:42 UTC
*** Bug 74785 has been marked as a duplicate of this bug. ***
Comment 37 m.a.riosv 2014-02-10 21:29:06 UTC
*** Bug 74810 has been marked as a duplicate of this bug. ***
Comment 38 m.a.riosv 2014-02-11 02:57:31 UTC
*** Bug 74810 has been marked as a duplicate of this bug. ***
Comment 39 sophie 2014-02-11 08:29:56 UTC
*** Bug 74827 has been marked as a duplicate of this bug. ***
Comment 40 Jorendc 2014-02-11 18:21:50 UTC
*** Bug 74821 has been marked as a duplicate of this bug. ***
Comment 41 m.a.riosv 2014-02-13 00:46:08 UTC
*** Bug 74897 has been marked as a duplicate of this bug. ***
Comment 42 M Henri Day 2014-02-13 10:29:39 UTC
Kohei, checking the link you provided to the daily builds four days ago, I note that while there do exist sub-directories for Mac and Windows builds, nothing is provided for us Linux users. Any chance of patches being posted for Linux - in my case, deb - builds in the near future ?...

Henri
Comment 43 m.a.riosv 2014-02-18 01:18:20 UTC
*** Bug 75069 has been marked as a duplicate of this bug. ***
Comment 44 Kevin Suo 2014-03-22 01:05:31 UTC
*** Bug 75183 has been marked as a duplicate of this bug. ***