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

QDate::startOfDay( ) leads to assert in debug build

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.2.2
    • Fix Version/s: None
    • Component/s: Core: Date/Time
    • Labels:
      None
    • Environment:
      VS2019, debug build, using static QT6 build and ICU
    • Platform/s:
      Windows
    • Story Points:
      13
    • Commits:
      7d00924ef3 (qt/qtbase/6.2) 7d00924ef3 (qt/tqtc-qtbase/6.2)
    • Sprint:
      Team A Foundation Sprint 54, Team A Foundation Sprint 55

      Description

      Following lines of code lead to a debug assert:

      ...
      QDate dt1(1900, 1, 1);
      QDateTime dt2 = dt1.startOfDay( );
      ...

      If you change the date (1901, etc), everything seems to work correctly.

      This code is part of following function, which therefore also leads to an assert:

      bool QDateTimeParser::fromString(const QString &t, QDateTime* datetime) const

       My Qt build links statically to ICU 70.1.

      (See discussion for details of the custom static ICU build and configuration to enable Qt to cross-compile to 32-bit with it, starting 31 Mar '22.)
       

        Attachments

        1. CMakeCache.txt
          139 kB
        2. qtimezoneprivate_icu.cpp
          18 kB
        3. qtimezoneprivate_win.cpp
          34 kB
        4. qtimezoneprivate.cpp
          39 kB

          Issue Links

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

            Activity

              People

              Assignee:
              tneuhofer Thomas Neuhofer
              Reporter:
              tneuhofer Thomas Neuhofer
              PM Owner:
              Vladimir Minenko Vladimir Minenko
              RnD Owner:
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes