Details
-
Suggestion
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.12.10, 5.15
-
None
Description
https://codereview.qt-project.org/q/I7b71d66b872ccc08a64e941acd36b45b0ea15fab added a Q_ASSERT in QLineF::setLength that can be hit using this simple test:
int main(int argc, char *argv[]) { QApplication a(argc, argv); QLineF line(QPointF(qQNaN(), qQNaN()), QPointF(qQNaN(), qQNaN())); line.setLength(9.45); return a.exec(); }
In this situation isValid() returns true for the line, but length() is NaN, which is not >0, so the Q_ASSERT is hit.
Our application, which has its own programming language, allows users to draw lines, rectangles, etc. programmatically. We have a suite of fuzz tests to test this functionality, and one of the tests is now hitting this Q_ASSERT.
We are also noticing a hang in the same fuzz tests when drawing rectangles that did not happen when we were using version 5.12.9. I haven't figured out a MCE to reproduce that hang yet, but it is almost certainly caused by the same Qt change as this bug.
Clearly there is no realistic use case for drawing a line between to (Nan, Nan) points, but if the code that calls QLineF and such is now responsible for checking the validity of the values, that's a significant enough change that I would at least expect a change log entry.
Attachments
Issue Links
- resulted in
-
QTBUG-92908 gradients widget example crashes
- Closed
For Gerrit Dashboard: QTBUG-89010 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
324688,10 | Make explicit that we expect co-ordinates to be finite | dev | qt/qtbase | Status: MERGED | +2 | 0 |