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

floating point div by zero exception when binding to Flickable's visibleArea property

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Done
    • P2: Important
    • 5.14.2, 5.15.0 Alpha
    • None
    • Visual Studio 2019, Windows 10 Pro, 64-bit (build 18363) - 10.0.18363.2

    • Windows
    • a82b1b278ace7a500f95473f2a873923d2d4e60a (qt/qtdeclarative/5.14)

    Description

      Enabling division by zero exceptions causes QT throw div by zero on load with the following code:

      import QtQuick 2.14
      import QtQuick.Window 2.14
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Flickable {
              id: flickable
      
              Text {
                  text: flickable.visibleArea.xPosition
              }
          }
      }
      

      Floating point exceptions can be enabled with this code on Windows:

       // activate floating point div/0 exceptions
        _controlfp_s(NULL, 0, _EM_ZERODIVIDE);
      

      and this code on Linux: https://stackoverflow.com/questions/47117394/is-it-possible-to-activatede-activate-sigfpe-generation-only-for-some-specifi

      Call stack for the original application where the issue was found:

       Qt5Quickd.dll!QQuickFlickableVisibleArea::updateVisible() Line 147	C++
       	Qt5Quickd.dll!QQuickFlickablePrivate::updateBeginningEnd() Line 576	C++
       	Qt5Quickd.dll!QQuickFlickable::geometryChanged(const QRectF & newGeometry={...}, const QRectF & oldGeometry={...}) Line 1832	C++
       	Qt5Quickd.dll!QQuickItemView::geometryChanged(const QRectF & newGeometry={...}, const QRectF & oldGeometry={...}) Line 1337	C++
       	Qt5Quickd.dll!QQuickGridView::geometryChanged(const QRectF & newGeometry={...}, const QRectF & oldGeometry={...}) Line 2175	C++
       	Qt5Quickd.dll!QQuickItem::setSize(const QSizeF & size={...}) Line 6985	C++
       	qquicklayoutsplugind.dll!QQuickGridLayoutItem::setGeometry(const QRectF & rect={...}) Line 122	C++
       	Qt5Guid.dll!QGridLayoutEngine::setGeometries(const QRectF & contentsGeometry={...}, const QAbstractLayoutStyleInfo * styleInfo=0x038184d8) Line 1063	C++
       	qquicklayoutsplugind.dll!QQuickGridLayoutBase::rearrange(const QSizeF & size={...}) Line 485	C++
       	qquicklayoutsplugind.dll!QQuickLayout::geometryChanged(const QRectF & newGeometry={...}, const QRectF & oldGeometry={...}) Line 819	C++
       	Qt5Quickd.dll!QQuickItem::setHeight(double h=480.00000000000000) Line 6830	C++
       	Qt5Quickd.dll!QQuickItem::qt_static_metacall(QObject * _o=0x0820ae18, QMetaObject::Call _c=WriteProperty, int _id=8, void * * _a=0x001ddf74) Line 962	C++
       	Qt5Qmld.dll!QQmlPropertyData::writeProperty(QObject * target=0x0820ae18, void * value=0x001ddfac, QFlags<enum QQmlPropertyData::WriteFlag> flags={...}) Line 346	C++
       	Qt5Qmld.dll!GenericBinding<6>::doStore<double>(double value=480.00000000000000, const QQmlPropertyData * pd=0x0053e4f8, QFlags<enum QQmlPropertyData::WriteFlag> flags={...}) Line 333	C++
       	Qt5Qmld.dll!GenericBinding<6>::write(const QV4::Value & result={...}, bool isUndefined=false, QFlags<enum QQmlPropertyData::WriteFlag> flags={...}) Line 305	C++
       	Qt5Qmld.dll!QQmlNonbindingBinding::doUpdate(const QQmlJavaScriptExpression::DeleteWatcher & watcher={...}, QFlags<enum QQmlPropertyData::WriteFlag> flags={...}, QV4::Scope & scope={...}) Line 249	C++
       	Qt5Qmld.dll!QQmlBinding::update(QFlags<enum QQmlPropertyData::WriteFlag> flags={...}) Line 187	C++
       	Qt5Qmld.dll!QQmlBinding::expressionChanged() Line 531	C++
       	Qt5Qmld.dll!QQmlJavaScriptExpressionGuard_callback(QQmlNotifierEndpoint * e=0x082941ac, void * * __formal=0x00000000) Line 415	C++
       	Qt5Qmld.dll!QQmlNotifier::emitNotify(QQmlNotifierEndpoint * endpoint=0x00000000, void * * a=0x00000000) Line 104	C++
       	Qt5Qmld.dll!QQmlData::signalEmitted(QAbstractDeclarativeData * __formal=0x03bf0848, QObject * object=0x03885270, int index=25, void * * a=0x00000000) Line 887	C++
       	Qt5Cored.dll!QMetaObject::activate(QObject * sender=0x03885270, int signalOffset=3, int local_signal_index=22, void * * argv=0x00000000) Line 3678	C++
       	Qt5Cored.dll!QMetaObject::activate(QObject * sender=0x03885270, const QMetaObject * m=0x7983b360, int local_signal_index=22, void * * argv=0x00000000) Line 3660	C++
       	Qt5Quickd.dll!QQuickItem::heightChanged() Line 1202	C++
       	Qt5Quickd.dll!QQuickItem::geometryChanged(const QRectF & newGeometry={...}, const QRectF & oldGeometry={...}) Line 3811	C++
       	Qt5Quickd.dll!QQuickItem::setHeight(double h=480.00000000000000) Line 6830	C++
       	Qt5QuickTemplates2d.dll!QQuickApplicationWindowPrivate::relayout() Line 207	C++
       	Qt5QuickTemplates2d.dll!QQuickApplicationWindow::resizeEvent(QResizeEvent * event=0x001df220) Line 850	C++
       	Qt5Guid.dll!QWindow::event(QEvent * ev=0x001df220) Line 2282	C++
       	Qt5Quickd.dll!QQuickWindow::event(QEvent * e=0x001df220) Line 1696	C++
       	Qt5Cored.dll!QCoreApplicationPrivate::notify_helper(QObject * receiver=0x037c3838, QEvent * event=0x001df220) Line 1256	C++
       	Qt5Cored.dll!doNotify(QObject * receiver=0x037c3838, QEvent * event=0x001df220) Line 1185	C++
       	Qt5Cored.dll!QCoreApplication::notify(QObject * receiver=0x037c3838, QEvent * event=0x001df220) Line 1171	C++
       	Qt5Guid.dll!QGuiApplication::notify(QObject * object=0x037c3838, QEvent * event=0x001df220) Line 1801	C++
       	Qt5Cored.dll!QCoreApplication::notifyInternal2(QObject * receiver=0x037c3838, QEvent * event=0x001df220) Line 1095	C++
       	Qt5Cored.dll!QCoreApplication::sendSpontaneousEvent(QObject * receiver=0x037c3838, QEvent * event=0x001df220) Line 1502	C++
       	Qt5Guid.dll!QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent * e=0x082a9138) Line 2428	C++
       	Qt5Guid.dll!QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent * e=0x082a9138) Line 1858	C++
       	Qt5Guid.dll!QWindowSystemInterfacePrivate::handleWindowSystemEvent<QWindowSystemInterface::SynchronousDelivery>(QWindowSystemInterfacePrivate::WindowSystemEvent * ev=0x082a9138) Line 105	C++
       	Qt5Guid.dll!QWindowSystemInterface::handleGeometryChange<QWindowSystemInterface::SynchronousDelivery>(QWindow * window=0x037c3838, const QRect & newRect={...}) Line 308	C++
       	qwindowsd.dll!QWindowsWindow::initialize() Line 1328	C++
       	Qt5Guid.dll!QWindowPrivate::create(bool recursive=false, unsigned int nativeHandle=0) Line 533	C++
       	Qt5Guid.dll!QWindow::create() Line 646	C++
       	Qt5Guid.dll!QWindowPrivate::setVisible(bool visible=true) Line 361	C++
       	Qt5Guid.dll!QWindow::setVisible(bool visible=true) Line 619	C++
       	Qt5Quickd.dll!QQuickWindowQmlImpl::setVisible(bool visible=true) Line 87	C++
       	Qt5Quickd.dll!QQuickWindowQmlImpl::setWindowVisibility() Line 182	C++
       	Qt5Quickd.dll!QQuickWindowQmlImpl::componentComplete() Line 139	C++
       	Qt5QuickTemplates2d.dll!QQuickApplicationWindow::componentComplete() Line 842	C++
       	Qt5Qmld.dll!QQmlObjectCreator::finalize(QQmlInstantiationInterrupt & interrupt={...}) Line 1406	C++
       	Qt5Qmld.dll!QQmlComponentPrivate::complete(QQmlEnginePrivate * enginePriv=0x004cae50, QQmlComponentPrivate::ConstructionState * state=0x00516d10) Line 937	C++
       	Qt5Qmld.dll!QQmlComponentPrivate::completeCreate() Line 971	C++
       	Qt5Qmld.dll!QQmlComponent::completeCreate() Line 964	C++
       	Qt5Qmld.dll!QQmlComponent::create(QQmlContext * context=0x00538738) Line 798	C++
       	Qt5Qmld.dll!QQmlApplicationEnginePrivate::finishLoad(QQmlComponent * c=0x005387a8) Line 136	C++
       	Qt5Qmld.dll!QQmlApplicationEnginePrivate::startLoad(const QUrl & url={...}, const QByteArray & data={...}, bool dataFlag=false) Line 121	C++
       	Qt5Qmld.dll!QQmlApplicationEngine::load(const QUrl & url={...}) Line 266	C++
      >	GridView.exe!main(int argc=1, char * * argv=0x004b1f80) Line 32	C++
      

      Attachments

        Issue Links

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

          Activity

            People

              mitch_curtis Mitch Curtis
              nminkov Niki M
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes