WPF in .net core 6.0 or 8.0, process terminated error occured and exit program unexpectly when type korean(IME) character fast in DataGrid.
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/WPF-in-net-core-60-or-80-process-ter/10750211)._
---
[severity:I'm unable to use this version]
[WpfApp1.zip](https://aka.ms/dc/file?name=Bc1b609617e314e2595f62c543cb01215638624260989001388_WpfApp1.zip&tid=c1b609617e314e2595f62c543cb01215638624260989001388)
## instruction
there is very simple code, a sample of datagrid and databinding.
quickly enter Korean while switching cells in datagrid, a 'process terminated' error occurs.
I already post this issue in [microsoft learn](https://learn.microsoft.com/ko-kr/answers/questions/2073836/windows-11-pc-wpf-datagrid?page=1&orderby=Helpful&comment=answer-1833878#newest-answer-comment), but I think o this is lowlevel problem between WPF framework and IME.
Currently, datagrid must be used for development, and the program is easily terminated, which is a problem.
## how to reproduce
1. With the Korean IME running, enter any number of Korean characters (any character does not matter) into a cell of the datagrid.
2. Click another cell and enter Korean again.
3. If an error does not occur, repeat the above actions.
## environments
tested on 3 PC.
occured OS : window 11 home, professional
occured .net version : 6.0.16, 8.0
## error message
```
Application: WpfApp1.exe
CoreCLR Version: 6.0.1623.17311
.NET Version: 6.0.16
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: 복구할 수 없는 시스템 오류입니다.
Stack:
at System.Environment.FailFast(System.String)
at System.Windows.Documents.TextStore.VerifyTextStoreConsistency()
at System.Windows.Documents.TextStore.GrantLock()
at System.Windows.Documents.TextStore.GrantLockWorker(LockFlags)
at System.Windows.Documents.TextStore.RequestLock(LockFlags, Int32 ByRef)
at MS. Win32.UnsafeNativeMethods+ITextStoreACPSink.OnSelectionChange()
at MS. Win32.UnsafeNativeMethods+ITextStoreACPSink.OnSelectionChange()
at System.Windows.Documents.TextStore.OnSelectionChanged()
at System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.NotifyChanged(Boolean, Boolean)
at System.Windows.Documents.TextRangeBase.EndChange(System.Windows.Documents.ITextRange, Boolean, Boolean)
at System.Windows.Documents.TextRange.System.Windows.Documents.ITextRange.EndChange(Boolean, Boolean)
at System.Windows.Documents.TextRange+ChangeBlock.System.IDisposable.Dispose()
at System.Windows.Documents.TextEditorTyping.DoTextInput(System.Windows.Documents.TextEditor, System.String, Boolean, Boolean)
at System.Windows.Documents.TextEditorTyping+TextInputItem.Do()
at System.Windows.Documents.TextEditorTyping.ScheduleInput(System.Windows.Documents.TextEditor, InputItem)
at System.Windows.Documents.TextEditorTyping.OnTextInput(System.Object, System.Windows.Input.TextCompositionEventArgs)
at System.Windows.Controls.Primitives.TextBoxBase.OnTextInput(System.Windows.Input.TextCompositionEventArgs)
at System.Windows.UIElement.OnTextInputThunk(System.Object, System.Windows.Input.TextCompositionEventArgs)
at System.Windows.Input.TextCompositionEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.TextCompositionManager.UnsafeCompleteComposition(System.Windows.Input.TextComposition)
at System.Windows.Input.DefaultTextStore.OnTransitoryExtensionUpdated(ITfContext, Int32, ITfRange, ITfRange, Boolean ByRef)
at MS. Win32.UnsafeNativeMethods+ITfThreadMgr.SetFocus(ITfDocumentMgr)
at MS. Win32.UnsafeNativeMethods+ITfThreadMgr.SetFocus(ITfDocumentMgr)
at System.Windows.Documents.TextStore.OnGotFocus()
at System.Windows.Documents.TextServicesHost._RegisterTextStore(System.Windows.Documents.TextStore)
at System.Windows.Documents.TextStore.OnAttach()
at System.Windows.Documents.TextEditor.InitTextStore(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS. Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS. Internal.CulturePreservingExecutionContext.Run(MS. Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS. Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS. Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS. Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS. Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at MS. Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.DispatcherOperation.Wait(System.TimeSpan)
at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherOperation, System.Threading.CancellationToken, System.TimeSpan)
at System.Windows.Threading.Dispatcher.Invoke(System.Action, System.Windows.Threading.DispatcherPriority, System.Threading.CancellationToken, System.TimeSpan)
at System.Windows.Threading.Dispatcher.Invoke(System.Action, System.Windows.Threading.DispatcherPriority)
at System.Windows.Controls.DataGridTextColumn.OnInput(System.Windows.Input.InputEventArgs)
at System.Windows.Controls.DataGridCell.OnPreviewKeyDown(System.Windows.Input.KeyEventArgs)
at System.Windows.UIElement.OnPreviewKeyDownThunk(System.Object, System.Windows.Input.KeyEventArgs)
at System.Windows.Input.KeyEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawKeyboardActions, Int32, Boolean, Boolean, Int32)
at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(System.Windows.Interop.MSG ByRef, Boolean ByRef)
at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(System.Windows.Interop.MSG ByRef, System.Windows.Input.ModifierKeys)
at System.Windows.Interop.HwndSource.OnPreprocessMessage(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(System.Windows.Interop.MSG ByRef, Boolean ByRef)
at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run()
at WpfApp1.App.Main()
```
---
### Original Comments
#### Feedback Bot on 23/9/2024, 07:51 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Contributor guide
Assessment
This issue has not been assessed yet.