I've been experiencing problems with QtCreator lately. I had to reinstall my system after hdd failure, previously was using QtCreator 2.8.1 without much problems. I have GCC (for ARM) 4.7.1, gdb 7.5.
Today I've installed latest stable 3.0.1 but debugging didn't work properly - locals window was empty, debugger was complaining about missing python binascii module. I've tried find solution for this without success. Then I've tried 3.1.81 but this one was was complaining about missing _struct module and debugging didn't work at all.
Ok, it was time to rollback back to 2.8.1 which I knew worked previously. This time, QtCreator just crashed before launching the app on remote device with "[118892.853020] qtcreator: segfault at 0 ip 00007f832bdeb2c7 sp 00007fff508a6660 error 4 in libQtcSsh.so.1.0.0[7f832bca4000+21b000]". Tried to rollback even more to 2.8.0 but that one crashes as well, just sooner.
Any ideas how to get QtCreator working again?
Hi and welcome to devnet,
did you only install the QtCreator - not the complete Qt framework?
What's the system you are working with?
Before installing e.g. 2.8.1, did you uninstall 3.0.1?
The Qt libraries I'm building against are part of the ARM toolchain I'm using (version 4.8.2). I've also got another 4.8.2 installed from deb repositories (for x86_64) but those are not being used in my project. I'm using 64bit Debian.
The QtCreator 3 was installed as part of whole framework (with Qt 5.2). I've uninstalled it but it might have been after I've installed the 2.8.1. IMHO this shouldn't make any difference as the libqtcssh is separate for each QtCreator.
With your 64 Debian it should work perfectly.
I had the problem with the missing locals, too, but that was solved with 3.0.1.
Well, not for me, I've tried both 3.0.1 and 3.1 and neither of them showed me locals (complaining about missing python modules as mentioned in my original question).
At the moment, I have no idea, but perhaps we should look at the python error messages.
What version of python do you have?
"This doc":https://qt-project.org/doc/qtcreator-3.0/creator-debugger-engines.html#supported-gdb-versions says that gdb does not support python-3 and without python support you need to build "Debugging Helpers Based on C++":https://qt-project.org/doc/qtcreator-3.0/creator-debugging-helpers.html#debugging-helpers-based-on-c
It's using python 2.6. I've added some commands to debugger after it attaches to the device:
&"python import sys\n"
&"python print sys.version_info\n"
~"(2, 6, 6, 'final', 0)\n"
&"python print sys.path\n"
~"['/usr/local/arm_a9/share/gdb/python', '/usr/lib/python26.zip', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux3', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.6']\n"
&"python import binascii\n"
&"Traceback (most recent call last):\n"
&" File "<string>", line 1, in <module>\n"
&"ImportError: No module named binascii\n"
&"Error while executing Python code.\n"
236^error,msg="Error while executing Python code."
binascii is a builtin module of python.
But I'm not sure if it is true for ARM.
What if you will switch to C++ debug helper.
Hm, you might be right. So the GDB was built against specific version of Python. That one has then to be used with GDB, correct?
I do have the correct python but I don't know how to tell QtCreator to use it... Any ideas?