Suppose the following situation: 1) a QGWV object is create. 2) a custom QWebPage-devivated class is create and set as QGWBV's page. QGraphicsWebView* webView = new QGraphicsWebView; WebPage* page = new WebPage; webView->setPage(page); NOTE: "webView" is not parent of "page". 3) submit a load. page->mainFrame()->setHtml("<some/html/here>"); If one tries to delete the "webView" object during the load, it is deleted successfuly (its 'pageClient' reference is also deleted) *BUT* the object "page" itself is not deleted since it is *not* a children of "webView". Ongoing painting actions can still try to access (the now invalid) pageClient pointer right after QGWV deletion. see both attached backtraces...
Created attachment 41218 [details] bt1 of the crash
Created attachment 41219 [details] bt2 of the crash
Created attachment 41220 [details] patch 0.1 + autotests
err ... many typos. in > Suppose the following situation: > > 1) a QGWV object is create. > 2) a custom QWebPage-devivated class is create and set as QGWBV's page. read: 1) a QGWV object is created. 2) a custom QWebPage-derivated class is create and set as QGWV's page.
I would be happy with a less fragile test. loadFinished must be guranteed to fire... we should wait for it otherwise we end up in the QSKIP (this platform is too low) mess.
Created attachment 41224 [details] landed in r49634 - patch 0.2 + autotests using waitForSignal instead of QTRY_COMPARE, per zecke's suggestion.
Comment on attachment 41224 [details] landed in r49634 - patch 0.2 + autotests Looks good, a few comments to fix when you land: > public: > - WebPage(QWidget* parent = 0) : QWebPage(parent) > + WebPage(QObject* parent = 0) : QWebPage(parent) > { Leave out in this patch, but rs on doing it in a followup. > + > +// Task 160192 Cut this > +/** > + * Starts an event loop that runs until the given signal is received. > + Optionally the event loop And add star here ;)
thx tor. landed in r49634
Comment on attachment 41224 [details] landed in r49634 - patch 0.2 + autotests clearing r+ flag since patch has landed.