Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-81778 Fix floating point exceptions in Qt
  3. QTBUG-81734

SIGFPE (Arithmetic exception) in QQuickEventPoint

    XMLWordPrintable

Details

    Description

      Found when running tst_qquickflickable while testing the fix for QTBUG-81098. Make the following patch to qtbase:

      diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h
      index 3b1ffb389e..4e5b01df00 100644
      --- a/src/testlib/qtest.h
      +++ b/src/testlib/qtest.h
      @@ -66,6 +66,8 @@
       
       #include <memory>
       
      +#include "fenv.h"
      +
       QT_BEGIN_NAMESPACE
       
       
      @@ -482,6 +484,10 @@ int main(int argc, char *argv[]) \
       #include <QtTest/qtest_gui.h>
       
       #define QTEST_MAIN_IMPL(TestObject) \
      +    feenableexcept( FE_INVALID   | \
      +                    FE_DIVBYZERO | \
      +                    FE_OVERFLOW  | \
      +                    FE_UNDERFLOW ); \
           TESTLIB_SELFCOVERAGE_START(#TestObject) \
           QT_PREPEND_NAMESPACE(QTest::Internal::callInitMain)<TestObject>(); \
           QGuiApplication app(argc, argv); \
      

      then run tst_qquickflickable with "disabled flickVelocity" as arguments and you'll get this:

      1   operator *                                                                                          qvector2d.h                239  0x7ffff586c736 
      2   QQuickEventPoint::estimatedVelocity                                                                 qquickevents.cpp           1182 0x7ffff5b4d51b 
      3   QQuickEventPoint::reset                                                                             qquickevents.cpp           794  0x7ffff5b48f89 
      4   QQuickPointerMouseEvent::reset                                                                      qquickevents.cpp           1315 0x7ffff5b4dbc7 
      5   QQuickWindowPrivate::pointerEventInstance                                                           qquickwindow.cpp           2441 0x7ffff5c170c5 
      6   QQuickWindowPrivate::handleMouseEvent                                                               qquickwindow.cpp           2317 0x7ffff5c1654d 
      7   QQuickWindow::mouseMoveEvent                                                                        qquickwindow.cpp           2255 0x7ffff5c155d9 
      8   QQuickView::mouseMoveEvent                                                                          qquickview.cpp             620  0x7ffff5e555ef 
      9   QWindow::event                                                                                      qwindow.cpp                2254 0x7ffff359c5e8 
      10  QQuickWindow::event                                                                                 qquickwindow.cpp           1773 0x7ffff5c0dfec 
      11  QCoreApplicationPrivate::notify_helper                                                              qcoreapplication.cpp       1253 0x7ffff0cef713 
      12  doNotify                                                                                            qcoreapplication.cpp       1182 0x7ffff0ceee19 
      13  QCoreApplication::notify                                                                            qcoreapplication.cpp       1168 0x7ffff0ceecf0 
      14  QGuiApplication::notify                                                                             qguiapplication.cpp        1878 0x7ffff35652d1 
      15  QCoreApplication::notifyInternal2                                                                   qcoreapplication.cpp       1092 0x7ffff0ceeb18 
      16  QCoreApplication::sendSpontaneousEvent                                                              qcoreapplication.cpp       1499 0x7ffff0cf02b7 
      17  QGuiApplicationPrivate::processMouseEvent                                                           qguiapplication.cpp        2209 0x7ffff35678fe 
      18  QGuiApplicationPrivate::processWindowSystemEvent                                                    qguiapplication.cpp        1941 0x7ffff35658ef 
      19  QWindowSystemInterfacePrivate::handleWindowSystemEvent<QWindowSystemInterface::SynchronousDelivery> qwindowsysteminterface.cpp 105  0x7ffff35081fa 
      20  QWindowSystemInterface::handleMouseEvent<QWindowSystemInterface::SynchronousDelivery>               qwindowsysteminterface.cpp 410  0x7ffff351bde4 
      ... <More>                                                                                                                                             
      
      

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              mitch_curtis Mitch Curtis
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes