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

XCB: Memory leak of QXcbScrollingDevicePrivate for a device that is not a mouse

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.3.1, 6.4.0 Beta1
    • 6.3
    • QPA: X11/XCB
    • None
    • 3116eddb68 (qt/qtbase/dev) 2542708e98 (qt/qtbase/6.3) 2542708e98 (qt/tqtc-qtbase/6.3) 3116eddb68 (qt/tqtc-qtbase/dev)

    Description

      Valgrind informs this leak:

      ==1585319== 1,112 (720 direct, 392 indirect) bytes in 2 blocks are definitely lost in loss record 110 of 123
      ==1585319==    at 0x483EF2F: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==1585319==    by 0x7D01D6C: QXcbConnection::xi2SetupSlavePointerDevice(void*, bool, QPointingDevice*)::{lambda()#1}::operator()() const (qxcbconnection_xi2.cpp:262)
      ==1585319==    by 0x7D025C2: QXcbConnection::xi2SetupSlavePointerDevice(void*, bool, QPointingDevice*) (qxcbconnection_xi2.cpp:316)
      ==1585319==    by 0x7D03D2D: QXcbConnection::xi2SetupDevices() (qxcbconnection_xi2.cpp:499)
      ==1585319==    by 0x7CE81A3: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:105)
      ==1585319==    by 0x7D27BEA: QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) (qxcbintegration.cpp:199)
      ==1585319==    by 0x7C9D282: QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) (qxcbmain.cpp:56)
      ==1585319==    by 0x4B516DE: QPlatformIntegration* qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin, QList<QString> const&, int&, char**&>(QFactoryLoader const*, QString const&, QList<QString> const&, int&, char**&) (qfactoryloader_p.h:108)
      ==1585319==    by 0x4B512A9: QPlatformIntegrationFactory::create(QString const&, QList<QString> const&, int&, char**, QString const&) (qplatformintegrationfactory.cpp:71)
      ==1585319==    by 0x4B074EC: init_platform(QString const&, QString const&, QString const&, int&, char**) (qguiapplication.cpp:1209)
      ==1585319==    by 0x4B0A646: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1491)
      ==1585319==    by 0x4B0A7C9: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1508)
      ==1585319==    by 0x568853F: QCoreApplicationPrivate::init() (qcoreapplication.cpp:847)
      ==1585319==    by 0x4B0A89F: QGuiApplicationPrivate::init() (qguiapplication.cpp:1532)
      ==1585319==    by 0x4B05D16: QGuiApplication::QGuiApplication(int&, char**, int) (qguiapplication.cpp:653)
      ==1585319==    by 0x451613: main (tst_qmetatype.cpp:2141)
      

      Running with the logging rules on prints shortly before the leak:

      qt.qpa.input.devices: input device  "Wacom HID 48EE Pen stylus" ID 13
      qt.qpa.input.devices:    has 8 buttons
      qt.qpa.input.devices:    it's a keyboard
      qt.qpa.input.devices:    has valuator "Abs X" recognized? true
      qt.qpa.input.devices:    has valuator "Abs Y" recognized? true
      qt.qpa.input.devices:    has valuator "Abs Pressure" recognized? true
      qt.qpa.input.devices:    has valuator "Abs Tilt X" recognized? true
      qt.qpa.input.devices:    has valuator "Abs Tilt Y" recognized? true
      qt.qpa.input.devices:    has valuator "Abs Wheel" recognized? true
      qt.qpa.input.devices:    it's a tablet with pointer type "pen"
      qt.qpa.input.devices: register QPointingDevice("Wacom HID 48EE Pen stylus" Stylus id=d seat=30002 ptrType=Pen caps=Position|Pressure|MouseEmulation|Hover|XTilt|YTilt uniqueId=0)
      qt.qpa.input.devices:    it's a scrolling device
      

      XI2 properties:

      $ xinput list-props 13
      Device 'Wacom HID 48EE Pen stylus':
              Device Enabled (178):   1
              Coordinate Transformation Matrix (180): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
              Device Accel Profile (312):     0
              Device Accel Constant Deceleration (313):       1.000000
              Device Accel Adaptive Deceleration (314):       1.000000
              Device Accel Velocity Scaling (315):    10.000000
              Device Node (304):      "/dev/input/event14"
              Wacom Tablet Area (345):        0, 0, 28800, 18000
              Wacom Rotation (346):   0
              Wacom Pressurecurve (347):      0, 0, 100, 100
              Wacom Serial IDs (348): 18670, 0, 2, 0, 0
              Wacom Serial ID binding (349):  0
              Wacom Proximity Threshold (350):        30
              Wacom Pressure Threshold (351): 27
              Wacom Sample and Suppress (352):        2, 4
              Wacom Enable Touch (353):       0
              Wacom Hover Click (354):        1
              Wacom Enable Touch Gesture (355):       0
              Wacom Touch Gesture Parameters (356):   0, 0, 250
              Wacom Tool Type (357):  "STYLUS" (338)
              Wacom Button Actions (358):     "Wacom button action 0" (359), "Wacom button action 1" (360), "Wacom button action 2" (361), "None" (0), "None" (0), "None" (0), "None" (0), "Wacom button action 3" (362)
              Wacom button action 0 (359):    1572865
              Wacom button action 1 (360):    1572866
              Wacom button action 2 (361):    1572867
              Wacom button action 3 (362):    1572872
              Wacom Pressure Recalibration (363):     1
              Wacom Panscroll Threshold (364):        1300
              Device Product ID (305):        1386, 18670
              Wacom Log Mask (365):   0
              Wacom Debug Levels (366):       0, 0
      

      Attachments

        Issue Links

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

          Activity

            People

              liaqi Liang Qi
              thiago Thiago Macieira
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes