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

tst_QHighDpi(mouseVelocity) invokes qFuzzyCompare() with operand inf

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.3
    • GUI: High-DPI
    • None

    Description

      qFuzzyCompare() with inf operands is unsupported. The call initiates from QGuiApplicationPrivate::processMouseEvent(). Specifically on the line 2145:

      bool positionChanged = QGuiApplicationPrivate::lastCursorPosition != e->globalPos;
      

      Gdb says the first operand is inf:

      (gdb) p QGuiApplicationPrivate::lastCursorPosition
      $2 = {xp = inf, yp = inf}
      

      Here is the full backtrace:

      (gdb) fin
      Run till exit from #0  qFuzzyCompare (p1=inf, p2=-305) at /home/user/dist/src/qt/qtbase/src/corelib/global/qglobal.h:1046
      0x00007ffff74d0271 in operator== (p1=..., p2=...) at /home/user/dist/src/qt/qtbase/src/corelib/tools/qpoint.h:276
      276             return ((!p1.xp || !p2.xp) ? qFuzzyIsNull(p1.xp - p2.xp) : qFuzzyCompare(p1.xp, p2.xp))
      Value returned is $3 = true
      (gdb) bt
      #0  0x00007ffff74d0271 in operator== (p1=..., p2=...) at /home/user/dist/src/qt/qtbase/src/corelib/tools/qpoint.h:276
      #1  0x00007ffff75a70e2 in operator!= (p1=..., p2=...) at /home/user/dist/src/qt/qtbase/src/corelib/tools/qpoint.h:281
      #2  0x00007ffff75be227 in QGuiApplicationPrivate::processMouseEvent (e=0x45cd70) at /home/user/dist/src/qt/qtbase/src/gui/kernel/qguiapplication.cpp:2145
      #3  0x00007ffff75bdee1 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x45cd70) at /home/user/dist/src/qt/qtbase/src/gui/kernel/qguiapplication.cpp:2011
      #4  0x00007ffff763174c in QWindowSystemInterfacePrivate::handleWindowSystemEvent<QWindowSystemInterface::SynchronousDelivery> (ev=0x45cd70)
          at /home/user/dist/src/qt/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:107
      #5  0x00007ffff76370dc in QWindowSystemInterface::handleMouseEvent<QWindowSystemInterface::SynchronousDelivery> (window=0x7fffffffc7e0, timestamp=501, device=0x4569a0, local=..., 
          global=..., state=..., button=Qt::NoButton, type=QEvent::MouseMove, mods=..., source=Qt::MouseEventNotSynthesized)
          at /home/user/dist/src/qt/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:416
      #6  0x00007ffff7636e20 in QWindowSystemInterface::handleMouseEvent<QWindowSystemInterface::SynchronousDelivery> (window=0x7fffffffc7e0, timestamp=501, local=..., global=..., 
          state=..., button=Qt::NoButton, type=QEvent::MouseMove, mods=..., source=Qt::MouseEventNotSynthesized)
          at /home/user/dist/src/qt/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:398
      #7  0x00007ffff7633fe8 in qt_handleMouseEvent (window=0x7fffffffc7e0, local=..., global=..., state=..., button=Qt::NoButton, type=QEvent::MouseMove, mods=..., timestamp=501)
          at /home/user/dist/src/qt/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1209
      #8  0x0000000000407d45 in QTest::mouseEvent (action=QTest::MouseMove, window=0x7fffffffc7e0, button=Qt::NoButton, stateKey=..., pos=..., delay=0)
          at include/QtTest/../../../../../src/qt/qtbase/src/testlib/qtestmouse.h:150
      #9  0x0000000000410d92 in QTest::mouseMove (window=0x7fffffffc7e0, pos=..., delay=0) at include/QtTest/../../../../../src/qt/qtbase/src/testlib/qtestmouse.h:176
      #10 0x000000000040d692 in tst_QHighDpi::mouseVelocity (this=0x7fffffffd9b0) at /home/user/dist/src/qt/qtbase/tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp:654
      #11 0x000000000040e2ad in tst_QHighDpi::qt_static_metacall (_o=0x7fffffffd9b0, _c=QMetaObject::InvokeMetaMethod, _id=21, _a=0x7fffffffca80)
          at tests/auto/gui/kernel/qhighdpi/tst_qhighdpi_autogen/include/tst_qhighdpi.moc:167
      #12 0x00007ffff6c34b75 in QMetaMethod::invoke (this=0x455110, object=0x7fffffffd9b0, connectionType=Qt::DirectConnection, returnValue=..., val0=..., val1=..., val2=..., val3=..., 
          val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at /home/user/dist/src/qt/qtbase/src/corelib/kernel/qmetaobject.cpp:2384
      #13 0x00007ffff7f5f46c in QMetaMethod::invoke (this=0x455110, object=0x7fffffffd9b0, connectionType=Qt::DirectConnection, val0=..., val1=..., val2=..., val3=..., val4=..., 
          val5=..., val6=..., val7=..., val8=..., val9=...) at /home/user/dist/src/qt/qtbase/src/corelib/kernel/qmetaobject.h:126
      #14 0x00007ffff7f57bfb in QTest::TestMethods::invokeTestOnData (this=0x7fffffffd790, index=0) at /home/user/dist/src/qt/qtbase/src/testlib/qtestcase.cpp:949
      #15 0x00007ffff7f5875f in QTest::TestMethods::invokeTest (this=0x7fffffffd790, index=0, data=0x0, watchDog=0x0) at /home/user/dist/src/qt/qtbase/src/testlib/qtestcase.cpp:1181
      #16 0x00007ffff7f59aff in QTest::TestMethods::invokeTests (this=0x7fffffffd790, testObject=0x7fffffffd9b0) at /home/user/dist/src/qt/qtbase/src/testlib/qtestcase.cpp:1524
      #17 0x00007ffff7f5a39d in QTest::qRun () at /home/user/dist/src/qt/qtbase/src/testlib/qtestcase.cpp:1952
      #18 0x00007ffff7f59e03 in QTest::qExec (testObject=0x7fffffffd9b0, argc=2, argv=0x7fffffffdac8) at /home/user/dist/src/qt/qtbase/src/testlib/qtestcase.cpp:1859
      #19 0x000000000040e43f in main (argc=2, argv=0x7fffffffdac8) at /home/user/dist/src/qt/qtbase/tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp:698
      

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            jimis Dimitrios Apostolou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes