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