NASTY issue with FBConnect and IE7 it CRASHES VISTA


Punted for v2.
If you repeatedly OPEN FBConnect dialog and then press CANCLE button on that dialog.
After let's say 5-20 times IE7 will start poping up endless numbers of new FBConnect dialog's hogging complete system !!!.
I installed this version of toolkit
on Windows Vista Ultimate with IE7 browser.
You can try it on this page:
it is sample demo FBConnect package
This ONLY happens on IE7 for now
on IE6 and IE8 it just opens single new window with this URL (always same 1):
And now DEV tip:
I was looking into your SRC of "oomph\consume\Toolbar\Microformats\Toolbar.cpp"
and if you REMOVE/COMMENT OUT from "OnDocumentComplete method" HOOKs on current HTML DOCUMENT then is issue doesn't occurs but obviously toolbar.dll is not working on refresh anymore
void STDMETHODCALLTYPE CToolbar::OnDocumentComplete(IDispatch *pDisp, VARIANT *pvarURL)
CComQIPtr<IWebBrowser2> spTempWebBrowser = pDisp;
if (spTempWebBrowser && m_spWebBrowser && m_spWebBrowser.IsEqualObject(spTempWebBrowser))
CComPtr<IDispatch> spDispDoc;
hr = m_spWebBrowser->get_Document(&spDispDoc);
if (SUCCEEDED(hr))
CComQIPtr<IHTMLDocument2> spHTMLDoc = spDispDoc;
if (spHTMLDoc != NULL)
// Hook OnReadyStateChange. We need to hook even for HTTPS pages, since
// HTTPS could redirect to HTTP
//if (m_fDocAdvised)
// hr = ISinkDocEvents::DispEventUnadvise(m_spDocument);
// m_fDocAdvised = FALSE;
//hr = ISinkDocEvents::DispEventAdvise(spDispDoc);
//if (SUCCEEDED(hr))
// m_fDocAdvised = TRUE;
// m_spDocument = spDispDoc;
hr = InjectScriptTags(spDispDoc);
Closed Aug 24, 2009 at 11:18 PM by karstenj


ernes32 wrote May 13, 2009 at 3:29 PM

And btw. FBConnect works just fine if oomph toolkit is not installed !

ernes32 wrote May 15, 2009 at 6:41 AM

My current solution is in :
void STDMETHODCALLTYPE CToolbar::OnDocumentComplete(IDispatch *pDisp, VARIANT *pvarURL)
I set hook only once! by:
            if (!m_fDocAdvised)
                hr = ISinkDocEvents::DispEventAdvise(spDispDoc);
                if (SUCCEEDED(hr))
                    m_fDocAdvised = TRUE;
                    m_spDocument = spDispDoc;
and on STDMETHODIMP CAdaptiveBlueHook::SetSite(IUnknown* pUnkSite)
I am releasing event...

btw. u also forgot to initilize m_fDocAdvised (bad practice!)

wrote Aug 24, 2009 at 11:18 PM

wrote Feb 13, 2013 at 8:25 PM

wrote May 16, 2013 at 12:43 AM