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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.2.2
    • Core: Date/Time
    • None
    • VS2019, debug build, using static QT6 build and ICU
    • Windows
    • 13
    • 7d00924ef3 (qt/qtbase/6.2) 7d00924ef3 (qt/tqtc-qtbase/6.2)
    • 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. qtimezoneprivate_win.cpp
          34 kB
          Thomas Neuhofer
        2. qtimezoneprivate_icu.cpp
          18 kB
          Thomas Neuhofer
        3. qtimezoneprivate.cpp
          39 kB
          Thomas Neuhofer
        4. CMakeCache.txt
          139 kB
          Thomas Neuhofer

        Issue Links

          Activity

            People

              tneuhofer Thomas Neuhofer
              tneuhofer Thomas Neuhofer
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: