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

Crash when opening project with CMakePresets.json

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • Qt Creator 12.0.1, Qt Creator 12.0.2, Qt Creator 13.0.0-beta2, Qt Creator 13.0.0-rc1
    • None
    • Windows
    • 52c39d007 (13.0)

    Description

      In a Windows Sandbox instance I installed MSVS 17.9.2 pro, initialized our Qt build built from the 6.6.2 branch (no modifications to any source files, built with MSVS 17.8), and checked out our sources. I had not configured any Qt kits in QtC and the compilers are only the autodetected ones[1]. I then tried opening the main CMakeLists.txt file for our project and QtC crashed. If I rename our CMakePresets.json file to something else and repeat, the project is opened and there is no crash. So this seems to have something to do with CMakePresets.json. I have tried QtC 12.0.1, 12.0.2, 13.0.0-beta2, and 13.0.0-rc1 and I get the same crash with each version.

      I simplified the CMakePresets.json file some and I still get a crash when it's stripped down about as much as practical. I have attached that version of CMakePresets.json.

      I have also attached a minidump I collected by attaching the VS debugger to qtcreator.exe before the crash.

      I have not tried to come up with a MWE that I can share. The CMakeLists.txt file I am trying to open is for a large closed source application.

      FWIW, on the same physical machine (but not in the sandbox instance), I can successfully open this project using QtC 12.0.1. I have version 17.8.6 of Visual Studio installed on the physical machine so that might have something to do with this. I haven't tried installing 17.8.6 on the sandbox instance

      The way that this presets file is supposed to work is that we are supposed to add custom C and C++ compilers with name "Unknown" and compiler path set to `C:\Windows\system32\cmd.exe` . I initially had added both of those compilers in the QtC preferences and got the crash. Then I tried deleting those compilers from the preferences and still got the crash.

       

      [1]Later, I tried adding a kit representing our build at C:\qtbuild6_6\install\win64\bin\qmake6.exe. I can still reproduce the crash described above after doing that.

      Product: Qt Creator 13.0.0-rc1 (12.0.84)
      Based on: Qt 6.6.2 (MSVC 2019, x86_64)
      Built on: Mar  7 2024 01:38:24
      From revision: 0539e2a0f6

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cadam Cristian Adam
            aclight Adam Light
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes