Community
Participate
Working Groups
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)
Moving to SWT
Created attachment 203495 [details] Reproduce steps for IME crash issue on StyledText
Created attachment 203496 [details] 3rd party IME Install steps
Just a quick follow up to see if any progress on this issue. Thanks.
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
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.