Completed
Last Updated: 11 Mar 2024 07:36 by ADMIN
Release 2024.1.312
Caesar
Created on: 22 Feb 2024 06:41
Category: RichTextBox
Type: Bug Report
0
exception thrown while typing with IME inside a checkbox content control

As shown in the attached video.

Btw, I was using the MS Pinyin IME.

5 comments
ADMIN
Dimitar
Posted on: 27 Feb 2024 11:05

Hello Li,

Ok thanks for the additional info, I was able to reproduce this by changing some of the IME settings on my side. I have made this request public and updated your points. 

Let me know if I can be of further assistance.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Caesar
Posted on: 27 Feb 2024 03:16

The value of insertIMETextCommandContext.IMEStartPosition is null in the methord  Telerik.Windows.Documents.UI.CaretTextInputHandler.HandleTextInsertedWithIme.

This happens when typing with IME in a position without editing permissions, such as a protected document or a content locked ContentControl.

I tried turning on Use previous version of Microsoft IME, the result was the same.

I've also tested this on my other 2 machines with Windows 7 and Windows 10 installed,  and the results were the same.

My current workaround is to modify the code of the method Telerik.Windows.Documents.UI.CaretTextInputHandler.HandleTextInsertedWithIme,add some null value checks.

 

System.NullReferenceException
  HResult=0x80004003
  Message=未将对象引用设置到对象的实例。
  Source=Telerik.Windows.Documents
  StackTrace:
   在 Telerik.Windows.Documents.DocumentPosition..ctor(DocumentPosition documentPosition, Boolean trackDocumentChangeEvents) 在 Telerik.Windows.Documents\DocumentPosition.cs 中: 第 740 行
   在 Telerik.Windows.Documents.UI.CaretTextInputHandler.HandleTextInsertedWithIme(RadDocument document, String text, TextInsertedEventArgs e) 在 Telerik.Windows.Documents.UI\CaretTextInputHandler.cs 中: 第 193 行
   在 Telerik.Windows.Documents.UI.Caret.<>c__DisplayClass80_0.<OnTextInserted>b__0() 在 Telerik.Windows.Documents.UI\Caret.cs 中: 第 482 行
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   在 System.Windows.Threading.DispatcherOperation.InvokeImpl()
   在 MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   在 MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   在 System.Windows.Threading.DispatcherOperation.Invoke()
   在 System.Windows.Threading.Dispatcher.ProcessQueue()
   在 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   在 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   在 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   在 System.Windows.Application.RunDispatcher(Object ignore)
   在 System.Windows.Application.RunInternal(Window window)
   在 TelerikEditorDemo.App.Main()

ADMIN
Dimitar
Posted on: 23 Feb 2024 11:46

Hello Li,

I have tested again but I still cannot reproduce this (see attached). Can you send me the stack trace as well? Perhaps if you can specify the exact steps you are using in this case.

I am looking forward to your reply.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Attached Files:
Caesar
Posted on: 23 Feb 2024 02:10
I think it is because your caret is not inside the content control. Use the arrow keys to move the caret inside the ContentControl and try again.
ADMIN
Dimitar
Posted on: 22 Feb 2024 14:08

Hi Li,

I was not able to reproduce this. I have recorded a small video of what I am doing on my side. Can you please check it and let me know what I am missing? 

I am looking forward to your reply.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Attached Files: