Debugging 在Windows 10中使用UI自动化时内存泄漏
我在Windows 10计算机上遇到内存泄漏问题,在调查导致该问题的进程(WPF应用程序)中的一些转储后,我发现“MS.Internal.Automation.SynchronizedInputProviderWrapper”的许多实例,基本上,内存中保存但未收集垃圾的大多数对象都被该类型引用 我一直在使用dotMemory(实例的关键保留路径)、Visual Studio 2019(用于转储比较)和WinDbg进行进一步调查 根据这个答案: 他们的汇总解决了Win 8 RT&windows 2012服务器上的问题: 根据微软的说法: 当使用UI自动化框架的多个应用程序 在基于Windows 8的计算机上同时运行时,内存泄漏 发生,并且您的CPU使用率很高 我认为Windows 10上可能也存在同样的问题,但无法找到修复或汇总来修复此问题 更新: 我对SuperDump进行了另一次分析,发现了内存泄漏的可能原因,但我无法解释调用堆栈:Debugging 在Windows 10中使用UI自动化时内存泄漏,debugging,memory-leaks,dump,microsoft-ui-automation,debugdiag,Debugging,Memory Leaks,Dump,Microsoft Ui Automation,Debugdiag,我在Windows 10计算机上遇到内存泄漏问题,在调查导致该问题的进程(WPF应用程序)中的一些转储后,我发现“MS.Internal.Automation.SynchronizedInputProviderWrapper”的许多实例,基本上,内存中保存但未收集垃圾的大多数对象都被该类型引用 我一直在使用dotMemory(实例的关键保留路径)、Visual Studio 2019(用于转储比较)和WinDbg进行进一步调查 根据这个答案: 他们的汇总解决了Win 8 RT&window
clr!EEHeapAlloc+2c ntdll!RtlAllocateHeap
clr!EEHeapAllocInProcessHeap+5b clr!EEHeapAlloc
clr!ClrAllocInProcessHeap+23
clr!operator new+14 clr!ClrAllocInProcessHeap
clr!ComCallWrapper::CreateWrapper+1ce clr!operator new
clr!ComCallWrapper::InlineGetWrapper+24 clr!ComCallWrapper::CreateWrapper
clr!GetComIPFromObjectRef+22e clr!ComCallWrapper::InlineGetWrapper
clr!MarshalObjectToInterface+3a clr!GetComIPFromObjectRef
clr!StubHelpers::InterfaceMarshaler__ConvertToNative+d8 clr!MarshalObjectToInterface
0x4AA1110 clr!StubHelpers::InterfaceMarshaler__ConvertToNative
PresentationCore_ni!System.Windows.Media.DashStyle.OffsetPropertyChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)$##6001EA6 <PERF> (PresentationCore_ni+0x19cca0)
clr!COMToCLRDispatchHelper+6b
clr!COMPlusFrameHandlerRevCom
UIAutomationCore!RichEditObjectProxy::QueryInterface+6139
UIAutomationCore!NullInvoker::CallTarget
UIAutomationCore!InProcClientAPIStub::UiaNode_GetPatternProvider
UIAutomationCore!RichEditObjectProxy::QueryInterface+6116
UIAutomationCore!InProcClientAPIStub::InvokeInProcAPI+5eb
UIAutomationCore!UiaNode::CrossProcess_GetPatternProvider+49 UIAutomationCore!InProcClientAPIStub::InvokeInProcAPI
UIAutomationCore!RemoteUiaNodeStub::Incoming_GetPatternProvider+8c UIAutomationCore!UiaNode::CrossProcess_GetPatternProvider
UIAutomationCore!RemoteUiaNodeStub::OnMessage+b8
UIAutomationCore!InvokeOnCorrectContext_Callback+272
UIAutomationCore!NullInvoker::CallTarget+2b UIAutomationCore!InvokeOnCorrectContext_Callback
UIAutomationCore!ProcessIncomingRequest+4f6
UIAutomationCore!ChannelBasedServerConnection::OnData+dd
UIAutomationCore!ReadWriteChannelInfo::Service+18a UIAutomationCore!ChannelBasedServerConnection::OnData
UIAutomationCore!OverlappedIOManager::IoThreadProc+b3 UIAutomationCore!ReadWriteChannelInfo::Service
UIAutomationCore!OverlappedIOManager::StaticIoThreadProc+d UIAutomationCore!OverlappedIOManager::IoThreadProc
kernel32!BaseThreadInitThunk+19
ntdll!__RtlUserThreadStart+2f
ntdll!_except_handler4
ntdll!FinalExceptionHandlerPad22
UIAutomationCore!OverlappedIOManager::StaticIoThreadProc
clr!EEHeapAlloc+2c ntdll!RtlAllocater堆
clr!EEHeapAllocInProcessHeap+5b clr!伊希帕洛克
clr!ClrAllocInProcessHeap+23
clr!新操作员+14 clr!ClrAllocInProcessHeap
clr!ComCallWrapper::CreateWrapper+1ce clr!新接线员
clr!ComCallWrapper::InlineGetWrapper+24 clr!ComCallWrapper::CreateWrapper
clr!GetComIPFromObjectRef+22e clr!ComCallWrapper::InlineGetWrapper
clr!MarshalObjectToInterface+3a clr!GetComIPFromObjectRef
clr!StubHelpers::InterfaceMarshaler\uuu Convertonative+d8 clr!MarshalObjectToInterface
0x4AA1110 clr!StubHelpers::InterfaceMarshaler\uuu转换器
代表卡鲁尼!System.Windows.Media.DashStyle.OffsetPropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)$###6001EA6(PresentationCore\n+0x19cca0)
clr!COMToCLRDispatchHelper+6b
clr!COMPlusFrameHandlerRevCom
乌伊·奥克雷!RichEditObjectProxy::QueryInterface+6139
乌伊·奥克雷!NullInvoker::CallTarget
乌伊·奥克雷!InProcClientAPIStub::UiaNode\u GetPatternProvider
乌伊·奥克雷!RichEditObjectProxy::QueryInterface+6116
乌伊·奥克雷!InProcClientAPIStub::InvokeInProcLocapi+5eb
乌伊·奥克雷!UiaNode::CrossProcess_GetPatternProvider+49 UIAutomationCore!InProcClientAPIStub::InvokeInProcLocapi
乌伊·奥克雷!RemoteUiaNodeStub::传入的\u GetPatternProvider+8c UIAutomationCore!UiaNode::CrossProcess\u GetPatternProvider
乌伊·奥克雷!RemoteUiaNodeStub::OnMessage+b8
乌伊·奥克雷!调用上下文回调+272
乌伊·奥克雷!NullInvoker::CallTarget+2b UIAutomationCore!调用上下文回调
乌伊·奥克雷!ProcessIncomingRequest+4f6
乌伊·奥克雷!ChannelBasedServerConnection::OnData+dd
乌伊·奥克雷!ReadWriteChannelInfo::Service+18a UIAutomationCore!ChannelBasedServerConnection::OnData
乌伊·奥克雷!OverlappeDomainManager::IoThreadProc+b3 UIAutomationCore!ReadWriteChannelInfo::服务
乌伊·奥克雷!OverlappeDomainManager::StaticIoThreadProc+d UIAutomationCore!OverlappeDomainManager::IoThreadProc
内核32!BaseThreadInitThunk+19
ntdll__RtlUserThreadStart+2f
ntdll_除了你的手
ntdll!FinalExceptionHandlerPad22
乌伊·奥克雷!OverlappeDomainManager::StaticIoThreadProc
谢谢