Internet Explorer 9 Silverlight 4 内存泄漏

发布于 2024-12-29 03:28:56 字数 2670 浏览 3 评论 0 原文

我们将视频从实现 IHttpAsyncHandler 的 ashx 流式传输到我们的 Silverlight 客户端。

在客户端,异步处理程序正在 MediaStreamSource 的实现中使用。

在最新的 Firefox、Chrome 和 Internet Explorer 8 中一切都运行良好。

但在 Internet Explorer 9 中我们看到内存泄漏。我一直在使用 umdh 来调试内存,并发现一个调用堆栈使用了 127mb 来转储内存。所以我想我已经将范围缩小到这个调用堆栈。

但现在我不知道要继续我的调试。这是 umdh 信息:

首先是第一次运行和第二次运行之间的比较

+ 117440512 ( 134217712 - 16777200)      1 allocs   BackTrace121282BC
+       0 (      1 -      1)    BackTrace121282BC   allocations

ntdll!RtlAllocateHeap+00000274
npctrl!???+00000000 : 56FE1A65
npctrl!DllCanUnloadNow+000157F0
npctrl!???+00000000 : 56FF477E
npctrl!???+00000000 : 56FF48D5
urlmon!CBSCHolder::OnDataAvailable+0000003A
urlmon!CBinding::CallOnDataAvailable+0000002B
urlmon!CBinding::OnDataNotification+000000D7
urlmon!CBinding::OnTransNotification+000001DB
urlmon!CBinding::ReportData+00000085
urlmon!COInetProt::ReportData+0000006E
mscorie!CorFltr::ReportData+0000002B
urlmon!CTransaction::DispatchReport+0000037A
urlmon!CTransaction::OnINetCallback+000000DB
urlmon!TransactionWndProc+00000028
USER32!InternalCallWinProc+00000023
USER32!UserCallWinProcCheckWow+00000109
USER32!DispatchMessageWorker+000003BC
USER32!DispatchMessageW+0000000F
IEFRAME!CTabWindow::_TabWindowThreadProc+00000722
IEFRAME!LCIETab_ThreadProc+00000317
iertutil!CIsoScope::RegisterThread+000000AB
IEFRAME!Detour_DefWindowProcA+0000006C
kernel32!BaseThreadInitThunk+0000000E
ntdll!__RtlUserThreadStart+00000070
ntdll!_RtlUserThreadStart+0000001B

第二次运行调用堆栈

+ 7fffff0 ( 7fffff0 -     0)      1 allocs  BackTrace121282BC
+       1 (     1 -     0)  BackTrace121282BC   allocations

ntdll!RtlAllocateHeap+00000274
npctrl!???+00000000 : 56FE1A65
npctrl!DllCanUnloadNow+000157F0
npctrl!???+00000000 : 56FF477E
npctrl!???+00000000 : 56FF48D5
urlmon!CBSCHolder::OnDataAvailable+0000003A
urlmon!CBinding::CallOnDataAvailable+0000002B
urlmon!CBinding::OnDataNotification+000000D7
urlmon!CBinding::OnTransNotification+000001DB
urlmon!CBinding::ReportData+00000085
urlmon!COInetProt::ReportData+0000006E
mscorie!CorFltr::ReportData+0000002B
urlmon!CTransaction::DispatchReport+0000037A
urlmon!CTransaction::OnINetCallback+000000DB
urlmon!TransactionWndProc+00000028
USER32!InternalCallWinProc+00000023
USER32!UserCallWinProcCheckWow+00000109
USER32!DispatchMessageWorker+000003BC
USER32!DispatchMessageW+0000000F
IEFRAME!CTabWindow::_TabWindowThreadProc+00000722
IEFRAME!LCIETab_ThreadProc+00000317
iertutil!CIsoScope::RegisterThread+000000AB
IEFRAME!Detour_DefWindowProcA+0000006C
kernel32!BaseThreadInitThunk+0000000E
ntdll!__RtlUserThreadStart+00000070
ntdll!_RtlUserThreadStart+0000001B

We are streaming video from a ashx implementing IHttpAsyncHandler to our Silverlight client.

On the clientside the async handler is getting use in a implementation of MediaStreamSource.

It all runs fine in latest Firefox, chrome and also in Internet Explorer 8.

But in Internet Explorer 9 we see a memory leak. I have been using umdh to debug the memory and have found a callstack that used 127mb between to dumps of the memory. So i think i have narrowed it down to this callstack.

But now i don't know now to continue with my debugging. Here is the umdh info:

First the compare between first run and second

+ 117440512 ( 134217712 - 16777200)      1 allocs   BackTrace121282BC
+       0 (      1 -      1)    BackTrace121282BC   allocations

ntdll!RtlAllocateHeap+00000274
npctrl!???+00000000 : 56FE1A65
npctrl!DllCanUnloadNow+000157F0
npctrl!???+00000000 : 56FF477E
npctrl!???+00000000 : 56FF48D5
urlmon!CBSCHolder::OnDataAvailable+0000003A
urlmon!CBinding::CallOnDataAvailable+0000002B
urlmon!CBinding::OnDataNotification+000000D7
urlmon!CBinding::OnTransNotification+000001DB
urlmon!CBinding::ReportData+00000085
urlmon!COInetProt::ReportData+0000006E
mscorie!CorFltr::ReportData+0000002B
urlmon!CTransaction::DispatchReport+0000037A
urlmon!CTransaction::OnINetCallback+000000DB
urlmon!TransactionWndProc+00000028
USER32!InternalCallWinProc+00000023
USER32!UserCallWinProcCheckWow+00000109
USER32!DispatchMessageWorker+000003BC
USER32!DispatchMessageW+0000000F
IEFRAME!CTabWindow::_TabWindowThreadProc+00000722
IEFRAME!LCIETab_ThreadProc+00000317
iertutil!CIsoScope::RegisterThread+000000AB
IEFRAME!Detour_DefWindowProcA+0000006C
kernel32!BaseThreadInitThunk+0000000E
ntdll!__RtlUserThreadStart+00000070
ntdll!_RtlUserThreadStart+0000001B

The second run callstack

+ 7fffff0 ( 7fffff0 -     0)      1 allocs  BackTrace121282BC
+       1 (     1 -     0)  BackTrace121282BC   allocations

ntdll!RtlAllocateHeap+00000274
npctrl!???+00000000 : 56FE1A65
npctrl!DllCanUnloadNow+000157F0
npctrl!???+00000000 : 56FF477E
npctrl!???+00000000 : 56FF48D5
urlmon!CBSCHolder::OnDataAvailable+0000003A
urlmon!CBinding::CallOnDataAvailable+0000002B
urlmon!CBinding::OnDataNotification+000000D7
urlmon!CBinding::OnTransNotification+000001DB
urlmon!CBinding::ReportData+00000085
urlmon!COInetProt::ReportData+0000006E
mscorie!CorFltr::ReportData+0000002B
urlmon!CTransaction::DispatchReport+0000037A
urlmon!CTransaction::OnINetCallback+000000DB
urlmon!TransactionWndProc+00000028
USER32!InternalCallWinProc+00000023
USER32!UserCallWinProcCheckWow+00000109
USER32!DispatchMessageWorker+000003BC
USER32!DispatchMessageW+0000000F
IEFRAME!CTabWindow::_TabWindowThreadProc+00000722
IEFRAME!LCIETab_ThreadProc+00000317
iertutil!CIsoScope::RegisterThread+000000AB
IEFRAME!Detour_DefWindowProcA+0000006C
kernel32!BaseThreadInitThunk+0000000E
ntdll!__RtlUserThreadStart+00000070
ntdll!_RtlUserThreadStart+0000001B

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故事还在继续 2025-01-05 03:28:56

你已经解决你的问题了吗?

您是否检查过 SL 内存调试技巧,例如:

http://radheyv.blogspot.cz/2011/04/detecting-memory-leaks-in-silverlight.html#!/2011/04/detecting-memory-leaks-in-silverlight.html< /一>

<一href="http://blogs.msdn.com/b/slperf/archive/2010/08/19/analyzing-silverlight-memory-usage-part-1-obtaining-measurements.aspx" rel="nofollow">http://blogs.msdn.com/b/slperf/archive/2010/08/19/analyzing-silverlight-memory-usage-part-1-obtaining-measurements.aspx

<一个href="http://dllshepherdnotes.blogspot.cz/2011/02/silverlight-memory-leak-part-4.html#!/2011/02/silverlight-memory-leak-part-4.html" rel="nofollow">http://dllshepherdnotes.blogspot.cz/2011/02/silverlight-memory-leak-part-4.html#!/2011/02/silverlight-memory-leak-part-4.html< /a>

http://www.dllshepherd.net/2011/02/silverlight-memory-leak-part-2.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文