Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator 16.0.0 is crashing when opening cpp files

Qt Creator 16.0.0 is crashing when opening cpp files

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
23 Posts 6 Posters 1.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.
  • M Offline
    M Offline
    mithune0000
    wrote on 10 Apr 2025, 06:01 last edited by mithune0000 4 Oct 2025, 06:01
    #10

    @aha_1980 I might be asking very naive question, please forgive me for that. From gdb did you mean apply any settings in this screen and then run ./qtcreator ? Or can I run using some arguments to qtcreator which will provide debug logs?

    Screenshot From 2025-04-10 11-27-39.png

    1 Reply Last reply
    0
    • A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 10 Apr 2025, 06:03 last edited by aha_1980 4 Oct 2025, 06:05
      #11

      @mithune0000

      No, I meant to run from a terminal gdb /path/to/qtcreator and then let qtcreator run (type run in the gdb console) until it crashes. From there, you can request a stack trace (called backtrace in gdb) which could give some more insight why it is crashing.

      Qt has to stay free or it will die.

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mithune0000
        wrote on 10 Apr 2025, 06:13 last edited by
        #12

        @aha_1980 This is what I have found, does it help ?

        Thread 1 "qtcreator" received signal SIGSEGV, Segmentation fault.
        0x00007ffff69f8d94 in ?? () from /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
        (gdb) backtrace
        #0  0x00007ffff69f8d94 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
        #1  0x00007ffff69fbd25 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
        #2  0x00007ffff6a03428 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
        #3  0x00007ffff5f7d47a in ??? () at /home/mithun/Qt6.8/6.8.2/gcc_64/lib/libQt6DBus.so.6
        #4  0x00007ffff5f80952 in ??? () at /home/mithun/Qt6.8/6.8.2/gcc_64/lib/libQt6DBus.so.6
        #5  0x00007ffff59d1668 in QObject::event(QEvent*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
        #6  0x00007ffff71907a6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
        #7  0x00007ffff597bc32 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
        #8  0x00007ffff597f1ad in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
        #9  0x00007ffff5c584c7 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
        #10 0x00007ffff5710397 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
        #11 0x00007ffff5770dc7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
        #12 0x00007ffff570f8b3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
        #13 0x00007ffff5c57b8e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
        #14 0x00007ffff598830b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
        #15 0x00007ffff59842f6 in QCoreApplication::exec() () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
        #16 0x000000000041034f in ??? ()
        #17 0x00007ffff502a3b8 in __libc_start_call_main (main=main@entry=0x40c490, argc=argc@entry=1, argv=argv@entry=0x7fffffffdb48) at ../sysdeps/nptl/libc_start_call_main.h:58
        #18 0x00007ffff502a47b in __libc_start_main_impl
            (main=0x40c490, argc=1, argv=0x7fffffffdb48, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdb38) at ../csu/libc-start.c:360
        #19 0x0000000000410a0e in ??? ()
        
        C 1 Reply Last reply 10 Apr 2025, 06:34
        0
        • A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 10 Apr 2025, 06:18 last edited by
          #13

          @mithune0000 Yes, that's what I wanted to see. Please create a report at bugreports.qt.io and append this trace.

          Thanks!

          Qt has to stay free or it will die.

          1 Reply Last reply
          0
          • M mithune0000
            10 Apr 2025, 06:13

            @aha_1980 This is what I have found, does it help ?

            Thread 1 "qtcreator" received signal SIGSEGV, Segmentation fault.
            0x00007ffff69f8d94 in ?? () from /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
            (gdb) backtrace
            #0  0x00007ffff69f8d94 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
            #1  0x00007ffff69fbd25 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
            #2  0x00007ffff6a03428 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
            #3  0x00007ffff5f7d47a in ??? () at /home/mithun/Qt6.8/6.8.2/gcc_64/lib/libQt6DBus.so.6
            #4  0x00007ffff5f80952 in ??? () at /home/mithun/Qt6.8/6.8.2/gcc_64/lib/libQt6DBus.so.6
            #5  0x00007ffff59d1668 in QObject::event(QEvent*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
            #6  0x00007ffff71907a6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
            #7  0x00007ffff597bc32 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
            #8  0x00007ffff597f1ad in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
            #9  0x00007ffff5c584c7 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
            #10 0x00007ffff5710397 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
            #11 0x00007ffff5770dc7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
            #12 0x00007ffff570f8b3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
            #13 0x00007ffff5c57b8e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
            #14 0x00007ffff598830b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
            #15 0x00007ffff59842f6 in QCoreApplication::exec() () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
            #16 0x000000000041034f in ??? ()
            #17 0x00007ffff502a3b8 in __libc_start_call_main (main=main@entry=0x40c490, argc=argc@entry=1, argv=argv@entry=0x7fffffffdb48) at ../sysdeps/nptl/libc_start_call_main.h:58
            #18 0x00007ffff502a47b in __libc_start_main_impl
                (main=0x40c490, argc=1, argv=0x7fffffffdb48, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdb38) at ../csu/libc-start.c:360
            #19 0x0000000000410a0e in ??? ()
            
            C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 10 Apr 2025, 06:34 last edited by
            #14

            @mithune0000 said in Qt Creator 16.0.0 is crashing when opening cpp files:

            #2 0x00007ffff6a03428 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
            #3 0x00007ffff5f7d47a in ??? () at /home/mithun/Qt6.8/6.8.2/gcc_64/lib/libQt6DBus.so.6

            As you can see there is a mixture of different Qt versions. Fix your LD_LIBRARY_PATH so that te correct (Qt6.9) Qt libs are always loaded.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            3
            • M Offline
              M Offline
              mithune0000
              wrote on 10 Apr 2025, 06:35 last edited by
              #15

              Few things I observed in the stack trace -

              1. From Qt6.9 its going and running libraries from Qt6.8 may be because I have env vars set in ~/.zshrc
              #3  0x00007ffff5f7d47a in ??? () at /home/mithun/Qt6.8/6.8.2/gcc_64/lib/libQt6DBus.so.6
              #4  0x00007ffff5f80952 in ??? () at /home/mithun/Qt6.8/6.8.2/gcc_64/lib/libQt6DBus.so.6
              

              ENV vars

              export PATH=$PATH:/home/mithun/Qt6.8/6.8.2/gcc_64/bin
              export CMAKE_PREFIX_PATH=/home/mithun/Qt6.8/6.8.2/gcc_64:$CMAKE_PREFIX_PATH
              export LD_LIBRARY_PATH=/home/mithun/Qt6.8/6.8.2/gcc_64/lib:$LD_LIBRARY_PATH
              export QT_PLUGIN_PATH=/home/mithun/Qt6.8/6.8.2/gcc_64/plugins
              export QML2_IMPORT_PATH=/home/mithun/Qt6.8/6.8.2/gcc_64/qml
              

              Now, I changed the env vars to point to Qt6.9 and tried running gdb ./qtcreator, then I am getting following error /home/mithun/Qt6.9/Tools/QtCreator/bin/qtcreator: /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6: version 'Qt_6.9' not found (required by /home/mithun/Qt6.9/6.9.0/gcc_64/lib/libQt6DBus.so.6)

              export PATH=$PATH:/home/mithun/Qt6.9/6.9.0/gcc_64/bin
              export CMAKE_PREFIX_PATH=/home/mithun/Qt6.9/6.9.0/gcc_64:$CMAKE_PREFIX_PATH
              export LD_LIBRARY_PATH=/home/mithun/Qt6.9/6.9.0/gcc_64/lib:$LD_LIBRARY_PATH
              export QT_PLUGIN_PATH=/home/mithun/Qt6.9/6.9.0/gcc_64/plugins
              export QML2_IMPORT_PATH=/home/mithun/Qt6.9/6.9.0/gcc_64/qml
              
              1 Reply Last reply
              0
              • C Offline
                C Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on 10 Apr 2025, 06:41 last edited by Christian Ehrlicher 4 Oct 2025, 06:45
                #16

                Don't set any LD_LIBRARY_PATH globally - you must not mix up different Qt versions or installations and it only makes trouble (as you can see).

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                3
                • M Offline
                  M Offline
                  mithune0000
                  wrote on 10 Apr 2025, 06:55 last edited by
                  #17

                  @Christian-Ehrlicher I tried few options -

                  • Remove LD_LIBRARY_PATH, source zshrc and run qt creator.

                  • Remove all the envs related to Qt, source zshrc and run

                  Still getting the same error /home/mithun/Qt6.9/Tools/QtCreator/bin/qtcreator: /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6: version 'Qt_6.9' not found (required by /home/mithun/Qt6.9/6.9.0/gcc_64/lib/libQt6DBus.so.6)

                  Can it happen that during Qt installation, these path are set and now removing from zshrc is not taking the effect ?

                  1 Reply Last reply
                  0
                  • Z Offline
                    Z Offline
                    ziller
                    wrote on 10 Apr 2025, 08:17 last edited by
                    #18

                    You have to either close and reopen the terminal to make any removal of environment variables from zshrc effective, or need to "unset LD_LIBRARY_PATH" in that terminal/shell manually.

                    1 Reply Last reply
                    1
                    • M Offline
                      M Offline
                      mithune0000
                      wrote on 10 Apr 2025, 12:26 last edited by
                      #19

                      Even after fixing the LD_LIBRARY_PATH, its crashing

                      Thread 1 "qtcreator" received signal SIGSEGV, Segmentation fault.
                      0x00007ffff69f8d94 in ?? () from /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
                      (gdb) backtrace
                      #0  0x00007ffff69f8d94 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
                      #1  0x00007ffff69fbd25 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
                      #2  0x00007ffff6a03428 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
                      #3  0x00007ffff5f7d47a in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6DBus.so.6
                      #4  0x00007ffff5f80952 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6DBus.so.6
                      #5  0x00007ffff59d1668 in QObject::event(QEvent*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
                      #6  0x00007ffff71907a6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
                      #7  0x00007ffff597bc32 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
                      #8  0x00007ffff597f1ad in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
                      #9  0x00007ffff5c584c7 in ??? () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
                      #10 0x00007ffff5710397 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
                      #11 0x00007ffff5770dc7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
                      #12 0x00007ffff570f8b3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
                      #13 0x00007ffff5c57b8e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
                      #14 0x00007ffff598830b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
                      #15 0x00007ffff59842f6 in QCoreApplication::exec() () at /home/mithun/Qt6.9/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
                      #16 0x000000000041034f in ??? ()
                      #17 0x00007ffff502a3b8 in __libc_start_call_main (main=main@entry=0x40c490, argc=argc@entry=1, argv=argv@entry=0x7fffffffdc98) at ../sysdeps/nptl/libc_start_call_main.h:58
                      #18 0x00007ffff502a47b in __libc_start_main_impl
                          (main=0x40c490, argc=1, argv=0x7fffffffdc98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdc88) at ../csu/libc-start.c:360
                      #19 0x0000000000410a0e in ??? ()
                      
                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        Christian Ehrlicher
                        Lifetime Qt Champion
                        wrote on 10 Apr 2025, 12:55 last edited by
                        #20

                        Then please install the debug symbols for QtCreator (through the maintainance tool) so the backtrace is more useful. Thx.

                        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                        Visit the Qt Academy at https://academy.qt.io/catalog

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          JoeCFD
                          wrote on 10 Apr 2025, 14:02 last edited by
                          #21

                          Maybe switch to Xorg and try it out as well to see if there is any crash. If not, file a bug report specifically for Wayland.

                          C 1 Reply Last reply 10 Apr 2025, 14:32
                          1
                          • J JoeCFD
                            10 Apr 2025, 14:02

                            Maybe switch to Xorg and try it out as well to see if there is any crash. If not, file a bug report specifically for Wayland.

                            C Offline
                            C Offline
                            Christian Ehrlicher
                            Lifetime Qt Champion
                            wrote on 10 Apr 2025, 14:32 last edited by
                            #22

                            @JoeCFD said in Qt Creator 16.0.0 is crashing when opening cpp files:

                            file a bug report specifically for Wayland.

                            When you look at the backtrace you see it's crashing inside QtGui, no wayland plugin anywhere... but we need debug symbols to see what happens.

                            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                            Visit the Qt Academy at https://academy.qt.io/catalog

                            1 Reply Last reply
                            1
                            • M Offline
                              M Offline
                              mithune0000
                              wrote on 11 Apr 2025, 04:25 last edited by
                              #23

                              I uninstalled all the version and reinstalled the latest version using installer, it seems to be working better. I am gonna keep an eye on it, if it happens again, I will open this thread again.

                              1 Reply Last reply
                              1

                              19/23

                              10 Apr 2025, 12:26

                              • Login

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