Crash in QVariantMap/QVariantList destructor
-
Hallo folks,
I recently built up a structure using QVariantMaps and QVariantLists to convert it to JSON afterwards.
But I experienced a strange behaviour when leaving the function and the destructor of this structure has been called.It looked like this:
@QVariantMap outerMap;
QVariantList outerList;
QVariantMap innerMap;
QVariantList innerList;innerList.append("foo");
innerMap.insert("test", innerList);
outerList.append(innerMap);
outerMap.insert("test1", outerList);@If I replace the innerList with another QVariantMap or anything else, it workes fine. Is this a problem on my side or is this a bug in Qt? I also tried to clear all QVariantMaps and QVariantLists myself starting from the inner to outer before I delete them, but the same problems comes up..
Any ideas? ;)
-
Hmm,
I am using VisualStudio to compile my project and to reproduce the crash.
If I try the same in QtCreator, everything works fine.
Both are using Qt 4.6, what could be the difference? -
It is using MSVC++ Toolchain.
The only difference in the build process is that QtCreator uses JOM and MSVC is configured to use JAM, dont know if this matters. -
I am not quite sure..
I told JAM where to find the Qt libs for MSVC and always use the debug libs.
How can I check if the linked libs are correct? -
Mixing wrong DLLs can lead to that effect.
The "Dependency Walker":http://www.dependencywalker.com/ shows you the loaded (or missing) DLLs. Be aware, that it shows different results than using it from within the IDE, as the latter may have manipulated the search PATH.