Unsolved QDateTime ASSERT
ivanicy last edited by
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!
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.
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
I would say it's related to https://codereview.qt-project.org/c/qt/qtbase/+/309673
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?
@SylvainM Yes, 5.15.3 will contain the fix.