Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QDateTime ASSERT

QDateTime ASSERT

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 787 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ivanicyI Offline
    ivanicyI Offline
    ivanicy
    wrote on last edited by
    #1

    Hello!

    I am using a QDateTime. I was using for days without problems but today, I have this error in debug mode:

    ASSERT: "byId[size_t(id)] == nullptr" in file time\qcalendar.cpp, line 103
    Debug Error!
    

    And this are the lines that are failing:

    QString sCurrentTime = QDateTime::currentDateTime().time().toString("hh:mm:ss");
    ui->labelStartTimeValue->setText(sCurrentTime);
    

    What I am doing wrong?

    Thank you very much!

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Please provide a minimal, compilable example and a valid backtrace. The assert there should not happen - looks like a calendar backend is loaded twice.
      We also need your OS and Qt version.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      4
      • S Offline
        S Offline
        SylvainM
        wrote on last edited by SylvainM
        #3

        I encountered this issue as well. The entry point was QDate::fromString. This method was called inside a QThread so maybe this assertion is related to concurrent access.

        OS : Windows 7
        QT version : 5.15 x64

        1 Reply Last reply
        1
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I would say it's related to https://codereview.qt-project.org/c/qt/qtbase/+/309673

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          2
          • S Offline
            S Offline
            SylvainM
            wrote on last edited by
            #5

            It seems related yes. It says the fix has been merged and there is a line :
            Pick-to: 6.0 5.15

            Should this mean that the version 5.15 is now patched with this fix?

            Christian EhrlicherC 1 Reply Last reply
            0
            • S SylvainM

              It seems related yes. It says the fix has been merged and there is a line :
              Pick-to: 6.0 5.15

              Should this mean that the version 5.15 is now patched with this fix?

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @SylvainM Yes, 5.15.3 will contain the fix.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved