Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-27385

IDE becomes unusable after running an application on Qt 6.3

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 7.0.1
    • Qt Creator 7.0.0
    • C/C++/Obj-C++ Support
    • None
    • Arch Linux
      Qt Creator 7.0.0
      Qt 6.3.0
    • Linux/X11
    • 90e879bbd1 (qt-creator/qt-creator/7.0) 90e879bbd1 (qt-creator/qt-creator/master) 90e879bbd1 (qt-creator/qt-creator/qds-3.3) 90e879bbd1 (qt-creator/tqtc-qt-creator/7.0)

    Description

      After updating Qt from 6.2.4 to 6.3.0, Qt Creator becomes unusable after running an application through Build -> Run. This doesn't appear to happen when running through the debugger.

       

      When running the application, the following is printed to the application output window:

      Failed to start program. Path or permissions wrong?

      After this point, many operations hang the IDE for several seconds, the clang code model is broken, and any cmake operations fail. (e.g. cannot build the project, when going to the Options menu the cmake executable path shows as red indicating that it's invalid)

       

      I built Qt Creator from the latest commit on the 7.0 branch and the error still occurs. I was able to track it down to the LauncherSocket::handleSocketDisconnected() handler being called for the QtcProcess created for clangbackend. When tracing through the codepath in the backend Qt code, this code path is being hit in QNativeSocketEngine::read():

       

          // Handle remote close
          if (readBytes == 0 && (d->socketType == QAbstractSocket::TcpSocket
      #ifndef QT_NO_SCTP
              || d->socketType == QAbstractSocket::SctpSocket
      #endif
              )) {
              d->setError(QAbstractSocket::RemoteHostClosedError,
                          QNativeSocketEnginePrivate::RemoteHostClosedErrorString);
              close();
              return -1;
          } 
      

      This code is several years old, so I don't think that directly is the cause for the breakage, but something else could have changed the behavior of reading from the socket.

       

      At this point I don't know if it's a regression in Qt 6.3.0 or if some usage in Qt Creator is incorrect and was simply triggered by a core Qt change. I figured it would be best to initially report this bug against Qt Creator until that could be determined. Since the socket is created for clangbackend, I figured the C/C+/Obj-C+ Support group would be the most appropriate, please re-assign if it better fits another component.

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-27385
        # Subject Branch Project Status CR V

        Activity

          People

            jkobus Jarek Kobus
            akb825 Aaron Barany
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes