Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.11
-
None
Description
The example attached reproduces the problem (it looks a bit contrived but reproduces the problem we're having in our application). We have a QStackedLayout containing a widget on top, and a QQuickWidget with a Scene3D element behind it. The Scene3D has an input aspect. At some point, render() is called on the top widget. When the application is closed without the QQuickWidget being shown, there's a segmentation fault.
It looks like the segfault happens because calling render() on the top widget triggers a render() on the QQuickWidget; this starts the rendering loop, QInputSettings::setEventSource is eventually called, and a QPropertyUpdatedChange is created, with "eventSource" as property name and a pointer to the Scene3DItem as value. When the application is closed, the property change is delivered to the InputSettings backend node, but at this point the Scene3DItem was already destroyed, causing the crash.
The crash is 100% reproducible in this sample, but this looks like a race that could also happen in a more "normal" application.