This is how it looks with debug symbols:
#0 QMapData<int, WebCore::InspectorClientQt*>::findNode
(this=this@entry=0x555555b5fb70, akey=@0x7fffffffc510: 8) at
/usr/include/qt5/QtCore/qmap.h:128
#1 0x00007ffff5268573 in remove (akey=@0x7fffffffc510: 8,
this=0x555555bb7d28) at /usr/include/qt5/QtCore/qmap.h:894
#2 WebCore::InspectorServerQt::unregisterClient (this=0x555555bb7d10,
client=client@entry=0x555555dc7990)
at
/var/tmp/portage/dev-qt/qtwebkit-5.5.9999/work/qtwebkit-5.5.9999/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp:116
#3 0x00007ffff5265555 in WebCore::InspectorClientQt::inspectorDestroyed
(this=0x555555dc7990)
at
/var/tmp/portage/dev-qt/qtwebkit-5.5.9999/work/qtwebkit-5.5.9999/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp:156
#4 0x00007ffff620bf75 in
WebCore::InspectorController::inspectedPageDestroyed (this=0x7fffdcbd9dc0)
at
/var/tmp/portage/dev-qt/qtwebkit-5.5.9999/work/qtwebkit-5.5.9999/Source/WebCore/inspector/InspectorController.cpp:203
#5 0x00007ffff56eb906 in WebCore::Page::~Page (this=0x55555605cd70,
__in_chrg=<optimized out>)
at
/var/tmp/portage/dev-qt/qtwebkit-5.5.9999/work/qtwebkit-5.5.9999/Source/WebCore/page/Page.cpp:226
#6 0x00007ffff527ccd5 in QWebPageAdapter::deletePage
(this=this@entry=0x555555ef33b0)
at
/var/tmp/portage/dev-qt/qtwebkit-5.5.9999/work/qtwebkit-5.5.9999/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp:308
#7 0x00007ffff73b72af in QWebPagePrivate::~QWebPagePrivate
(this=0x555555ef33b0, __in_chrg=<optimized out>)
at
/var/tmp/portage/dev-qt/qtwebkit-5.5.9999/work/qtwebkit-5.5.9999/Source/WebKit/qt/WidgetApi/qwebpage.cpp:240
#8 0x00007ffff73b73ef in QWebPagePrivate::~QWebPagePrivate
(this=0x555555ef33b0, __in_chrg=<optimized out>)
at
/var/tmp/portage/dev-qt/qtwebkit-5.5.9999/work/qtwebkit-5.5.9999/Source/WebKit/qt/WidgetApi/qwebpage.cpp:241
#9 0x00007ffff73b56f7 in QWebPage::~QWebPage (this=0x555555ed3f40,
__in_chrg=<optimized out>)
at
/var/tmp/portage/dev-qt/qtwebkit-5.5.9999/work/qtwebkit-5.5.9999/Source/WebKit/qt/WidgetApi/qwebpage.cpp:1443
#10 0x00007ffff73b574f in QWebPage::~QWebPage (this=0x555555ed3f40,
__in_chrg=<optimized out>)
at
/var/tmp/portage/dev-qt/qtwebkit-5.5.9999/work/qtwebkit-5.5.9999/Source/WebKit/qt/WidgetApi/qwebpage.cpp:1444
#11 0x00007ffff44251f0 in QObjectPrivate::deleteChildren
(this=this@entry=0x555555eb6700)
at
/var/tmp/portage/dev-qt/qtcore-5.5.9999/work/qtcore-5.5.9999/src/corelib/kernel/qobject.cpp:1951
#12 0x00007ffff7658f15 in QWidget::~QWidget (this=0x555555ed7fd0,
__in_chrg=<optimized out>)
at
/var/tmp/portage/dev-qt/qtwidgets-5.5.9999/work/qtwidgets-5.5.9999/src/widgets/kernel/qwidget.cpp:1648
#13 0x00005555555ea24c in ~EmbeddedWebView (this=0x555555ed7fd0,
__in_chrg=<optimized out>) at ../../trojita/src/Gui/EmbeddedWebView.h:46
#14 ~SimplePartWidget (this=0x555555ed7fd0, __in_chrg=<optimized out>) at
../../trojita/src/Gui/SimplePartWidget.h:54
#15 Gui::SimplePartWidget::~SimplePartWidget (this=0x555555ed7fd0,
__in_chrg=<optimized out>) at ../../trojita/src/Gui/SimplePartWidget.h:54
...which looks like a nice memory corruption. And this is how it looks in
Valgrind:
==193611== Invalid read of size 8
==193611== at 0x5864470: QWebView::page() const (qwebview.cpp:209)
==193611== by 0x1B88A6: Gui::FindBar::updateHighlight()
(FindBar.cpp:286)
==193611== by 0x1B8F17: Gui::FindBar::setVisible(bool) (FindBar.cpp:164)
==193611== by 0x51F76BC: QWidget::qt_static_metacall(QObject*,
QMetaObject::Call, int, void**) (moc_qwidget.cpp:387)
==193611== by 0x888EB08: QMetaObject::activate(QObject*, int, int,
void**) (qobject.cpp:3718)
==193611== by 0x888F1CB: QObject::destroyed(QObject*)
(moc_qobject.cpp:211)
==193611== by 0x51F3EAB: QWidget::~QWidget() (qwidget.cpp:1619)
==193611== by 0x19E24B: Gui::SimplePartWidget::~SimplePartWidget()
(EmbeddedWebView.h:46)
==193611== by 0x8890267: QObject::event(QEvent*) (qobject.cpp:1237)
==193611== by 0x51F8919: QWidget::event(QEvent*) (qwidget.cpp:9093)
==193611== by 0x586565A: QWebView::event(QEvent*) (qwebview.cpp:731)
==193611== by 0x51A98BB: QApplicationPrivate::notify_helper(QObject*,
QEvent*) (qapplication.cpp:3714)
==193611== Address 0x1228c8f0 is 16 bytes inside a block of size 32 free'd
==193611== at 0x4C29E0C: operator delete(void*)
(vg_replace_malloc.c:480)
==193611== by 0x5863790: QWebView::~QWebView() (qwebview.cpp:199)
==193611== by 0x19E24B: Gui::SimplePartWidget::~SimplePartWidget()
(EmbeddedWebView.h:46)
==193611== by 0x8890267: QObject::event(QEvent*) (qobject.cpp:1237)
==193611== by 0x51F8919: QWidget::event(QEvent*) (qwidget.cpp:9093)
==193611== by 0x586565A: QWebView::event(QEvent*) (qwebview.cpp:731)
==193611== by 0x51A98BB: QApplicationPrivate::notify_helper(QObject*,
QEvent*) (qapplication.cpp:3714)
==193611== by 0x51AF169: QApplication::notify(QObject*, QEvent*)
(qapplication.cpp:3497)
==193611== by 0x88588FC: QCoreApplication::notifyInternal(QObject*,
QEvent*) (qcoreapplication.cpp:963)
==193611== by 0x885C3D3:
QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
(qcoreapplication.h:224)
==193611== by 0x88BDB28: postEventSourceDispatch(_GSource*, int
(*)(void*), void*) (qeventdispatcher_glib.cpp:271)
==193611== by 0xD46B2A8: g_main_context_dispatch (gmain.c:3111)
I don't quite understand this -- there is indeed this thing in our source:
// Automatically hide this FindBar widget when the underlying webview goes
away
connect(m_associatedWebView, SIGNAL(destroyed(QObject*)), this,
SLOT(hide()));
...but the m_associatedWebView is a QPointer, and it is guarded by a
Q_ASSERT within Gui::FindBar::updateHighlight(), so this should be an
assert failure at worst. The QPointer remains valid for some reason,
though...
Patches and help are welcome.
Cheers,
Jan
--
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/