I can reproduce this issue every time now, and I have digged out more info, however I have not figure out why yet. Here is what I have found:
T 2012-10-01 11:13:20:921 server.cc(179) Entering Server::ShutDownSession
T 2012-10-01 11:13:20:921 IESession.cpp(64) Entering IESession::ShutDown
** WM_CLOSE send to IE_CommandExecutor
T 2012-10-01 11:13:20:932 IECommandExecutor.cpp(147) Entering IECommandExecutor::OnClose
T 2012-10-01 11:13:20:932 IECommandExecutor.cpp(159) Entering IECommandExecutor::OnDestroy
T 2012-10-01 11:13:20:932 IECommandExecutor.cpp(162) Leaving IECommandExecutor::OnDestroy
T 2012-10-01 11:13:20:932 IECommandExecutor.cpp(151) Leaving IECommandExecutor::OnClose
T 2012-10-01 11:13:20:980 Browser.cpp(28) Entering Browser::~Browser
T 2012-10-01 11:13:20:981 Browser.cpp(244) Entering Browser::DetachEvents
T 2012-10-01 11:13:20:981 Browser.cpp(249) Leaving Browser::DetachEvents
T 2012-10-01 11:13:20:981 Browser.cpp(30) Leaving Browser::~Browser
** IECommandExecutore and Browser will shut down nicely
** IESession is still waiting here
DWORD wait_result = ::WaitForSingleObject(thread_handle, 30000);
and then crash happens, it seems that the crash happens during the process of closing process of IECommandExecutor or Browser. I think this may related to this line of code in IESession.cpp:
// Kill the background thread first - otherwise the IE process crashes.
stopPersistentEventFiring();
I will when something happens(like in my example, an confirm dialog pops up when the window unload), this stopPersisentEventFiring may fail, then the close may crose IE process.
Just my theory for now, I will try to dig out ,more.
Adam
在 2012年7月5日星期四UTC+8下午11时02分21秒,eduardo sousa写道: