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

Floating point exception in QPointF::toPoint() with qInf()s

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P1: Critical
    • None
    • 5.12
    • Core: Other
    • None
    • Linux/X11

    Description

      Simple test code:

      #include <QtCore>
      #include <fenv.h>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
      
          feenableexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW);
      
          qDebug() << "A1";
          auto pointF = QPointF(2.0, 2.0);
          qDebug() << "B1";
          auto point = pointF.toPoint();
          qDebug() << "C1";
          Q_UNUSED(point);
      
          qDebug() << "A2";
          auto pointFInf = QPointF(qInf(), qInf());
          qDebug() << "B2";
          auto pointInf = pointFInf.toPoint();
          qDebug() << "C2";
          Q_UNUSED(pointInf);
      
          return a.exec();
      }
      

      Output:

      A1
      B1
      C1
      A2
      B2
      Floating point exception (core dumped)
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              thiago Thiago Macieira
              paeglis Gatis Paeglis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes