我有一个WPF应用程序,其初始窗口在启动时显示为Splashscreen.在Startup期间有一个后台线程,我们可以通过单击splashscreen中的按钮取消该线程.使用鼠标并单击按钮取消时,一切正常.但是,如果我使用触摸屏点击此按钮,则偶尔应用程序崩溃,然后是堆栈跟踪.该应用程序是在Windows 7 64位上运行的64位目标.
Severity:
Fatal
Stack Trace:
Exception 0
Message: Object reference not set to an instance of an object.
StackTrace:
at MS.Internal.PointUtil.TryClientToRoot(Point point, PresentationSource presentationSource, Boolean throwOnError, Boolean& success)
at System.Windows.Input.StylusDevice.GetPosition(IInputElement relativeTo)
at System.Windows.Input.StylusDevice.ChangeStylusOver(IInputElement stylusOver)
at System.Windows.Input.StylusLogic.PreProcessInput(Object sender, PreProcessInputEventArgs e)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.PossiblyDeactivate(IntPtr hwndCapture, Boolean stillActiveIfOverSelf)
at System.Windows.Interop.HwndMouseInputProvider.Dispose()
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at …Run Code Online (Sandbox Code Playgroud)