iWebBrowser::Navigate Deadlock after a ole32.dll exception

回眸只為那壹抹淺笑 提交于 2020-01-25 20:52:11

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/38147194/iwebbrowsernavigate-deadlock-after-a-ole32-dll-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!