- 
    Bug 
- 
    Resolution: Done
- 
    P2: Important 
- 
    5.8.0
- 
    Windows
- 
        c0d93d408d4eafcaab06d455b8c3ce1e2c21f8db (qtactiveqt/5.9, 21.2.2017, 5.9). 2fbd30b1de6abcb7b660083dde120c8b03a3abbc (qtactiveqt/5.6, 27.3.2017, 5.6.3)
If parameters() method is called for a QApplication that is created by QAxServerBase, application crashes due to accessing a reference to the passed argc argument that went out of scope.
Culprit code is located at QAxServerBase.cpp, QClassFactory::CreateInstanceHelper() method:
if (!qApp) { qax_ownQApp = true; int argc = 0; new QApplication(argc, 0); }
QCoreApplication seems to save reference to this passed argc argument rather than making a copy of it, even in this case.
- relates to
- 
                    QTBUG-58919 [Windows]: When a library using QCoreApplication is unloaded and then loaded again it can cause a crash -         
- Closed
 
-         
| For Gerrit Dashboard: QTBUG-59047 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 186151,2 | QClassFactory::CreateInstanceHelper(): make variable argc static | 5.9 | qt/qtactiveqt | Status: MERGED | +2 | 0 | 
| 189349,2 | QClassFactory::CreateInstanceHelper(): make variable argc static | 5.6 | qt/qtactiveqt | Status: MERGED | +2 | 0 |