Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Both Asan and Valgrind show memory leak in QScroller::grabGesture(QObject*, QScroller::ScrollerGestureType)
Forum Updated to NodeBB v4.3 + New Features

Both Asan and Valgrind show memory leak in QScroller::grabGesture(QObject*, QScroller::ScrollerGestureType)

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 711 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote on last edited by
    #1

    From valgrind:
    ==2274392== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==2274392== by 0x61D8469: QScroller::grabGesture(QObject*, QScroller::ScrollerGestureType) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3)

    From Asan
    #0 0x7f6f39cc81e7 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x7f6f2f2b6413 in QScroller::grabGesture(QObject*, QScroller::ScrollerGestureType) (/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x512413)

    Had a look at the source of QScroller and could not see the leak.
    https://codebrowser.dev/qt5/qtbase/src/widgets/util/qscroller.cpp.html

    And calling QScroller::ungrabGesture( QObject*) does not help.

    Qt 5.15.3 and Ubuntu 22.04

    JoeCFDJ kshegunovK 2 Replies Last reply
    0
    • JoeCFDJ JoeCFD

      From valgrind:
      ==2274392== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==2274392== by 0x61D8469: QScroller::grabGesture(QObject*, QScroller::ScrollerGestureType) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3)

      From Asan
      #0 0x7f6f39cc81e7 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
      #1 0x7f6f2f2b6413 in QScroller::grabGesture(QObject*, QScroller::ScrollerGestureType) (/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x512413)

      Had a look at the source of QScroller and could not see the leak.
      https://codebrowser.dev/qt5/qtbase/src/widgets/util/qscroller.cpp.html

      And calling QScroller::ungrabGesture( QObject*) does not help.

      Qt 5.15.3 and Ubuntu 22.04

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      @JoeCFD created a bug report here and see if qt folks can confirm that there is some leak.
      https://bugreports.qt.io/browse/QTBUG-124875

      1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        From valgrind:
        ==2274392== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
        ==2274392== by 0x61D8469: QScroller::grabGesture(QObject*, QScroller::ScrollerGestureType) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3)

        From Asan
        #0 0x7f6f39cc81e7 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
        #1 0x7f6f2f2b6413 in QScroller::grabGesture(QObject*, QScroller::ScrollerGestureType) (/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x512413)

        Had a look at the source of QScroller and could not see the leak.
        https://codebrowser.dev/qt5/qtbase/src/widgets/util/qscroller.cpp.html

        And calling QScroller::ungrabGesture( QObject*) does not help.

        Qt 5.15.3 and Ubuntu 22.04

        kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by
        #3

        Are you certain it's not a false positive? As far as I hear valgrind really chokes on the QObject ownership (i.e. the object trees).

        Read and abide by the Qt Code of Conduct

        JoeCFDJ 1 Reply Last reply
        0
        • kshegunovK kshegunov

          Are you certain it's not a false positive? As far as I hear valgrind really chokes on the QObject ownership (i.e. the object trees).

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by JoeCFD
          #4

          @kshegunov I do know valgrind leak report may not be correct sometimes. I have one case in my app. But I am not sure about this one. Let Qt guys confirm the issue.

          Christian EhrlicherC 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            @kshegunov I do know valgrind leak report may not be correct sometimes. I have one case in my app. But I am not sure about this one. Let Qt guys confirm the issue.

            Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @JoeCFD At least you should try it with Qt6.7 - I doubt someone will take a look on such things for an old Qt version just to see it's not there with recent Qt head.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            JoeCFDJ 1 Reply Last reply
            1
            • Christian EhrlicherC Christian Ehrlicher

              @JoeCFD At least you should try it with Qt6.7 - I doubt someone will take a look on such things for an old Qt version just to see it's not there with recent Qt head.

              JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote on last edited by
              #6

              @Christian-Ehrlicher Good point. Busy with a release and no time to check it out. The bug report has been marked as Critical by Qt guys.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved