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

QBS hangs randomly on OS X Mavericks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • 1.2.0
    • 1.0.1
    • General
    • None
    • OS X 10.9

    Description

      Happened when I did a build. It just hung after outputting this:

      DEBUG: JS context:
      QVariantMap()
      DEBUG: JS code:
      (function () {
                      var process, key;
      
                      // Contains the combination of default, file, and in-source keys and values
                      // Start out with the contents of this file as the "base", if given
                      var aggregatePlist = BundleTools.infoPlistContents(infoPlistFile) || {};
      
                      // Add local key-value pairs (overrides equivalent keys specified in the file if
                      // one was given)
                      for (key in infoPlist) {
                          if (infoPlist.hasOwnProperty(key))
                              aggregatePlist[key] = infoPlist[key];
                      }
      
                      // Do some postprocessing if desired
                      if (processInfoPlist) {
                          // Add default values to the aggregate plist if the corresponding keys
                          // for those values are not already present
                          var defaultValues = ModUtils.moduleProperty(product, "defaultInfoPlist");
                          for (key in defaultValues) {
                              if (defaultValues.hasOwnProperty(key) && !(key in aggregatePlist))
                                  aggregatePlist[key] = defaultValues[key];
                          }
      
                          // Add keys from platform's Info.plist if not already present
                          if (platformPath) {
                              process = new Process();
                              process.start("plutil", ["-convert", "json", "-o", "-",
                                                       [platformPath, "Info.plist"].join('/')]);
                              process.waitForFinished();
                              platformInfo = JSON.parse(process.readAll());
      
                              var additionalProps = platformInfo["AdditionalInfo"];
                              for (key in additionalProps) {
                                  if (additionalProps.hasOwnProperty(key) && !(key in aggregatePlist)) // override infoPlist?
                                      aggregatePlist[key] = defaultValues[key];
                              }
                              props = platformInfo['OverrideProperties'];
                              for (key in props) {
                                  aggregatePlist[key] = props[key];
                              }
      
                              if (product.moduleProperty("qbs", "targetOS").contains("ios")) {
                                  key = "UIDeviceFamily";
                                  if (key in platformInfo && !(key in aggregatePlist))
                                      aggregatePlist[key] = platformInfo[key];
                              }
                          } else {
                              print("Missing platformPath property");
                          }
                          if (sysroot) {
                              process = new Process();
                              process.start("plutil", ["-convert", "json", "-o", "-",
                                                       sysroot + "/SDKSettings.plist"]);
                              process.waitForFinished();
                              sdkSettings = JSON.parse(process.readAll());
                          } else {
                              print("Missing sysroot (SDK path)");
                          }
                          if (toolchainInstallPath) {
                              process = new Process();
                              process.start("plutil", ["-convert", "json", "-o", "-",
                                                       toolchainInstallPath + "/../../ToolchainInfo.plist"]);
                              process.waitForFinished();
                              toolchainInfo = JSON.parse(process.readAll());
                          } else {
                              print("Cannot get the ToolchainInfo.plist from the toolchainInstallPath");
                          }
      
                          process = new Process();
                          process.start("sw_vers", ["-buildVersion"]);
                          process.waitForFinished();
                          aggregatePlist["BuildMachineOSBuild"] = process.readAll().trim();
      
                          // setup env
                          env = {
                              "SDK_NAME": sdkSettings["CanonicalName"],
                              "XCODE_VERSION_ACTUAL": toolchainInfo["DTXcode"],
                              "SDK_PRODUCT_BUILD_VERSION": toolchainInfo["DTPlatformBuild"],
                              "GCC_VERSION": platformInfo["DTCompiler"],
                              "XCODE_PRODUCT_BUILD_VERSION": platformInfo["DTPlatformBuild"],
                              "PLATFORM_PRODUCT_BUILD_VERSION": platformInfo["ProductBuildVersion"],
                          }
                          process = new Process();
                          process.start("sw_vers", ["-buildVersion"]);
                          process.waitForFinished();
                          env["MAC_OS_X_PRODUCT_BUILD_VERSION"] = process.readAll().trim();
      
                          for (key in buildEnv)
                              env[key] = buildEnv[key];
      
                          DarwinTools.doRepl(infoPlist, env, true);
                      }
      
                      // Write the plist contents as JSON
                      var infoplist = new TextFile(outputs.infoplist[0].fileName, TextFile.WriteOnly);
                      infoplist.write(JSON.stringify(aggregatePlist));
                      infoplist.close();
      
                      if (infoPlistFormat === "same-as-input" && infoPlistFile)
                          infoPlistFormat = BundleTools.infoPlistFormat(infoPlistFile);
      
                      var validFormats = [ "xml1", "binary1", "json" ];
                      if (!validFormats.contains(infoPlistFormat))
                          throw("Invalid Info.plist format " + infoPlistFormat + ". " +
                                "Must be in [xml1, binary1, json].");
      
                      // Convert the written file to the format appropriate for the current platform
                      process = new Process();
                      process.start("plutil", ["-convert", infoPlistFormat, outputs.infoplist[0].fileName]);
                      process.waitForFinished();
                  })()
      TRACE: Canceling all jobs.
      

      All Ctrl+C did was output:

      QEventDispatcherUNIX: internal error, wakeUps.testAndSetRelease(1, 0) failed!
      QEventDispatcherUNIX: internal error, wakeUps.testAndSetRelease(1, 0) failed!
      

      and continued to hang. Further Ctrl+C had no effect and force quit was required.

      More recently, QBS will simply hang without any additional output, and sit indefinitely until force quit.

      Attachments

        1. kaputt.tar.gz
          1 kB
          Joerg Bornemann
        2. smokey.tar.gz
          27 kB
          Joerg Bornemann

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes