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

QFbCursor memory leak

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.2.8, 6.5.0, 6.6.0
    • 6.2.6
    • QPA
    • None
    • Linux/Yocto
    • bb84232b0 (dev), e31cbbaef (6.5), 9657c4a44 (tqtc/lts-6.2), 5ea126d82 (6.4)

    Description

      =================================================================
      ==32512==ERROR: LeakSanitizer: detected memory leaksDirect leak of 20 byte(s) in 1 object(s) allocated from:
          #0 0xb6a64d34 in operator new(unsigned int) /tmp/firmware/build-arm-s805/arm-rtk-linux-gnueabihf/.build/arm-rtk-linux-gnueabihf/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
          #1 0xb15ce160 in QFbCursor::QFbCursor(QFbScreen*) /stb-firmware/_dependencies/qtbase/src/platformsupport/fbconvenience/qfbcursor.cpp:72
          #2 0xb15cbfe4 in QLinuxFbScreen::initialize() (/usr/local/qt/plugins/platforms/libqpa-amlogic.so+0xefe4)
          #3 0xb15ca41c in QLinuxFbIntegration::initialize() (/usr/local/qt/plugins/platforms/libqpa-amlogic.so+0xd41c)
          #4 0xb3fd8484 in QCoreApplicationPrivate::init() (/usr/local/qt/lib/libQt6Core.so.6+0x137484)
          #5 0xb4569e38 in QGuiApplicationPrivate::init() (/usr/local/qt/lib/libQt6Gui.so.6+0x150e38)
          #6 0xb4cb0360 in QApplicationPrivate::init() (/usr/local/qt/lib/libQt6Widgets.so.6+0x80360)
          #7 0xb4cb0420 in QApplication::QApplication(int&, char**, int) (/usr/local/qt/lib/libQt6Widgets.so.6+0x80420)
          #8 0x16940 in main /stb-firmware/_dependencies/sdk-mediaplayer/example/main.cpp:602
          #9 0xb3b6376c  (/lib/libc.so.6+0x1d76c)
          #10 0xb3b63874 in __libc_start_main (/lib/libc.so.6+0x1d874)
       

      I think we should use a smart pointer here

      mCursorImage = new QPlatformCursorImage(0, 0, 0, 0, 0, 0); 

      like

      mCursorImage.reset(new QPlatformCursorImage(0, 0, 0, 0, 0, 0));

      Attachments

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

        Activity

          People

            liaqi Liang Qi
            lma10h Raphael Osipov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes