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

isAbsolute(base) assertion

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 0.3
    • 0.3
    • General
    • None
    • Windows 7 Professional 64-bit
      qbs 159e5e61dbea6283bfc64d6a28bce2f44a1c2b92

    Description

      I'm receiving ASSERT: "isAbsolute(base)" in file tools\fileinfo.cpp, line 162 when compiling my project on Windows.

      I am running the build over a network share, but it's mounted to a drive letter so I'd imagine that would be fairly transparent; I have a feeling it's related though.

      EDIT: Opened this up in the debugger. The `base` argument of FileInfo::resolvePath is set to `S:`... however isAbsolute returns false for that, even though I'd think S: would be considered absolute.

      Looking at File::isAbsolute, the check for Windows is simply broken. Currently the condition is:

      if (n >= 3 && path.at(1) == QLatin1Char(':') && at0.isLetter() && (path.at(2) == QLatin1Char('/') || path.at(2) == QLatin1Char('
      ')))

      and it should probably be:

      if (n >= 2 && path.at(1) == QLatin1Char(':') && at0.isLetter())

      I don't see why the third character needs to be checked at all since it wouldn't be a valid path otherwise. Maybe I'm wrong, but in either case, if the third character is going to be checked, it should only be checked if present, but not required to be there.

      Attachments

        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:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes