Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.7.0
-
None
-
iOS
-
-
de7f281d7ad1bc8e3dc5a549436a8cb3ba159e7f
Description
There seems to be a pretty nasty regression in the Qt Quick Compiler specific to iOS causing code to no longer compile. This happens with QT 5.7.0 but does not not seem to affect 5.6.x and older.
This can be reproduced in a number of ways. A pretty trivial example is to create a blank project on iOS, enable the qtquickcompiler and add the following line to your project. It doesn't really matter where:
property int time: 24 * 60 * 60 * 1000
This will result in the following assert during compilation:
/5.7/ios/bin/qtquickcompiler --resource=/untitled35/qml.qrc ../untitled35/main.qml .qtquickcompiler/main_qml.cpp
ASSERT: "endptr - target.data() <= length - eSign -1" in file ../../corelib/tools/qlocale_tools.cpp, line 227
make[1]: *** [.qtquickcompiler/main_qml.cpp] Abort trap: 6
It seems to be caused by using any moderately large numbers indicating some overflow bug. Note that these numbers are still well within the supported precision and should anyway not cause the compiler to fail.
Another expression that cause the same compilation error is this:
Math.round(1000000 * Math.random())
This can be reduced further down to a QtCore-only testcase:
Use main.cpp:
#include <QDebug> #include <QCoreApplication> #include <QByteArray> int main(int argc, char **argv) { QCoreApplication app(argc, argv); qDebug() << QByteArray::number(86400000, 'g', 6); return 0; }
and a .pro file with this:
TEMPLATE = app
QT = bootstrap-private
SOURCES += main.cpp
Attachments
For Gerrit Dashboard: QTBUG-54482 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
168995,2 | QLocale: Fix wrong assert | 5.7 | qt/qtbase | Status: MERGED | +2 | 0 |