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

QGuiApplicationPrivate::processMouseEvent() crashes on NaN event globalPos

XMLWordPrintable

    • 63bbbdc4b8dba7be5690065dc6a4ffa5a85b1b32 (qt/qtbase/dev) 763c08d809759343ca3558e84ae1a28f5d63b7df (qt/qtbase/5.15)

      When QGuiApplicationPrivate::processMouseEvent() is called with a MouseEvent where globalPos contains NaN, it will set positionChanged to true even if it is exactly the same position. If e->enhancedMouseEvent() is set and the event is not a NonClientAreaMouseMove or MouseMove event, it will recursively call QGuiApplicationPrivate::processMouseEvent(). (Normally there would only be one recursive call, but because NaN != NaN the code does not notice that it already moved the lastCursorPosition.) This endless recursion will cause a stack overflow.

      Obviously there  should not be any NaN in globalPos, but e.g. the evdev touch code produces this sometimes. (I'll file another bug about that.)

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

            srutledg Shawn Rutledge
            steffen-kiess Steffen Kieß
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes