Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357957 - StyledText crashes on a 3rd party Chinese IME
Summary: StyledText crashes on a 3rd party Chinese IME
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-16 12:03 EDT by khkong CLA
Modified: 2019-11-14 03:45 EST (History)
4 users (show)

See Also:


Attachments
Reproduce steps for IME crash issue on StyledText (1.24 MB, application/msword)
2011-09-16 12:25 EDT, khkong CLA
no flags Details
3rd party IME Install steps (257.84 KB, application/octet-stream)
2011-09-16 12:29 EDT, khkong CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description khkong CLA 2011-09-16 12:03:02 EDT
Build Identifier: org.eclipse.swt.win32.win32.x86_3.6.2.v3659c-RCP20110402-1912.jar

I was told that http://www.unispim.com/ is a popular IME in China.  However, it crashes the StyledText widget when used in a certain way.  Details on how to install and use the IME is provided in the attached files.

I notice that in Notepad or other editor, characters typed onto the IME editor does not get entered, but it's different for StyledText.

Reproducible: Always

Steps to Reproduce:
1. Press Ctrl+Space to turn on Chinese input 
2. Input "we" and then press Ctrl+Space to switch back in English input. "w'e" got entered into the editor.
3. Press backspace to delete "e", then press Backspace again
4. Application error occurred with the following stack trace:
CLPDN0031E: Event loop exception
java.lang.StringIndexOutOfBoundsException
		 at java.lang.StringBuffer.append(Unknown Source)
		 at org.eclipse.swt.custom.DefaultContent.getTextRange(Unknown Source)
		 at org.eclipse.swt.custom.DefaultContent.isValidReplace(Unknown Source)
		 at org.eclipse.swt.custom.DefaultContent.replaceTextRange(Unknown Source)
		 at org.eclipse.swt.custom.StyledText.modifyContent(Unknown Source)
		 at org.eclipse.swt.custom.StyledText.sendKeyEvent(Unknown Source)
		 at org.eclipse.swt.custom.StyledText.doContent(Unknown Source)
		 at org.eclipse.swt.custom.StyledText.handleKey(Unknown Source)
		 at org.eclipse.swt.custom.StyledText.handleKeyDown(Unknown Source)
		 at org.eclipse.swt.custom.StyledText$7.handleEvent(Unknown Source)
		 at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
		 at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
		 at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
		 at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
		 at org.eclipse.swt.widgets.Widget.sendKeyEvent(Unknown Source)
		 at org.eclipse.swt.widgets.Widget.sendKeyEvent(Unknown Source)
		 at org.eclipse.swt.widgets.Widget.wmChar(Unknown Source)
		 at org.eclipse.swt.widgets.Control.WM_CHAR(Unknown Source)
		 at org.eclipse.swt.widgets.Canvas.WM_CHAR(Unknown Source)
		 at org.eclipse.swt.widgets.Control.windowProc(Unknown Source)
		 at org.eclipse.swt.widgets.Canvas.windowProc(Unknown Source)
		 at org.eclipse.swt.widgets.Display.windowProc(Unknown Source)
		 at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
Comment 1 Curtis Windatt CLA 2011-09-16 12:06:02 EDT
Moving to SWT
Comment 2 khkong CLA 2011-09-16 12:25:42 EDT
Created attachment 203495 [details]
Reproduce steps for IME crash issue on StyledText
Comment 3 khkong CLA 2011-09-16 12:29:58 EDT
Created attachment 203496 [details]
3rd party IME Install steps
Comment 4 khkong CLA 2011-10-19 09:18:52 EDT
Just a quick follow up to see if any progress on this issue.  Thanks.
Comment 5 Felipe Heidrich CLA 2011-10-19 16:00:19 EDT
Okay, I just tried the case

For me the "we" is visible in StyledText during the composition (the same does not happen on notepad), but the second I press ctrl key the composition is committed to StyledText and the correct Chinese characters are inserted.
Delete them using backspace works fine.

Notepad also commits the composition when the ctrk key is pressed.

The only difference I see is that during the pre-edit phase StyledText shows the composition in the widget.
I was not able to reproduce the exception.

Please try again using a new version of SWT.
I'm testing with Eclipse 3.8M2
Comment 6 Lars Vogel CLA 2019-11-14 03:45:30 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.