Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.8
-
None
Description
It says in here that `Note: Disconnecting all signal-slot connections will also disconnect the QObject::destroyed() signal if it is connected. Doing so can adversely affect classes that rely on this signal for cleaning up resources. It is recommended to disconnect only the specific signals that were connected by application code.`
However, disconnecting all should not result in crashes like in the attached project.
To reproduce:
- Open and run the attached application
- press the button in mainwindow
- close the empty dialog
- press the button again
- CRASH!
The crash is due to QAccessibleCache's over-reliance on `QObject::destroyed`. I'm not exactly sure in which qt version this crash first appears, but it did not appear in Qt 6.1.3, but appeared in Qt 6.8.1.
NB! In the project I've used placement new merely to make the crash deterministic. Without placement new the crash might take more clicks to get the system to reuse the same memory address for the QDialog, which is needed for the crash to occur.