ole32.dll异常后iWebBrowser :: Navigate死锁 [英] iWebBrowser::Navigate Deadlock after a ole32.dll exception

查看:108
本文介绍了ole32.dll异常后iWebBrowser :: Navigate死锁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个与Windows嵌入式浏览器和COM有关的问题.我想做的是以HTML格式向用户显示一些数据,因此我使用iwebbrowser2控件来实现这一点.

ole32.dll崩溃后调用iwebbrowser2 Navigate后,我的应用程序中出现这个怪异的死锁或挂起.此ole32崩溃随机发生在我的应用程序中.没有异常发生的通常地点或时间.它可能会在应用程序执行开始时发生,或者稍后在使用应用程序时发生.要处理的应用程序有几个正在运行的线程和一些Windows工作者线程,这些线程只是从无处产生.有一个名为WrapperThreadProc的特定线程,我不确定正在执行什么操作,但是它对COM对象上的CoUninitialize进行了调用,而该COM对象可能不再存在,可能会导致ole32.dll上的异常(不确定是否在实际上正在发生.)

以下是发生异常时调用堆栈的图片

,这是当navigate() 之后发生死锁时的调用堆栈的图片 之后发生死锁时调用堆栈的图片

有人知道这个有线问题的根源吗?我非常感谢您的任何小帮忙.

谢谢

解决方案

我已经找到了解决问题的方法.事实证明,networkitemfactory.dll中发生了竞争情况,这会导致ole32.dll崩溃并卸载.如果在"iwebbrowser2 :: navigate"之类的异常之后进行了任何COM调用,则应用程序将陷入死锁状态. Microsoft为此发布了一个修补程序.这是文章support.microsoft.com/en-us/kb/2494427

I have a question related to windows embedded browser and COM. What I am trying to do is to display some data to the user in a HTML form so I use the iwebbrowser2 control to achieve this.

I have this weird deadlock or hang in my application after a call to iwebbrowser2 Navigate is made after a ole32.dll crash. This ole32 crash randomly happens in my application. There is not a usual place or time in which the exception happens. It could happen right in the beginning on the application execution or later on while using the application. The application that o work on has several threads running and some windows worker thread that just spawns out of nowhere. There is a particular thread called WrapperThreadProc that I'm not sure what is doing but it does a call to CoUninitialize on a COM object that might not exist anymore possibly causing the exception on the ole32.dll (not sure if this is actually happening).

here are the pics of the call stack when the exception happens

and here is a pic of the call stack when the deadlock happens after navigate()

Does anyone have a clue on what is going on with this wired issue? I do appreciate any small help.

Thanks

解决方案

I have found the solution to the problem. It turns out that there is a race condition happening in the networkitemfactory.dll that would cause the ole32.dll crash and unload. If any COM call is made after the exception like "iwebbrowser2::navigate" then application would hang in a deadlock. Microsoft released a hotfix for it. Here is the article support.microsoft.com/en-us/kb/2494427

这篇关于ole32.dll异常后iWebBrowser :: Navigate死锁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆