Issue 107468

Summary: CJK Extension B Freezes Writer in Windows
Product: Writer Reporter: watashiwa <bhoang2>
Component: viewingAssignee: writerneedsconfirm <swneedsconfirm>
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P3 CC: eric.savary, hdu, issues
Version: OOo 3.1.1Keywords: needmoreinfo, oooqa
Target Milestone: ---   
Hardware: Other   
OS: Windows, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 102943    
Attachments:
Description Flags
Sample Chinese Sentence with CJK Extension B Character
none
ODT document with the suggested text none

Description watashiwa 2009-12-06 10:28:42 UTC
This problem is similar to Bug #371725, except Writer is on Windows 7. (From
experience, this also happened on Windows Vista.) After typing (and even merely
pasting) a CJK Extension B character into a document with traditional Chinese
characters, Writer would be "not responding", prompting an abrupt closure of the
program. A sample sentence would be, "這是一個ç¿ð¦“…。" Except here on this bug
report, I was able to successfully type the word "𦓅", as opposed to the
situation in Writer. By the way, the platform is Toshiba.
Comment 1 watashiwa 2009-12-06 10:34:36 UTC
Created attachment 66509 [details]
Sample Chinese Sentence with CJK Extension B Character
Comment 2 watashiwa 2009-12-06 10:49:08 UTC
Scratch out the "(and even merely pasting)" part of this bug report! I tested it
again and I just remembered that pasting a CJK Extension B character caused a
completely different problem for Writer. I'll be submitting another bug report
concerning this shortly.
Comment 3 maho.nakata 2009-12-09 11:58:32 UTC
hdu: if you have a time could you please have a look?
interesting issue.
Comment 4 hdu@apache.org 2009-12-09 12:52:54 UTC
This seems to be a problem with a surrogate pair. I have not been able to reproduce the hang yet and so 
the call chain is still unknown. I don't even have font in my collection that would support character 
U+264C5.

@watashiwa: you mentioned Bug #371725. Are you sure this is an OOo issueid?

@maho: can you reproduce the hang? If yes could you map the stack?
Comment 5 hdu@apache.org 2009-12-09 13:15:22 UTC
Created attachment 66568 [details]
ODT document with the suggested text
Comment 6 watashiwa 2009-12-09 21:22:50 UTC
This is my first time reporting an issue for OOo. I had found a problem similar
to this, which I erroneously referred to as "Bug #371725" earlier, when I used
Google. I didn't realize that it was a page for Ubuntu, rather than for OOo. It
is relevant to OOo though. Here's the link:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/371725. Sorry
about that! I was trying to be as detailed as possible. :-)

By the way, I had tried both "English (United States)" and "Chinese
(Traditional, Taiwan)"  system locales before with no success in eliminating the
hang.
Comment 7 eric.savary 2009-12-09 21:34:20 UTC
@watashiwa: can you please try this in a current dev version (m66 or m7)?
http://download.openoffice.org/next/index.html

I had a freeze with HDU's document in 3.1.1.
- Windows Vista
- IME Chinese simplified
- I selected the blank before the dot and typed Space
-> freeze

But this is NOT reproducible in m61 or m2.

BTW: is that what you describe a possible duplicate of issue 102200 which I
couldn't reproduce until now?

BTW2: most of people here don't speak Chinese or further CJK languages. It would
really help when dealing with IME to have the *phonetic* correspondence of the
word you type. :)
Comment 8 hdu@apache.org 2009-12-10 10:29:26 UTC
The hang when pasting is indeed reproducible with OOo31x, the stacks suggest that it loops in 
SwTxtNode::CountWords(). I haven't seen that hang in OOo320-rc versions yet. Since the related code has 
seen some non-trivial action in the meantime this could explain it. Before investigating further on the 
code level we should be sure that it still happens:

> @watashiwa: can you please try this in a current dev version (m66 or m7)?
or with a pre-release of OOo 3.2 (e.g. OOO320_m7)
Comment 9 watashiwa 2009-12-11 01:53:14 UTC
For future reference, using the Windows Vista and Windows 7 Traditional Chinese
IME, with the keyboard set to Hanyu Pinyin instead of the default “Standardâ€,
the phonetic transcription is “zhe4 shi4 yi2 ge4 weng1†for “這是一個ç¿â€. As for
the last character, “𦓅â€, I had to type it in its Unicode's code point by typing
it as “`U264C5â€. (Note: One must enter the character “`†in order to enter the
mode for Unicode input.)

This is a probably a duplicate of Issue #102200, although the OS and the version
of OOo between the two issues are different. I do not know how much of a
difference that makes though, as I never had experience with programming.

As you two had suggested, I have downloaded both m66 and m7 and fiddled with
them a bit to see if the issue is still prevalent yesterday. So far, I cannot
replicate this specific issue in these versions. However, I am afraid that this
issue may return again like it did from the time between OOo v.310m11 in Issue
#102200 to OOo 3.1.1 in this issue. Again, I never had the experience of
programming. But, if it's not too much work, can you please look into the code
level for a resolution? Thanks! :-)
Comment 10 watashiwa 2009-12-13 04:18:50 UTC
I just removed the URL link as it is not directly related to the issue at hand. :-)
Comment 11 hdu@apache.org 2009-12-15 09:00:10 UTC
Since the issue is no longer easily reproducible on current builds the priority is not so urgent anymore
@es: if you happen to know who the code owner is for the WordCount feature feel free to reassign this 
issue to him to double check his handling of UTF-16 surrogate chars
Comment 12 eric.savary 2009-12-15 17:34:22 UTC
Cannot reproduce in current version -> fixed.
Comment 13 eric.savary 2009-12-15 17:35:00 UTC
Closed