Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-130597

Crash on QTime::fromString() when build with ICU

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.8.0
    • Core: Date/Time
    • None
    • ICU feature enabled Qt 6.8.0 (from MSYS2 repo)
    • Windows

    Description

      Simply `QTime::fromString("00:00.000", "m:s.zz")` will crash the program if building with icu-enabled Qt 6.8 (e.g. MSYS2 repo's Qt).

      See https://github.com/msys2/MINGW-packages/issues/22308 for detailed reproduce steps.

      The following is the call stack, seems we have infinite recursion which caused stack overflow:

      QIcuTimeZonePrivate::data -> QTimeZonePrivate::abbreviation -> QTimeZonePrivate::displayName -> QIcuTimeZonePrivate::data -> ...

      The attachment is the same reproducible test program, but remember you need to test against a ICU-enabled Qt. Using MSYS2's Qt would be enough.

      Attachments

        1. image-2024-10-26-19-00-04-379.png
          120 kB
          Gary Wang
        2. qtminbuild.zip
          0.7 kB
          Gary Wang

        Issue Links

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

          Activity

            People

              Eddy Edward Welbourne
              blumia Gary Wang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes