Hello,
We are developing an application with VS2010, C#, WPF and NET Framework 4.0.
The application is having random hang-ups after showing a dialog.
This problem only happens on Win8 and with a touchscreen. On WinXP or Win7 no problems.
Below the stack trace of the deadlock :
0:009> ~0s eax=00000001 ebx=00000001 ecx=00c450a0 edx=00c450a0 esi=00000002 edi=00000002 eip=77577174 esp=00b8baa8 ebp=00b8bc2c iopl=0 nv up ei pl zr na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 ntdll!KiFastSystemCallRet: 77577174 c3 ret 0:000> !clrstack OS Thread Id: 0x10e4 (0) Child SP IP Call Site 00b8bf38 77577174 [HelperMethodFrame_1OBJ: 00b8bf38] System.Threading.SynchronizationContext.WaitHelper(IntPtr[], Boolean, Int32) 00b8c1dc 669c5af2 System.Windows.Threading.DispatcherSynchronizationContext.Wait(IntPtr[], Boolean, Int32) 00b8c1f0 679113d6 System.Threading.SynchronizationContext.InvokeWaitMethodHelper(System.Threading.SynchronizationContext, IntPtr[], Boolean, Int32) 00b8c428 685f2652 [GCFrame: 00b8c428] 00b8c4f4 685f2652 [HelperMethodFrame_1OBJ: 00b8c4f4] System.Threading.WaitHandle.WaitOneNative(System.Runtime.InteropServices.SafeHandle, UInt32, Boolean, Boolean) 00b8c5c0 6799d2f2 System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle, Int64, Boolean, Boolean) 00b8c5dc 6799d2b8 System.Threading.WaitHandle.WaitOne(Int32, Boolean) 00b8c5f0 6799d328 System.Threading.WaitHandle.WaitOne() 00b8c5f8 665225e6 System.Windows.Input.PenThreadWorker.WorkerGetTabletsInfo() 00b8c62c 6653d833 System.Windows.Input.TabletDeviceCollection.UpdateTablets() 00b8c680 667373c3 System.Windows.Input.TabletDeviceCollection..ctor() 00b8c690 66052e20 System.Windows.Input.StylusLogic.get_TabletDevices() 00b8c6a0 6644e4cf System.Windows.Input.StylusLogic.OnDeviceChange() 00b8c6ac 6644e9f2 System.Windows.Input.StylusLogic.HandleMessage(MS.Internal.Interop.WindowMessage, IntPtr, IntPtr) 00b8c6dc 6584e3a4 System.Windows.SystemResources.InvalidateTabletDevices(MS.Internal.Interop.WindowMessage, IntPtr, IntPtr) 00b8c6f0 65bf1e1b System.Windows.SystemResources.SystemThemeFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) 00b8c704 669c698b MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) 00b8c740 669c68db MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) 00b8c750 669c6756 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) 00b8c770 669c668a MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) 00b8c7b4 669c4cae System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) 00b8c808 669c61e1 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) 00b8cd98 00dba0b6 [HelperMethodFrame_1OBJ: 00b8cd98] System.Threading.SynchronizationContext.WaitHelper(IntPtr[], Boolean, Int32) 00b8d03c 669c5af2 System.Windows.Threading.DispatcherSynchronizationContext.Wait(IntPtr[], Boolean, Int32) 00b8d050 679113d6 System.Threading.SynchronizationContext.InvokeWaitMethodHelper(System.Threading.SynchronizationContext, IntPtr[], Boolean, Int32) 00b8d288 685f2652 [GCFrame: 00b8d288] 00b8d954 685f2652 [GCFrame: 00b8d954] 00b8decc 685f2652 [HelperMethodFrame_1OBJ: 00b8decc] System.StubHelpers.InterfaceMarshaler.ConvertToManaged(IntPtr, IntPtr, IntPtr, Int32) 00b8df58 66418fe6 DomainBoundILStubClass.IL_STUB_PInvoke(System.Guid ByRef, System.Object, Int32, System.Guid ByRef) 00b8df5c 66511897 [InlinedCallFrame: 00b8df5c] MS.Win32.Penimc.UnsafeNativeMethods.CoCreateInstance(System.Guid ByRef, System.Object, Int32, System.Guid ByRef) 00b8dfc4 66511897 MS.Win32.Penimc.UnsafeNativeMethods.CreatePimcManager() 00b8dff0 665118d2 MS.Win32.Penimc.UnsafeNativeMethods..cctor() 00b8e168 685f2652 [GCFrame: 00b8e168] 00b8ea30 685f2652 [PrestubMethodFrame: 00b8ea30] MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr ByRef) 00b8ea58 665221b3 System.Windows.Input.PenThreadWorker..ctor() 00b8ea90 66521e6b System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(System.Windows.Input.PenContext) 00b8eab0 66521f47 System.Windows.Input.PenThreadPool.GetPenThreadForPenContext(System.Windows.Input.PenContext) 00b8eac4 6653d814 System.Windows.Input.TabletDeviceCollection.UpdateTablets() 00b8eb18 667373c3 System.Windows.Input.TabletDeviceCollection..ctor() 00b8eb28 66052e20 System.Windows.Input.StylusLogic.get_TabletDevices() 00b8eb38 66052cc2 System.Windows.Input.StylusLogic.RegisterHwndForInput(System.Windows.Input.InputManager, System.Windows.PresentationSource) 00b8eb7c 66052b6c System.Windows.Interop.HwndStylusInputProvider..ctor(System.Windows.Interop.HwndSource) 00b8ebcc 660519c6 System.Windows.Interop.HwndSource.Initialize(System.Windows.Interop.HwndSourceParameters) 00b8ec68 66051642 System.Windows.Interop.HwndSource..ctor(System.Windows.Interop.HwndSourceParameters) 00b8ecb4 64f81573 System.Windows.Window.CreateSourceWindow(Boolean) 00b8ed44 650437ae System.Windows.Window.CreateSourceWindowDuringShow() 00b8ed48 64f82b23 System.Windows.Window.SafeCreateWindowDuringShow() 00b8ed54 64f82a3b System.Windows.Window.ShowHelper(System.Object) 00b8ed78 64fd6a7c System.Windows.Window.Show() 00b8ed84 656d3209 System.Windows.Window.ShowDialog()
00b8edd4 07aa8402 MyNameSpace.MyClass.MyMethod()
0:000> ~9s eax=0000397e ebx=05137a0c ecx=0840e8e8 edx=77577174 esi=000006fc edi=05137a08 eip=77577174 esp=0840e84c ebp=0840e8c4 iopl=0 nv up ei pl nz ac po cy cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000213 ntdll!KiFastSystemCallRet: 77577174 c3 ret
0:009> !clrstack OS Thread Id: 0x133c (9) Child SP IP Call Site 0840f248 77577174 [PrestubMethodFrame: 0840f248] MS.Win32.Penimc.UnsafeNativeMethods.GetPenEventMultiple(Int32, IntPtr[], IntPtr, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef, IntPtr ByRef) 0840f28c 66523055 System.Windows.Input.PenThreadWorker.ThreadProc() 0840f2d8 6793c9ff System.Threading.ThreadHelper.ThreadStart_Context(System.Object) 0840f2e4 67932367 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 0840f350 679322a6 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 0840f364 67932261 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 0840f37c 6793ca7c System.Threading.ThreadHelper.ThreadStart() 0840f4c8 685f2652 [GCFrame: 0840f4c8] 0840f6ac 685f2652 [DebuggerU2MCatchHandlerFrame: 0840f6ac]
I would appreciate any help.
Thanks in advance. Regards.