none
The application sporadically hung forever RRS feed

  • 问题

  • I've bothered for a question for weeks. The UI of my application sometimes would run into busy forever, the cursor is circle round and round and the UI seems cannot accept any click event. and this is sporadic.

    Today I'm lucky to get this happend in my test computer.I can see this process always occupy the 25%of CPU usage ,and my computer is quad-core. I use the "Windbg" and attached that process(before that i use "Process Explorer" and found the thread use most resource is 1a24 ).

    then I use following command and corresponding output:

    0:011> !threads ThreadCount: 20 UnstartedThread: 0 BackgroundThread: 10 PendingThread: 0 DeadThread: 8 Hosted Runtime: no PreEmptive Lock ID OSID ThreadOBJ State GC GC Alloc Context Domain Count APT Exception 0 1 1840 0000000000604c20 2006020 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 STA 2 2 200 000000000060af60 b220 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 MTA (Finalizer) XXXX 3 000000001d5cff50 19820 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 MTA 11 4 1a24 000000001d5e1fe0 7020 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 STA XXXX 5 000000001d64a600 1019820 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 Ukn (Threadpool Worker) XXXX 6 000000001d634c40 1019820 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 Ukn (Threadpool Worker) XXXX 7 00000000244efa40 1019820 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 Ukn (Threadpool Worker) XXXX 8 0000000024547280 1019820 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 Ukn (Threadpool Worker) XXXX 9 0000000024503790 1019820 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 Ukn (Threadpool Worker) 23 a 1754 00000000244c8c40 100a220 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 MTA (Threadpool Worker) 24 b d44 00000000245b5020 1000220 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 Ukn (Threadpool Worker) 25 c 1368 0000000024618140 8009220 Enabled 0000000005f22278:0000000005f236a8 00000000005f89f0 0 MTA (Threadpool Completion Port) 10 d 1604 0000000024615810 220 Enabled 0000000005f29338:0000000005f296a8 00000000005f89f0 0 Ukn 29 e 1b5c 00000000244ed820 b220 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 MTA 30 f 1fb8 00000000246914e0 b220 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 MTA 16 10 b70 0000000034246b00 220 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 Ukn 28 11 20b8 000000003427bdd0 2000220 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 Ukn XXXX 12 0000000034361dc0 21019820 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 Ukn (Threadpool Worker) XXXX 13 00000000343624d0 21019820 Enabled 0000000000000000:0000000000000000 00000000005f89f0 0 Ukn (Threadpool Worker) 38 14 1a48 0000000034362be0 1009220 Enabled 0000000005f299d8:0000000005f2b6a8 00000000005f89f0 0 MTA (Threadpool Worker) 0:011> !clrstack OS Thread Id: 0x1a24 (11) Child SP IP Call Site 0000000020f55b10 000000005d221fc8 [NDirectMethodFrameStandalone: 0000000020f55b10] System.Windows.Media.Composition.MilCoreApi.MilUtility_PolygonHitTest(System.Windows.Media.Composition.MilMatrix3x2D*, System.Windows.Media.Composition.MIL_PEN_DATA*, Double*, System.Windows.Point*, Byte*, UInt32, UInt32, Double, Boolean, System.Windows.Point*, Boolean ByRef) 0000000020f55a90 000007fee273aa54 DomainBoundILStubClass.IL_STUB_PInvoke(System.Windows.Media.Composition.MilMatrix3x2D*, System.Windows.Media.Composition.MIL_PEN_DATA*, Double*, System.Windows.Point*, Byte*, UInt32, UInt32, Double, Boolean, System.Windows.Point*, Boolean ByRef) 0000000020f55bc0 000007fee26f8459 System.Windows.Media.Geometry.ContainsInternal(System.Windows.Media.Pen, System.Windows.Point, Double, System.Windows.Media.ToleranceType, System.Windows.Point*, UInt32, Byte*, UInt32) 0000000020f55d00 000007fee2dbbc07 System.Windows.Media.LineGeometry.ContainsInternal(System.Windows.Media.Pen, System.Windows.Point, Double, System.Windows.Media.ToleranceType) 0000000020f55e50 000007fee309cd23 System.Windows.Media.HitTestWithPointDrawingContextWalker.DrawGeometry(System.Windows.Media.Brush, System.Windows.Media.Pen, System.Windows.Media.Geometry) 0000000020f55f00 000007fee2dce89d System.Windows.Media.HitTestDrawingContextWalker.DrawLine(System.Windows.Media.Pen, System.Windows.Point, System.Windows.Point) 0000000020f55f90 000007fee26d4907 System.Windows.Media.RenderData.DrawingContextWalk(System.Windows.Media.DrawingContextWalker) 0000000020f56390 000007fee26f86b0 System.Windows.Media.RenderData.HitTestPoint(System.Windows.Point) 0000000020f563e0 000007fee2c29a6e System.Windows.Media.DrawingVisual.HitTestCore(System.Windows.Media.PointHitTestParameters) 0000000020f56460 000007fee26ab086 System.Windows.Media.Visual.HitTestPointInternal(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f56490 000007fee26aae70 System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f568e0 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f56d30 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f57180 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f575d0 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f57a20 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f57e70 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f582c0 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f58710 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f58b60 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f58fb0 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f59400 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f59850 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f59ca0 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5a0f0 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5a540 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5a990 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5ade0 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5b230 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5b680 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5bad0 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5bf20 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5c370 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5c7c0 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5cc10 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5d060 000007fee26aad2c System.Windows.Media.Visual.HitTestPoint(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.PointHitTestParameters) 0000000020f5d4b0 000007fee26aa7c6 System.Windows.Media.Visual.HitTest(System.Windows.Media.HitTestFilterCallback, System.Windows.Media.HitTestResultCallback, System.Windows.Media.HitTestParameters) 0000000020f5d560 000007fee26a4d40 System.Windows.UIElement.InputHitTest(System.Windows.Point, System.Windows.IInputElement ByRef, System.Windows.IInputElement ByRef) 0000000020f5d640 000007fee26ddf11 System.Windows.Input.MouseDevice.LocalHitTest(Boolean, System.Windows.Point, System.Windows.PresentationSource, System.Windows.IInputElement ByRef, System.Windows.IInputElement ByRef) 0000000020f5d720 000007fee26ddbdf System.Windows.Input.MouseDevice.GlobalHitTest(Boolean, System.Windows.Point, System.Windows.PresentationSource, System.Windows.IInputElement ByRef, System.Windows.IInputElement ByRef) 0000000020f5d880 000007fee2ba87e0 System.Windows.Input.MouseDevice.GlobalHitTest(Boolean, System.Windows.Point, System.Windows.PresentationSource) 0000000020f5d8e0 000007fee308d638 System.Windows.Input.MouseDevice.PreNotifyInput(System.Object, System.Windows.Input.NotifyInputEventArgs) 0000000020f5db60 000007fee26ccc69 System.Windows.Input.InputManager.ProcessStagingArea() 0000000020f5dbf0 000007fee26dc66d System.Windows.Input.MouseDevice.Synchronize() 0000000020f5dca0 000007fee26df32d System.Windows.Input.InputManager.HitTestInvalidatedAsyncCallback(System.Object) 0000000020f5dce0 000007fee478d11a System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) 0000000020f5dd40 000007fee478d0a7 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) 0000000020f5dda0 000007fee49ba6ad System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Int32, System.Delegate) 0000000020f5de00 000007fee4791105 System.Windows.Threading.DispatcherOperation.InvokeImpl() 0000000020f5deb0 000007fef6103188 System.Threading.ExecutionContext.runTryCode(System.Object) 0000000020f5e5d8 000007fef70935b4 [HelperMethodFrame_PROTECTOBJ: 0000000020f5e5d8] System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object) 0000000020f5e700 000007fef60f17f1 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 0000000020f5e760 000007fef60f173b System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 0000000020f5e7b0 000007fee4790f3d System.Windows.Threading.DispatcherOperation.Invoke() 0000000020f5e820 000007fee478abff System.Windows.Threading.Dispatcher.ProcessQueue() 0000000020f5e8d0 000007fee478af53 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) 0000000020f5e990 000007fee478d440 MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) 0000000020f5ea40 000007fee478d2b7 MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) 0000000020f5ea90 000007fee478d11a System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) 0000000020f5eaf0 000007fee478d0a7 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) 0000000020f5eb50 000007fee49ba6ad System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Int32, System.Delegate) 0000000020f5ebb0 000007fee478a258 System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) 0000000020f5ec70 000007fee478c914 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) 0000000020f5eda0 000007fee4936cc0 DomainBoundILStubClass.IL_STUB_ReversePInvoke(Int64, Int32, Int64, Int64) 0000000020f5f0d8 000007fef7035757 [NDirectMethodFrameStandalone: 0000000020f5f0d8] MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) 0000000020f5f0a0 000007fee47b0ff0 DomainBoundILStubClass.IL_STUB_PInvoke(System.Windows.Interop.MSG ByRef) 0000000020f5f170 000007fee478943a System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) 0000000020f5f250 000007ff0017d0d8 MyApplication.StartWindow() 0000000020f5f2e0 000007fef60f182c System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 0000000020f5f340 000007fef60f173b System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 0000000020f5f390 000007fef6186f9d System.Threading.ThreadHelper.ThreadStart() 0000000020f5f7e8 000007fef70935b4 [GCFrame: 0000000020f5f7e8] 0000000020f5fbd0 000007fef70935b4 [DebuggerU2MCatchHandlerFrame: 0000000020f5fbd0] 0:011> ~11s

    and I found that only found call stack is "0000000020f5f250 000007ff0017d0d8 MyApplication.StartWindow()". and cannot follow the following call stack.

    and anytime I found the current thread "CallStack" from "Process Explorer" is :

    wpfgfx_v0400.dll!RenderOptions_IsSoftwareRenderingForcedForProcess+0x23b95
    wpfgfx_v0400.dll!RenderOptions_IsSoftwareRenderingForcedForProcess+0x24ec7
    wpfgfx_v0400.dll!RenderOptions_IsSoftwareRenderingForcedForProcess+0x242bc
    wpfgfx_v0400.dll!WgxConnection_Create+0x2a39
    wpfgfx_v0400.dll!MilCompositionEngine_DeinitializePartitionManager+0x398f
    wpfgfx_v0400.dll!MilUtility_PolygonBounds+0x705
    wpfgfx_v0400.dll!MilUtility_PolygonBounds+0x742
    wpfgfx_v0400.dll!MilUtility_PolygonBounds+0x610
    wpfgfx_v0400.dll!MilCompositionEngine_DeinitializePartitionManager+0x3aad
    wpfgfx_v0400.dll!MilCompositionEngine_DeinitializePartitionManager+0x39c7
    wpfgfx_v0400.dll!MilUtility_PathGeometryBounds+0x1993
    wpfgfx_v0400.dll!RenderOptions_IsSoftwareRenderingForcedForProcess+0x235ea
    wpfgfx_v0400.dll!WgxConnection_Create+0x204ee
    clr.dll+0x17c7
    PresentationCore.ni.dll+0x33aa54
    PresentationCore.ni.dll+0x2f8459
    PresentationCore.ni.dll+0x9bbc07
    PresentationCore.ni.dll+0xc9cd23
    PresentationCore.ni.dll+0x9ce89d
    PresentationCore.ni.dll+0x2d4907
    PresentationCore.ni.dll+0x2f86b0
    PresentationCore.ni.dll+0x829a6e
    PresentationCore.ni.dll+0x2ab086
    PresentationCore.ni.dll+0x2aae70
    PresentationCore.ni.dll+0x2aad2c
    PresentationCore.ni.dll+0x2aa7c6
    PresentationCore.ni.dll+0x2a4d40
    PresentationCore.ni.dll+0x2ddf11
    PresentationCore.ni.dll+0x2ddbdf
    PresentationCore.ni.dll+0x7a87e0
    PresentationCore.ni.dll+0xc8d638
    PresentationCore.ni.dll+0x2ccc69
    PresentationCore.ni.dll+0x2dc66d
    PresentationCore.ni.dll+0x2df32d
    WindowsBase.ni.dll+0x11d11a
    WindowsBase.ni.dll+0x11d0a7
    WindowsBase.ni.dll+0x34a6ad
    WindowsBase.ni.dll+0x121105
    mscorlib.ni.dll+0x383188
    clr.dll!StrongNameErrorInfo+0x53f34
    clr.dll!StrongNameErrorInfo+0x54049
    clr.dll!StrongNameErrorInfo+0x540c5
    clr.dll!CoUninitializeEE+0x32872
    clr.dll!CoUninitializeEE+0x32691
    mscorlib.ni.dll+0x3717f1
    mscorlib.ni.dll+0x37173b
    WindowsBase.ni.dll+0x120f3d
    WindowsBase.ni.dll+0x11abff
    WindowsBase.ni.dll+0x11af53
    WindowsBase.ni.dll+0x11d440
    WindowsBase.ni.dll+0x11d2b7
    WindowsBase.ni.dll+0x11d11a
    WindowsBase.ni.dll+0x11d0a7
    WindowsBase.ni.dll+0x34a6ad
    WindowsBase.ni.dll+0x11a258
    WindowsBase.ni.dll+0x11c914
    WindowsBase.ni.dll+0x2c6cc0
    clr.dll!CoUninitializeEE+0x31a67
    USER32.dll!TranslateMessageEx+0x2a1
    USER32.dll!TranslateMessage+0x1ea
    clr.dll+0x17c7
    WindowsBase.ni.dll+0x140ff0
    WindowsBase.ni.dll+0x11943a

    I don't know is it a known bug of .NET or not.

    Can anyone help to tell me how to find the way to solve this problem? Thanks a lot.


    Sparkling

    2013年9月14日 10:31

答案

  • Hello Sparkling,

    From your description, I understood there is an issue regarding WPF UI thread.

    Because I cannot debug this issue on my side, I could only provide you some ideas or suggestions. Hope it can help you.

    As far as I known, I supposed there was some error on Multi UI thread. I suggested you to check the UI thread call function.

    Here are some related references.

    #Thread Model

    http://msdn.microsoft.com/en-us/library/ms741870.aspx

    On the other hand, this is a Chinese Forum. I suggested you to post this thread on English Forum to get a response better.

    #WPF Forums

    http://social.msdn.microsoft.com/Forums/en-US/home?forum=wpf

    Regards,


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2013年9月16日 5:21
    版主

全部回复

  • Hello Sparkling,

    From your description, I understood there is an issue regarding WPF UI thread.

    Because I cannot debug this issue on my side, I could only provide you some ideas or suggestions. Hope it can help you.

    As far as I known, I supposed there was some error on Multi UI thread. I suggested you to check the UI thread call function.

    Here are some related references.

    #Thread Model

    http://msdn.microsoft.com/en-us/library/ms741870.aspx

    On the other hand, this is a Chinese Forum. I suggested you to post this thread on English Forum to get a response better.

    #WPF Forums

    http://social.msdn.microsoft.com/Forums/en-US/home?forum=wpf

    Regards,


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2013年9月16日 5:21
    版主
  • Thanks for your reply.

    Today I debug the applicaiton with "WinDbg" and found:

    0:011> k
    Child-SP          RetAddr           Call Site
    00000000`212f4dd8 00000000`5fa71f89 wpfgfx_v0400!RenderOptions_IsSoftwareRenderingForcedForProcess+0x22730
    00000000`212f4de0 00000000`5fa73435 wpfgfx_v0400!RenderOptions_IsSoftwareRenderingForcedForProcess+0x226e9
    00000000`212f4e10 00000000`5fa74810 wpfgfx_v0400!RenderOptions_IsSoftwareRenderingForcedForProcess+0x23b95
    00000000`212f4e50 00000000`5fa73adc wpfgfx_v0400!RenderOptions_IsSoftwareRenderingForcedForProcess+0x24f70
    00000000`212f4ea0 00000000`5fa12c41 wpfgfx_v0400!RenderOptions_IsSoftwareRenderingForcedForProcess+0x2423c
    00000000`212f4f40 00000000`5f987169 wpfgfx_v0400!WgxConnection_Create+0x2a39
    00000000`212f4f80 00000000`5fa082e6 wpfgfx_v0400!MilUtility_PathGeometryBounds+0x2219
    00000000`212f4fb0 00000000`5fa07fbf wpfgfx_v0400!MilUtility_PolygonBounds+0xbde
    00000000`212f5010 00000000`5fa07d18 wpfgfx_v0400!MilUtility_PolygonBounds+0x8b7
    00000000`212f5090 00000000`5fa06f9d wpfgfx_v0400!MilUtility_PolygonBounds+0x610

    I found the first method of "MilUtility_PolygonBounds" did not run any more, but the third will run each when I debug the application.

    It seems it is a bug of .NET?


    Sparkling

    2013年9月23日 11:53
  • Hi Sparkling,

    1. Could you provide a sample and your detailed steps or how to reproduce this issue. You can put your sample on SkyDrive or other place where can be downloaded.

    2. What is your working environment? Such as .NET Framework version, Operation System version, IDE Version?

    it can help us to figure out this issue for you.

    Have a nice time,

    Regards,

    2013年9月23日 13:21
  • Thanks for your reply. and the following is supplement:

    1. The application have several processes and some process are just for display UI and others for calculating and they share data with socket communications.
    the issue happened sporadically when the user operated the UI which would update by other calculating processes' sending data(when sending data , new threads would be created, and I would update the UI using Dispatcher.Invoke ).

    2. the .NET version is 4.0, OS version is Windows 7, IDE version is Visual studio 2010.


    Sparkling


    2013年9月23日 13:38
  • Hi Sparking,

    Thanks for your supplements. But I cannot reproduce this issue either. Could you provide a simplified example for us to reproduce the issue? A compressed file would be fine. Because this issue is a specify one, I cannot figure out the root cause for your first one supplement. As Jimmy Yang mentioned, maybe it caused by WPF multi threads.

    On the other hand, I suggested you to test your application on .NET Framework 4.5. It is the latest version. If this issue is a bug, maybe it been fixed in the latest version.

    BTW, because your application used a lot of .NET technology, such as Socket, multi thread and etc… So we should locate this issue first.

    Hope it can give you some hints.

    Have a nice time!

    Sincerely,

    2013年9月23日 14:15
  • Hi cristine,

     there are so many many codes that  I did not know which one to post. The most suspect code is :

    protected override HitTestResult HitTestCore(PointHitTestParameters hitTestParameters)
            {
                if (this.HitTestCore(hitTestParameters.HitPoint, true) > -2)
                {
                    return new PointHitTestResult(base._visual, hitTestParameters.HitPoint);
                }
                return base.HitTestCore(hitTestParameters);
            }
            
            protected internal virtual int HitTestCore(Point point, bool checkHandles = true)
            {
                int handle = 0;
                if (checkHandles && this.HitInHandles(point, out handle))
                {
                    return handle;
                }
                if (this.HitInBody(point))
                {
                    return -1;
                }
                return -2;
            }

    this class( is a kind of graphic drawing in the UI) inherits from FrameworkElement. and mostly the UI hung when operated this graphic.when the users opearted this graphic, will send socket information to other process and other process will calculate the new position of graphic and other information and send back to the UI process and then UI update this graphic and other graphics .


    Sparkling

    2013年9月24日 11:32