Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
5.15.0
-
None
-
Qt 5.15.0 Commercial
Windows 10, OS build 19041.450
MSVC 2019 with CL version 19.26.28806 for x64
QMAKE/jom under Qt Creator 4.12.1 (as supplied with the commercial installer).
-
-
b619f2a26ea2ab56e18a3f9a8b635f96fc479563
Description
I am seeing a repeatable crash before entering main with debug builds against a static build of Qt 5.15.
Software versions:
- Qt 5.15.0 Commercial
- Windows 10, OS build 19041.450
- MSVC 2019 with CL version 19.26.28806 for x64
- QMAKE/jom under Qt Creator 4.12.1 (as supplied with the commercial installer).
I am using the following configure line to build Qt:
configure -commercial -debug-and-release -release -static -static-runtime -optimize-size -schannel -qt-zlib -qt-libpng -qt-libjpeg -nomake examples -prefix C:\opt\Qt-5.15.0-static\
Here's my qmake.pro file:
TEMPLATE = app QT += core CONFIG += c++14 SOURCES = main.cpp TARGET = static_init_issue
And here is my main:
#include <QtPlugin> int main() { return 0; }
The crash occurs in QArrayData::deallocate after calling qRegisterStaticPluginFunction to initialize QWindowsVistaStylePlugin (under static initialization in Windows initterm function).
I note that the call to staticPluginList in qRegisterStaticPluginFunction returns a null pointer and that this function is called before anything in in the macro Q_GLOBAL_STATIC(StaticPluginList, staticPluginList) is called. The issue appears to be related to order of static initialization across compilation units.
Attachments
Issue Links
- duplicates
-
QTBUG-71548 Debug Assertion Failed! error when trying to compile qttranslations
- Closed
- relates to
-
QTBUG-59721 QString crash attempt to free() shared_null static variable
- Closed