Kubuntu 22.04 - Qt Creator - The GDB process terminated
-
I have installed Qt Creator 7.0.1 on a Kubuntu 22.04 and I think the Qt Library was Qt 5.15.something.
I used the online installer:
sudo ./qt-unified-linux-x64-4.3.0-1-online.runIt installed to /opt/Qt
When I compile a debug version of my projects and I try to debug it by pressing F5, it almost immediately crashes with a small messagebox that saysmsg=
The GDB process terminatedI tried making a new Qt Project with an almost no code. Same problem.
I installed Kubuntu 22.04 in VirtualBox.
I installed the offline version. First I installed
sudo ./qt-opensource-linux-x64-5.9.9.run
It installs to /opt/Qt.5.9.9 I believe.Then, I run the offline installer for Qt Creator
sudo ./qt-creator-opensource-linux-x86_64-4.14.2.run
It installs to /opt/qtcreator I believe.Then I run
sudo ./qtcreator
and I let Qt Creator know where the Qt Library is.Anyway, the same problem is present when I try to debug a project.
msg=
The GDB process terminatedAm I the only one having this problem?
-
I have installed Qt Creator 7.0.1 on a Kubuntu 22.04 and I think the Qt Library was Qt 5.15.something.
I used the online installer:
sudo ./qt-unified-linux-x64-4.3.0-1-online.runIt installed to /opt/Qt
When I compile a debug version of my projects and I try to debug it by pressing F5, it almost immediately crashes with a small messagebox that saysmsg=
The GDB process terminatedI tried making a new Qt Project with an almost no code. Same problem.
I installed Kubuntu 22.04 in VirtualBox.
I installed the offline version. First I installed
sudo ./qt-opensource-linux-x64-5.9.9.run
It installs to /opt/Qt.5.9.9 I believe.Then, I run the offline installer for Qt Creator
sudo ./qt-creator-opensource-linux-x86_64-4.14.2.run
It installs to /opt/qtcreator I believe.Then I run
sudo ./qtcreator
and I let Qt Creator know where the Qt Library is.Anyway, the same problem is present when I try to debug a project.
msg=
The GDB process terminatedAm I the only one having this problem?
@stretchthebits
Observations FWIW.sudo ./qt-opensource-linux-x64-5.9.9.run
It installs to /opt/Qt.5.9.9 I believe.
That's a pretty old version for 2022.
Then I run
sudo ./qtcreator
I would not be expecting to run Qt Creator as root, rather as your normal user.
Neither may affect Creator<->gdb issues.
First thing is to verify how gdb behaves debugging your program quite outside of Qt Creator. Try it. Works or generates some error?
-
I use Qt 5.9.9 since I found a way to bypass another problem.
I call it the mysterious __cxa_throw_bad_array_new_length problem.However, while I am debugging, I can use any version of Qt.
I only install as admin so that Qt Creator gets installed system wide instead of inside my user folder.
The Eclipse program has that problem. You can’t install system wide.
That is why I use Qt Creator.I tried running with gdb from the command line. It seems fine.
-
I use Qt 5.9.9 since I found a way to bypass another problem.
I call it the mysterious __cxa_throw_bad_array_new_length problem.However, while I am debugging, I can use any version of Qt.
I only install as admin so that Qt Creator gets installed system wide instead of inside my user folder.
The Eclipse program has that problem. You can’t install system wide.
That is why I use Qt Creator.I tried running with gdb from the command line. It seems fine.
@stretchthebits said in Kubuntu 22.04 - Qt Creator - The GDB process terminated:
This is a "usual" error message when some program was compiled using Qt version X but was running with Qt version Y.
Make sure the Qt Creator 7 and your application compiled for 5.15/9/whatever are using their own versions of Qt, not contaminating each other.
You could try a non-Qt program of
int main() { return 0; }. Assuming that also fails on debugging it's not your application's version of Qt which is at issue. Just the interface between Qt 7 and gdb.The obvious suggestion is to downgrade the new Creator v7 for a while, and try again with a later version at a future date.
-
@stretchthebits said in Kubuntu 22.04 - Qt Creator - The GDB process terminated:
This is a "usual" error message when some program was compiled using Qt version X but was running with Qt version Y.
Make sure the Qt Creator 7 and your application compiled for 5.15/9/whatever are using their own versions of Qt, not contaminating each other.
You could try a non-Qt program of
int main() { return 0; }. Assuming that also fails on debugging it's not your application's version of Qt which is at issue. Just the interface between Qt 7 and gdb.The obvious suggestion is to downgrade the new Creator v7 for a while, and try again with a later version at a future date.
@JonB said in Kubuntu 22.04 - Qt Creator - The GDB process terminated:
@stretchthebits said in Kubuntu 22.04 - Qt Creator - The GDB process terminated:
This is a "usual" error message when some program was compiled using Qt version X but was running with Qt version Y.
Make sure the Qt Creator 7 and your application compiled for 5.15/9/whatever are using their own versions of Qt, not contaminating each other.
I'm not sure how to do that. I just know how to install Visual Studio, open my project, run the debugger until my code is good enough. I just test it on a clean Windows and if a DLL is missing, Windows tells me what I need to ship with my EXE.
-
I'm running Ubuntu 22.04 as well and had the same issue with gdb process crashing in QtCreator. You can open the Debugger Log (View > Views > Debugger Log) to get more information about why it is crashing. In my case it was outputting:
/build/gdb-wIRHdd/gdb-12.0.90/gdb/value.c:1731: internal-error: value_copy: Assertion `arg->contents != nullptr' failed. A problem internal to GDB has been detected, further debugging may prove unreliable.A quick google search reveals that this is a bug in gdb 12.0.90 https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1971409
A solution for that can be found here: https://github.com/microsoft/vscode-cpptools/issues/103#issuecomment-1151217772
- compile gdb-12.1 from source
or - Install the ubuntu 22.10 kinetic build which does not seem to add additional dependencies from here: https://launchpad.net/ubuntu/+source/gdb/12.1-0ubuntu1/+build/23606376
wget https://launchpad.net/ubuntu/+source/gdb/12.1-0ubuntu1/+build/23606376/+files/gdb_12.1-0ubuntu1_amd64.deb sudo apt install ./gdb_12.1-0ubuntu1_amd64.deb - compile gdb-12.1 from source
-
I'm running Ubuntu 22.04 as well and had the same issue with gdb process crashing in QtCreator. You can open the Debugger Log (View > Views > Debugger Log) to get more information about why it is crashing. In my case it was outputting:
/build/gdb-wIRHdd/gdb-12.0.90/gdb/value.c:1731: internal-error: value_copy: Assertion `arg->contents != nullptr' failed. A problem internal to GDB has been detected, further debugging may prove unreliable.A quick google search reveals that this is a bug in gdb 12.0.90 https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1971409
A solution for that can be found here: https://github.com/microsoft/vscode-cpptools/issues/103#issuecomment-1151217772
- compile gdb-12.1 from source
or - Install the ubuntu 22.10 kinetic build which does not seem to add additional dependencies from here: https://launchpad.net/ubuntu/+source/gdb/12.1-0ubuntu1/+build/23606376
wget https://launchpad.net/ubuntu/+source/gdb/12.1-0ubuntu1/+build/23606376/+files/gdb_12.1-0ubuntu1_amd64.deb sudo apt install ./gdb_12.1-0ubuntu1_amd64.deb@Henning-G Henning, you are a genius!
That worked. I tried it on my Kubuntu 22.04.I used this method:
wget https://launchpad.net/ubuntu/+source/gdb/12.1-0ubuntu1/+build/23606376/+files/gdb_12.1-0ubuntu1_amd64.deb sudo apt install ./gdb_12.1-0ubuntu1_amd64.debSo, it looks like
gdb --version
says 12.1 now and debugging works now. - compile gdb-12.1 from source