Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.2
-
None
-
-
89bb3c97eee9cd4bf9fb536f024715e606e49ae0 (qt/qtwebengine/dev) 1dd823a9a9a0ca34a7c359c45689b50a1350602e (qt/qtwebengine/6.2) 16851d3c91972f9f13c2979bfe6116ac8c9e2481 (qt/qtwebengine/6.2.2) 402f5a4a78347ed56be59396a3e3877ea9791f47 (qt/qtwebengine/5.15)
Description
Some times the QAccessible::uniqueId will be called by null input, for example in:
QQuickWebEngineViewPrivate::widgetChanged()
So calling the QAccessible::uniqueId with null:
QAccessible::Id QAccessible::uniqueId(QAccessibleInterface *iface) { Id id = QAccessibleCache::instance()->idForInterface(iface); if (!id) id = registerAccessibleInterface(iface); return id; }
the idForInterface method will try to get interface from a QHash that will return 0 when there is no such item inside the hash, so the registerAccessibleInterface will be called with a null argument.
And then BAM! it will cause a crash!
QAccessible::Id QAccessible::registerAccessibleInterface(QAccessibleInterface *iface)
{
Q_ASSERT(iface);
return QAccessibleCache::instance()->insert(iface->object(), iface);
}