Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1770

JS assertion resolving projects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 2.4.0
    • 2.2.0
    • General
    • None
    • Linux/X11
    • b1d6a0518 (2.2), efb1f863d (master), d18ee709b (master)

    Description

      Qbs 2.2.0 exists with a JS assertion when resolving some projects. This prevents Qt Creator from fully loading the project. It is reproducible with the qbs resolve command. The following log is from a qbs build with QBS_QUICKJS_LEAK_CHECK enabled:

      $ /usr/bin/qbs resolve -d /home/amccarthy/build/qbs-module-Desktop_Qt_6_6_0_GCC_64bit-Debug -f /hom
      e/amccarthy/depot/test-projects/qbs-module/qbs-module.qbs --settings-dir /home/amccarthy/.config/QtProject/qtcreator --jobs 20 config:Debug_Desktop__f6a890250eff9b2f qbs.defaultBuildVariant:debug q
      bs.installRoot:/home/amccarthy/build/qbs-module-Desktop_Qt_6_6_0_GCC_64bit-Debug/Debug_Desktop__f6a890250eff9b2f/install-root profile:qtc_Desktop__4c856853
      
      Restoring build graph from disk
      
      Resolving project for configuration Debug_Desktop__f6a890250eff9b2f
      
      Object leaks:
      
             ADDRESS REFS SHRF          PROTO      CLASS PROPS
      
      0x7fa6dc0f51a0    1   0*          (nil)   FileInfo { path: [Function 0x7fa6dc0f51f0], fileName: [Function 0x7fa6dc0f5280], baseName: [Function 0x7fa6dc0f52d0], suffix: [Function 0x7fa6dc0f53a0], co
      mpleteSuffix: [Function 0x7fa6dc01cb10], canonicalPath: [Function 0x7fa6dc0efd90], cleanPath: [Function 0x7fa6dc01cb60], completeBaseName: [Function 0x7fa6dc01cce0], relativePath: [Function 0x7fa6d
      c01cc90], resolvePath: [Function 0x7fa6dc01cdb0], isAbsolutePath: [Function 0x7fa6dc01cf20], toWindowsSeparators: [Function 0x7fa6dc0fa920], fromWindowsSeparators: [Function 0x7fa6dc0fa9e0], toNati
      veSeparators: [Function 0x7fa6dc0faaa0], fromNativeSeparators: [Function 0x7fa6dc0fae00], joinPaths: [Function 0x7fa6dc0faec0], pathListSeparator: [Function 0x7fa6dc0faf40], pathSeparator: [Functio
      n 0x7fa6dc0fb000], executableSuffix: [Function 0x7fa6dc0fb0c0] }
      
      0x7fa6dcc747b0    2   0*          (nil)  Evaluator {  }
      
      0x7fa6dd208150    1   0*          (nil)  Evaluator {  }
      
      0x7fa6dc0faec0    1   0* 0x7fa6dc00a9f0   Function { length: 0, name: 3'joinPaths' }
      
      0x7fa6dd26bfb0    1   0* 0x7fa6dc00a9f0   Function { length: 0, name: 2'<eval>' }
      
      qbs: ./src/shared/quickjs/quickjs.c:2039: JS_FreeRuntime: Assertion `list_empty(&rt->gc_obj_list)' failed.
      
      Aborted (core dumped)
      

      I've traced the issue to the use of "id" references within Modules. See the two attached minimal projects. For example:

      Module {
          id: root
          property string foo: "test"
      
          Group {
              // use root.foo
          }
      }

      In the first project, qbs-module, the issue is easily resolved by changing from root._foo to using project.modulea._foo.

      In the second project, qbs-base-module, the above fix is not possible as the root.foo reference is within a shared base component and I have not found a way to determine the name of the current module within this context.

      Attachments

        1. qbs-base-module.tar.gz
          0.8 kB
          Aaron McCarthy
        2. qbs-module.tar.gz
          0.6 kB
          Aaron McCarthy
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            amccarthy Aaron McCarthy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes