WPF崩溃由Environment.FailFast [英] WPF crashing by Environment.FailFast

查看:2210
本文介绍了WPF崩溃由Environment.FailFast的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作对亭(触摸屏),内置WPF应用程序。我们建立我们自己的虚拟键盘。



有一个屏幕,我们列出使用具有一个TextBox DataGrid控件的一些资料(4项最大值)。虚拟键盘显示焦点(这就是它是如何构建的)。



当我们做随机选择不同的项目,应用程序崩溃没有达到一般的异常处理程序。这个问题是可重复的触摸屏上,而不是在常规的屏幕。事件日志显示以下,

 应用:CashNGo.WPF.exe 
Framework版本:v4.0.30319
说明:通过System.Environment.FailFast应用程序请求进程终止(字符串
消息)。
消息:不可恢复的系统错误。
堆栈:在System.Environment.FailFast
(System.String)
在MS.Internal.Invariant.FailFast(System.String,System.String)
在MS.Internal在System.Windows.Documents.TextStore.GrantLock在System.Windows.Documents.TextStore.VerifyTextStoreConsistency .Invariant.Assert(布尔,System.String)
()
()
的系统。 Windows.Documents.TextStore.GrantLockWorker(LockFlags)
在System.Windows.Documents.TextStore.RequestLock(LockFlags,的Int32为ByRef)
在MS.Win32.UnsafeNativeMethods + ITextStoreACPSink.OnSelectionChange()
在System.Windows.Documents.TextStore.OnSelectionChanged()
在System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.NotifyChanged(布尔,
布尔)
的系统。 Windows.Documents.TextRangeBase.EndChange(System.Windows.Documents.ITextRange,
布尔,布尔)
在System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.Select(System.Windows .Documents.ITextPointer,
System.Windows.Documents.ITextPointer)
在System.Windows.Controls.TextBox.Select(的Int32,Int32)将
在System.Windows.Controls.TextBox.set_CaretIndex (Int32)已
在Common.Controls.SoftKeyboard< .cctor> b__1c(System.Windows.Controls.TextBox)
在System.Windows.Input.DelegateCommand`1 [系统.__佳能,mscorlib中,版本= 4.0.0.0,文化=中立,
公钥= b77a5c561934e089]]执行(系统.__佳能)
在Common.Controls.SoftKeyboard + LT;方式>&c__DisplayClass5 LT; SoftKeyboardFocus_Changed> b__0( )
在System.Windows.Threading.Dispatcher.Invoke(System.Action,System.Windows.Threading.DispatcherPriority,
System.Threading.CancellationToken,System.TimeSpan)在System.Windows
.Threading.Dispatcher.Invoke(System.Action,System.Windows.Threading.DispatcherPriority)在Common.Extensions
+ LT;> c__DisplayClass1< DelayedInvoke> b__0(System.Object的,System.EventArgs)$ b在System.Windows.Threading.DispatcherTimer.FireTick(System.Object的)
$ b在System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate,System.Object的,
的Int32)
在MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object的,System.Delegate,
System.Object的,的Int32,System.Delegate)
在System.Windows.Threading.DispatcherOperation.InvokeImpl()$在System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object的)b
$ b。在System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,System.Threading.ContextCallback,
System.Object的布尔)
在System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback,
System.Object的,布尔)
在System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,
System.Object的)在System.Windows.Threading.DispatcherOperation.Invoke
()
在System.Windows.Threading.Dispatcher。 ProcessQueue()在System.Windows.Threading.Dispatcher.WndProcHook(IntPtr的,的Int32,IntPtr的,IntPtr的,布尔
为ByRef)
在MS.Win32.HwndWrapper.WndProc(IntPtr的,的Int32
, IntPtr的,IntPtr的,布尔的ByRef)
在MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object的)
在System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate,System.Object的,
的Int32)
在MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object的,System.Delegate,
System.Object的,的Int32,System.Delegate)
在System.Windows.Threading程序.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority,
System.TimeSpan,System.Delegate,System.Object的,Int32)将
在MS.Win32.HwndSubclass.SubclassWndProc(IntPtr的,的Int32,IntPtr的, IntPtr的)
在MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG为ByRef)
在System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
。在System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)在System.Windows.Threading.Dispatcher.Run
()在System.Windows.Application.RunDispatcher
(系统.Object)
在System.Windows.Application.RunInternal(System.Windows.Window)
在在System.Windows System.Windows.Application.Run(System.Windows.Window)
。 Application.Run()
在CashNGo.WPF.App.Main()

我做某些搜索,发现的 http://social.msdn.microsoft.com/Forums/vstudio/en-US/dfbd2526-8953-4ce8-97c2-43246fd251c0/wpf-framework-crashing-on-setting- foxus,在文本框?论坛= WPF 这是完全一样的除外。



任何建议将是有益的。


< DIV CLASS =h2_lin>解决方案

关闭名为Windows服务。

  Tablet PC输入服务


I am working on WPF application built for Kiosk (Touch Screen). We build Virtual Keyboard for ourselves.

There is one screen we list some items (max of 4 items) using DataGrid control which has a TextBox. The virtual keyboard shows on focus (thats how it built).

When we make selecting different items randomly, the application crashes without reaching the generic exception handler. This issue is repeatable on Touch screen, but not in regular screens. The event log shows the below,

Application: CashNGo.WPF.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string
message).
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,
System.Object, 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,
System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback,
System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, 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 MS.Internal.Threading.ExceptionFilterHelper.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 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()

I did some search and found http://social.msdn.microsoft.com/Forums/vstudio/en-US/dfbd2526-8953-4ce8-97c2-43246fd251c0/wpf-framework-crashing-on-setting-foxus-in-textbox?forum=wpf which is exactly the same exception.

Any suggestion would be helpful.

解决方案

Turn off a windows service called.

Tablet PC Input Service

这篇关于WPF崩溃由Environment.FailFast的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆