关于wpf 的richtextbox 在修改文本时出现System.Environment.FailFast(string message)导致崩溃

丶 岳 0 信誉分
2024-07-16T08:04:15.6933333+00:00

wpf 的richtexbox 打包后在部分windows 10 电脑中运行, 全选richtextbox内容导致后,按下键盘某个键后直接崩溃。

Application: iTourTranslator.exe

CoreCLR Version: 6.0.2223.42425

.NET Version: 6.0.22

Description: The application requested process termination through System.Environment.FailFast(string message).

Message: Unrecoverable system error.

Stack:

at System.Environment.FailFast(System.String)

at System.Windows.Documents.TextStore.OnStartComposition(ITfCompositionView, Boolean ByRef)

at MS.Win32.UnsafeNativeMethods+ITextStoreACPSink.OnLockGranted(LockFlags)

at MS.Win32.UnsafeNativeMethods+ITextStoreACPSink.OnLockGranted(LockFlags)

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+ITfMessagePump.GetMessageW(System.Windows.Interop.MSG ByRef, IntPtr, Int32, Int32, Int32 ByRef)

at MS.Win32.UnsafeNativeMethods+ITfMessagePump.GetMessageW(System.Windows.Interop.MSG ByRef, IntPtr, Int32, Int32, Int32 ByRef)

at System.Windows.Threading.Dispatcher.GetMessage(System.Windows.Interop.MSG ByRef, IntPtr, Int32, Int32)

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 iTour.App.Main()

开发人员技术 Windows Presentation Foundation
开发人员技术 .NET 其他
开发人员技术 C#
{count} 票

你的答案

问题作者可以将答案标记为“接受的答案”,这有助于用户了解已解决作者问题的答案。