Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.1
-
None
-
Windows XP SP3 32 bit , Visual C++ 2010 debug/release
-
0fa0608f707306cb34a9ca91952cebbac25065a5
Description
Suppose having:
Main.exe -> LoadLibrary (GUI.dll)
GUI.dll -> imports QtCore.dll
When GUI.dll (and consequently QtCore) is dynamically loaded, the process crashes on the first warning/error at qlogging.cpp:1289
This is because the thread local variable "msgHandlerGrabbed" is not correctly allocated by the system.
See http://msdn.microsoft.com/en-us/library/2s9wt68x.aspx
"On Windows operating systems before Windows Vista, __declspec( thread ) has some limitations. If a DLL declares any data or object as __declspec( thread ), it can cause a protection fault if dynamically loaded. ...."
This is exactly what it happens.
By directly importing Main.exe -> QtCore.dll
it works.
So at the moment, Qt cannot be dynamically loaded in Windows XP.
Attachments
For Gerrit Dashboard: QTBUG-41008 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
93425,2 | Logging: Remove use of _declspec(thread) | 5.3 | qt/qtbase | Status: MERGED | +2 | 0 |