Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.2, 6.0.0
-
None
-
Windows
Description
If a child dialog, which is being destroyed by parent's destructor, attempts to show its parent dialog during its destructor, then the application crashes.
I've created a simple example application to demonstrate - click the "Create Dialog 1" button, then click "Open Dialog 2" then "ok" and "ok" to get back to the main window -> application crashes.
I fully realise this is a very convoluted demo to create the crash and no real programmer would write code like this, but I have encountered a real-world crash in our application which was much more reasonable (albeit still not the best code in the world, but not completely crazy either).
Suspect problem will occur on all platforms (have only tried Windows). Only have Qt 5.15.2 and 6.0.0 available to me,
I wonder if the fix would be as simple as adding a check for data.in_destructor to ensurePolished() - or maybe to all QWidget methods that access the children member.