Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.0 Beta
-
None
-
Windows 10 desktop Run Time and any windows phone
MSVC 2013
-
-
5b62a5e7aabcc818408f2fe28b9760082f474def 7fdfaad43f75bab9d701b0b55c13570d2140fde4
Description
Write qputenv before application creation on your main and run the app.
... int main(int argc, char *argv[]) { qputenv("MY_ENV_VARIABLE", "1"); QGuiApplication app(argc, argv); ...
Stack trace
> Qt5Cored.dll!qgetenv(const char * varName) Line 3200 C++ Qt5Cored.dll!qt_create_qhash_seed() Line 226 C++ Qt5Cored.dll!qt_initialize_qhash_seed() Line 288 C++ Qt5Cored.dll!QHashData::detach_helper(void (QHashData::Node *, void *) * node_duplicate, void (QHashData::Node *) * node_delete, int nodeSize, int nodeAlign) Line 469 C++ Qt5Cored.dll!QHash<QByteArray,QByteArray>::detach_helper() Line 567 C++ Qt5Cored.dll!QHash<QByteArray,QByteArray>::detach() Line 267 C++ Qt5Cored.dll!QHash<QByteArray,QByteArray>::operator[](const QByteArray & akey) Line 726 C++ Qt5Cored.dll!qt_winrt__putenv_s(const char * varName, const char * value) Line 85 C++ Qt5Cored.dll!_putenv_s(const char * p1, const char * p2) Line 130 C++ Qt5Cored.dll!qputenv(const char * varName, const QByteArray & value) Line 3347 C++ TestBench.exe!main(int argc, char * * argv) Line 7 C++
Calling qputenv leads to qgetenv call when qhash does not have random seed because qt_create_qhash_seed function tries to get it from qgetenv("QT_HASH_SEED");