Why does even a basic QTreeWidget app crash on QTreeWidget::clear() ???
-
The problem I am facing is not limited to the simple QTreeWidget example I posted, but with every standard Qt example, always at some delete operation.
I have tried installing the latest Windows Kit 10 release (10.0.16299.15) with the new cdb.exe, whose version is wrongly reported by Qt Creator (when mouse hovering over the file, the tooltip shows the correct version, but the text field of Qt Creator remains wrong, even after restart of PC). The new Kit release does not solve the problem.
Now, I am installing Qt 5.9.2, which as you know, takes some time... even at 1.5 MB/s ...
-
The problem I am facing is not limited to the simple QTreeWidget example I posted, but with every standard Qt example, always at some delete operation.
I have tried installing the latest Windows Kit 10 release (10.0.16299.15) with the new cdb.exe, whose version is wrongly reported by Qt Creator (when mouse hovering over the file, the tooltip shows the correct version, but the text field of Qt Creator remains wrong, even after restart of PC). The new Kit release does not solve the problem.
Now, I am installing Qt 5.9.2, which as you know, takes some time... even at 1.5 MB/s ...
-
Are you building the (debug) Qt from the sources yourself?
-
What happens if you run the debug-built app outside of Qt Creator/debugger, e.g. from command-line?
-
-
-
Are you building the (debug) Qt from the sources yourself?
-
What happens if you run the debug-built app outside of Qt Creator/debugger, e.g. from command-line?
@JNBarchan
I am not using a self-built version of Qt Creator, just using the official windows installer.I just now uninstalled all of Qt, and installed 5.9.2... And of course, I get errors which I didn't have before:
D:\Qt\5.9.2\msvc2015_64\include\QtCore\qt_windows.h:64: error: C1083: Cannot open include file: 'windows.h': No such file or directory
Qt is just great...
-
-
@JNBarchan
I am not using a self-built version of Qt Creator, just using the official windows installer.I just now uninstalled all of Qt, and installed 5.9.2... And of course, I get errors which I didn't have before:
D:\Qt\5.9.2\msvc2015_64\include\QtCore\qt_windows.h:64: error: C1083: Cannot open include file: 'windows.h': No such file or directory
Qt is just great...
@Diracsbracket said in Why does even a basic QTreeWidget app crash on QTreeWidget::clear() ???:
Qt is just great...
It is.
After installing Qt did you delete the build folder, run qmake and rebuild? -
@Diracsbracket said in Why does even a basic QTreeWidget app crash on QTreeWidget::clear() ???:
Qt is just great...
It is.
After installing Qt did you delete the build folder, run qmake and rebuild?@jsulm Yes...
-
I finally got the debugging working again. I have no solution, because I still don't know what the cause of my problems was, but I reinstalled Qt 5.9.1, uninstalled VS2015 and reinstalled it. And now debugging works again. Moreover, I no longer need have the following lines in my .pro files:
INCLUDEPATH += "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt" LIBS += "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64\ucrt.lib" LIBS += "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64\ucrtd.lib"
I needed to add those lines in every .pro file of my earlier install, otherwise none of the Qt examples nor my program would build. That probably was already an indication that there was something wrong with my installation and why I couldn't debug. Now, my little program (and I guess all the Qt examples too) builds without those lines.
Cheers to all who tried to help!
-
I finally got the debugging working again. I have no solution, because I still don't know what the cause of my problems was, but I reinstalled Qt 5.9.1, uninstalled VS2015 and reinstalled it. And now debugging works again. Moreover, I no longer need have the following lines in my .pro files:
INCLUDEPATH += "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt" LIBS += "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64\ucrt.lib" LIBS += "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64\ucrtd.lib"
I needed to add those lines in every .pro file of my earlier install, otherwise none of the Qt examples nor my program would build. That probably was already an indication that there was something wrong with my installation and why I couldn't debug. Now, my little program (and I guess all the Qt examples too) builds without those lines.
Cheers to all who tried to help!
@Diracsbracket said in Why does even a basic QTreeWidget app crash on QTreeWidget::clear() ???:
I finally got the debugging working again. I have no solution, because I still don't know what the cause of my problems was,
If you played with the versions of the C runtime libraries, but did not think to mention it, do you not think that might be related to why it falls over in
delete
callingcalloc
callingHeapValidate
?I wouldn't read much into it crashing until you are 100% sure your libraries --- Debug-or-not --- are definitely all correct & consistent across everything you're doing. Personally.
-
I finally got the debugging working again. I have no solution, because I still don't know what the cause of my problems was, but I reinstalled Qt 5.9.1, uninstalled VS2015 and reinstalled it. And now debugging works again. Moreover, I no longer need have the following lines in my .pro files:
INCLUDEPATH += "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt" LIBS += "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64\ucrt.lib" LIBS += "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64\ucrtd.lib"
I needed to add those lines in every .pro file of my earlier install, otherwise none of the Qt examples nor my program would build. That probably was already an indication that there was something wrong with my installation and why I couldn't debug. Now, my little program (and I guess all the Qt examples too) builds without those lines.
Cheers to all who tried to help!
@Diracsbracket said in Why does even a basic QTreeWidget app crash on QTreeWidget::clear() ???:
I finally got the debugging working again. I have no solution, because I still don't know what the cause of my problems was, but I reinstalled Qt 5.9.1, uninstalled VS2015 and reinstalled it. And now debugging works again. Moreover, I no longer need have the following lines in my .pro files:
INCLUDEPATH += "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt" LIBS += "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64\ucrt.lib" LIBS += "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64\ucrtd.lib"
I needed to add those lines in every .pro file of my earlier install, otherwise none of the Qt examples nor my program would build. That probably was already an indication that there was something wrong with my installation and why I couldn't debug. Now, my little program (and I guess all the Qt examples too) builds without those lines.
Cheers to all who tried to help!
Lol this would have been great to know at the beginning. You did something very wrong with your environment or install if you had to do this. And of course you were then mixing C runtimes which of course is not ok, as you found out. I'm surprised all you did was crash on delete to be honest. It should have been much worse.
Oh well, you learned something which is the whole point of these forums. :) Glad you got it fixed.
-
@Diracsbracket said in Why does even a basic QTreeWidget app crash on QTreeWidget::clear() ???:
I finally got the debugging working again. I have no solution, because I still don't know what the cause of my problems was,
If you played with the versions of the C runtime libraries, but did not think to mention it, do you not think that might be related to why it falls over in
delete
callingcalloc
callingHeapValidate
?I wouldn't read much into it crashing until you are 100% sure your libraries --- Debug-or-not --- are definitely all correct & consistent across everything you're doing. Personally.
@JNBarchan said in Why does even a basic QTreeWidget app crash on QTreeWidget::clear() ???:
If you played with the versions of the C runtime libraries, but did not think to mention it, do you not think that might be related to why it falls over in delete calling calloc calling HeapValidate?
I added those lines because after installing Qt Creator and selecting the auto-detected compilers etc..., it would not build because of some crt header file not being found. A proposed solution I found on the web was to add those lines in the .pro file, which seemed to work, at least for the release builds. That's why.
-
@JNBarchan said in Why does even a basic QTreeWidget app crash on QTreeWidget::clear() ???:
If you played with the versions of the C runtime libraries, but did not think to mention it, do you not think that might be related to why it falls over in delete calling calloc calling HeapValidate?
I added those lines because after installing Qt Creator and selecting the auto-detected compilers etc..., it would not build because of some crt header file not being found. A proposed solution I found on the web was to add those lines in the .pro file, which seemed to work, at least for the release builds. That's why.
@Diracsbracket
I don't dispute that you (felt you) had whatever reason to add the stuff. But as @ambershark & I observed, when you come reporting a heap crash in a post entitled "Why does even a basic QTreeWidget app crash on QTreeWidget::clear() ???", you have to let us know that your "basic QTreeWidget" was generated using a system where you had to tinker with compiler/linker settings from the default as that is 100% germane....