Hello,
Typing characters with switching IME input mode will crash your RichTextBox sample application.
In 2017.2.614 the process is killed and in 2020.1.115 an exception is thrown.
Could you tell us a solution to this problem?
Also, do you plan to fix your components for this problem?
Reproduction steps:
1. Start editing rich text
2. Switch IME input mode to Hiragana
3. Switch IME input mode to AlphanumericHalfWidth
4. Enter "," (comma) by key operation
5. Switch IME input mode to Hiragana
6. Enter any characters by key operation
⇒ The application crashes
Exception information:
Value cannot be null.
Parameter name: insertIMETextCommandContext
Best regards,
7 Answers, 1 is accepted
Hi,
We have fixed a similar issue which was related to the asynchronous execution of the code. There are different concurring threads which try to execute their logic at the same time. However, according to our notion, this issue should be fixed in the latest version. I tested the text insertion by strictly following the provided steps but was unable to reproduce an issue. I am using Windows with version 1903 and .NET Framework 4.0. Can you please share the setup on your end? Also, are you able to reproduce the error in the official examples? Is it reproducible with any character pressed on the keyboard after the comma?
Regards,
Tanya
Progress Telerik
I am using Windows 10 with version 1709.
The problem can be reproduced with your official sample. (Attached the reproduction video)
After the comma, pressing any character on the keyboard without switching IME mode didn't reproduce the problem. After that, switching to IME mode and pressing any character on the keyboard didn't reproduce the problem.
Best regards,
Hi,
The behavior you are getting is indeed very strange and we are still unable to reproduce it. I searched through the internet and was able to find out that this specific version of Windows has some issues when it comes to IME support. Would it be possible for you to try another version of the OS and let me know how it works there?
Regards,
Tanya
Progress Telerik
Hi,
Unfortunately, The problem was reproduced in the 1903 version as well.
Is there any other information you need to reproduce this problem?
Best regards,
Hi,
The only thing we haven't verified is the platform version you are using. Since it seems like the other setup we are using is the same, would you please share the version of .NET Framework you have installed?
Regards,
Tanya
Progress Telerik
Hi,
The version of .NET Framework we have installed is 4.8.
We were able to avoid the problem by customizing Caret. (Attached the code)
Could you tell me if this change is OK?
---
public class CustomCaret : Caret
{
protected override void OnPreviewKeyDown(KeyEventArgs e)
{
base.OnPreviewKeyDown(e);
InputState = e.Key == Key.ImeProcessed ? InputStates.Ime : InputStates.Standard;
}
}
---
Best regards,
Hello,
Thank you for the feedback and for sharing the workaround you have found.
I couldn't think of an issue with this workaround, but since such an approach is not thoroughly tested by the team, my suggestion would be to perform some additional testing on it to ensure that everything will be working as expected for your scenario.
Regards,
Tanya
Progress Telerik