平板电脑输入服务在运行时,wpf应用程序在平板电脑上崩溃.当我们停止平板电脑输入服务时,它的工作正常

问题描述:

I have create wpf application on .net framework 4.0 which is crashing on tablet pc. This application working fine on all operating system and pc's except tablet pc. When i stop the tablet pc input services then application working fine but after start tablet pc input services application is crashing. It gives the following error.
Error : Value cannot be null.Parameter name: element

. Automation.Peers.ListViewAutomationPeer.GetChildrenCore() 在System.Windows.Automation.Peers.ItemsControlAutomationPeer.UpdateChildren()在System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)在System.Windows.Automation.Peers.ItemsControlAutomationPeer.UpdateChildren()在System.Windows.Automation.Peers.AutomationPeer.EnsureChildren() .Peers.AutomationPeer.UpdateSubtree() 在System.Windows.ContextLayoutManager.fireAutomationEvents()在System.Windows.ContextLayoutManager.fireAutomationEvents()在System.Windows.Context.Manager中的System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()在System.Windows.ContextLayoutManager.fireAutomationEvents() .Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)在System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)在System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()在System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)在System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()在System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) .RenderMessageHandler(Object (System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate回调,Object args,Int32 numArgs)处的resizeCompositionTarget)(MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source,Delegate method,Object args,Int32 numArgs,Delegate) System.Windows.Threading.DispatcherOperation.InvokeImpl()的System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)的System.Windows.Threading.ExecutionContext.runTryCode(Object userData)的System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCup (TryCode System.Threading.ExecutionContext.RunInternal(ExecutionContext executeContext,ContextCallback回调,对象状态)处的代码,CleanupCode backoutCode,对象userData)在System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,ContextCallback)处的代码 System.Windows.Threading.DispatcherOperation.Invoke()处System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,ContextCallback回调,对象状态)处的回调,对象状态,布尔ignoreSyncCtx) MS.Win32.HwndWrapper.WndProc(IntPtr hwnd,Int32 msg,IntPtr LParam,在MS.Win32.HwndSubclass.DispatcherCallbackOperation(处理) o)在System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate回调,Object args,Int32 numArgs)在MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source,Delegate method,Object args,Int32 numArgs,Delegate catchHandler)在 System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority优先级,TimeSpan超时,委托方法,对象args,Int32 numArgs)位于MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam) .UnsafeNativeMethods.MessageBox(HandleRef hWnd,System.Windows.MessageBox.ShowCore(IntPtr所有者,String messageBoxText,String标题,MessageBoxButton按钮,MessageBoxImage图标,MessageBoxResult defaultResult,MessageBoxOptions选项)在System.Windows.MessageBox.Show(细绳 messageBoxText),位于StartWPF.NewHome.FulltxtSearchResults()

at System.Windows.Automation.Peers.UIElementAutomationPeer.CreatePeerForElement(UIElement element) at StartWPF.OneButtonHeaderViewAutomationPeer.System.Windows.Automation.Peers.IViewAutomationPeer.GetChildren(List`1 children) at System.Windows.Automation.Peers.ListViewAutomationPeer.GetChildrenCore() at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren() at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit) at System.Windows.Automation.Peers.ItemsControlAutomationPeer.UpdateChildren() at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree() at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree() at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree() at System.Windows.ContextLayoutManager.fireAutomationEvents() at System.Windows.ContextLayoutManager.UpdateLayout() at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.MessageBox(HandleRef hWnd, String text, String caption, Int32 type) at System.Windows.MessageBox.ShowCore(IntPtr owner, String messageBoxText, String caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, MessageBoxOptions options) at System.Windows.MessageBox.Show(String messageBoxText) at StartWPF.NewHome.FulltxtSearchResults()

PresentationCore

PresentationCore

如果我没记错的话,如果您的控件没有响应,通常会发生此崩溃正确到WM_OBJECT.它可以是自定义控件或第三方控件.

If I recall correctly this crash usually occurs if you have a control which doesn't respond correctly to WM_OBJECT. It may be a custom control or a 3rd party control.

它不是特定于Tablet PC的,但可能会在运行任何可访问性应用程序时发生.TabletPC上的"Tablet输入面板"使用可访问性来检测何时编辑字段具有焦点.

It isn't specific to Tablet PC, but could happen with any accessibility application running. The Tablet Input Panel on Tablet PCs uses accessibility to detect when an edit field has the focus.

在WPF论坛中有多个主题对此进行讨论.

There are several threads discussing this in the WPF forum.

-Rob