Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.15, 6.5.0
-
None
-
-
048a68c1e (dev), 8d2bdc9cd (6.5)
Description
How to reproduce:
- Open two QSqlDatabase in separate threads in parallel.
What happens:
- On shutdown when QApplication is freed, there is an endless loop.
I found following cause:
- When two SQL connections are created in parallel, QSqlDatabasePrivate::driverDict() is called twice in parallel. This will call qAddPostRoutine(cleanDriverDict); twice and cleanDriverDict will appear twice in the PostRoutines.
- During shutdown, the second cleanDriverDict calls driverDict() again, which reinitializes qDriverDictInit and adds another qAddPostRoutine. So the cleanDriverDict will be called and added again and again.