Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Kubuntu 22.04 - Qt Creator - The GDB process terminated
Forum Updated to NodeBB v4.3 + New Features

Kubuntu 22.04 - Qt Creator - The GDB process terminated

Scheduled Pinned Locked Moved Solved Installation and Deployment
7 Posts 3 Posters 2.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stretchthebits
    wrote on last edited by
    #1

    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.run

    It 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 says

    msg=
    The GDB process terminated

    I 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 terminated

    Am I the only one having this problem?

    JonBJ 1 Reply Last reply
    0
    • S stretchthebits

      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.run

      It 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 says

      msg=
      The GDB process terminated

      I 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 terminated

      Am I the only one having this problem?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @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?

      1 Reply Last reply
      1
      • S Offline
        S Offline
        stretchthebits
        wrote on last edited by
        #3

        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.

        https://www.linuxquestions.org/questions/programming-9/the-mysterious-__cxa_throw_bad_array_new_length-4175686401/

        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.

        JonBJ 1 Reply Last reply
        0
        • S stretchthebits

          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.

          https://www.linuxquestions.org/questions/programming-9/the-mysterious-__cxa_throw_bad_array_new_length-4175686401/

          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.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @stretchthebits said in Kubuntu 22.04 - Qt Creator - The GDB process terminated:

          https://www.linuxquestions.org/questions/programming-9/the-mysterious-__cxa_throw_bad_array_new_length-4175686401/

          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.

          S 1 Reply Last reply
          0
          • JonBJ JonB

            @stretchthebits said in Kubuntu 22.04 - Qt Creator - The GDB process terminated:

            https://www.linuxquestions.org/questions/programming-9/the-mysterious-__cxa_throw_bad_array_new_length-4175686401/

            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.

            S Offline
            S Offline
            stretchthebits
            wrote on last edited by
            #5

            @JonB said in Kubuntu 22.04 - Qt Creator - The GDB process terminated:

            @stretchthebits said in Kubuntu 22.04 - Qt Creator - The GDB process terminated:

            https://www.linuxquestions.org/questions/programming-9/the-mysterious-__cxa_throw_bad_array_new_length-4175686401/

            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.

            1 Reply Last reply
            0
            • H Offline
              H Offline
              Henning G
              wrote on last edited by Henning G
              #6

              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

              1. compile gdb-12.1 from source
                or
              2. 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
              
              S 1 Reply Last reply
              4
              • H Henning G

                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

                1. compile gdb-12.1 from source
                  or
                2. 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
                
                S Offline
                S Offline
                stretchthebits
                wrote on last edited by
                #7

                @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.deb
                

                So, it looks like
                gdb --version
                says 12.1 now and debugging works now.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved