有一个屏幕我们使用带有TextBox的DataGrID控件列出一些项目(最多4个项目).虚拟键盘显示焦点(这就是它的构建方式).
当我们随机选择不同的项目时,应用程序崩溃而不会到达通用异常处理程序.此问题在触摸屏上可重复,但在常规屏幕中不可重复.事件日志显示如下,
Application: CashNGo.WPF.exeFramework Version: v4.0.30319Description: The application requested process termination through System.Environment.FailFast(stringmessage).Message: Unrecoverable system error.Stack: at System.Environment.FailFast(System.String) at MS.Internal.Invariant.FailFast(System.String,System.String) at MS.Internal.Invariant.Assert(Boolean,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 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.TextSelection.System.windows.documents.ITextRange.Select(System.windows.documents.ITextPointer,System.windows.documents.ITextPointer) at System.windows.Controls.TextBox.Select(Int32,Int32) at System.windows.Controls.TextBox.set_CaretIndex(Int32) at Common.Controls.softKeyboard.<.cctor>b__1c(System.windows.Controls.TextBox) at System.windows.input.DelegateCommand`1[[System.__Canon,mscorlib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089]].Execute(System.__Canon) at Common.Controls.softKeyboard+<>c__displayClass5.<SoftKeyboardFocus_Changed>b__0() 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 Common.Extensions+<>c__displayClass1.<DelayedInvoke>b__0(System.Object,System.EventArgs) at System.windows.Threading.dispatcherTimer.FireTick(System.Object) at System.windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate,System.Object,Int32) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object,System.Delegate,Int32,System.Delegate) at System.windows.Threading.dispatcherOperation.InvokeImpl() at System.windows.Threading.dispatcherOperation.InvokeInSecurityContext(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,System.Threading.ContextCallback,Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Object) at System.windows.Threading.dispatcherOperation.Invoke() at System.windows.Threading.dispatcher.ProcessQueue() at System.windows.Threading.dispatcher.WndProcHook(IntPtr,IntPtr,BooleanByRef) at MS.Win32.HwnDWrapper.WndProc(IntPtr,Boolean ByRef) at MS.Win32.HwndSubclass.dispatcherCallbackOperation(System.Object) at System.windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate,System.Delegate) at System.windows.Threading.dispatcher.LegacyInvokeImpl(System.windows.Threading.dispatcherPriority,System.TimeSpan,Int32) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr,IntPtr) 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.dispatcher.Run() at System.windows.Application.Rundispatcher(System.Object) at System.windows.Application.RunInternal(System.windows.Window) at System.windows.Application.Run(System.windows.Window) at System.windows.Application.Run() at CashNGo.WPF.App.Main()
我做了一些搜索,找到了http://social.msdn.microsoft.com/Forums/vstudio/en-US/dfbd2526-8953-4ce8-97c2-43246fd251c0/wpf-framework-crashing-on-setting-foxus-in-textbox?forum=wpf,这是完全相同的例外.
任何建议都会有所帮助.
解决方法 关闭一个名为的windows服务.tablet PC input Service总结
以上是内存溢出为你收集整理的c# – 由Environment.FailFast崩溃的WPF全部内容,希望文章能够帮你解决c# – 由Environment.FailFast崩溃的WPF所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)