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

QSerialPortInfo::availablePorts() leads to a memory leak

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.3.0 RC1, 5.3.0
    • 5.2.1
    • Serial Port
    • None
    • Linux laurensdesktop 3.8.0-32-generic #47-Ubuntu SMP Tue Oct 1 22:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    • 33bd1e08d0043e9b1340898039562bdf595879b5

    Description

      I've made some code to detect serial devices. The code works fine. However, analysing the memory using valgrind memory analyser results in the conclusion that there is some memory lost.

      It might be useful to report this issue.

      162,871 (44,352 direct, 118,519 indirect) bytes in 99 blocks are definitely lost in loss record 10,088 of 10,090
      in DeviceDetector::refresh() in src/gui/devicedetector.cpp:25
      1: calloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
      2: /lib/x86_64-linux-gnu/libudev.so.1.3.5
      3: udev_device_new_from_syspath in /lib/x86_64-linux-gnu/libudev.so.1.3.5
      4: /home/laurens/Qt5.2.1/5.2.1/gcc_64/lib/libQt5SerialPort.so.5.2.1
      5: QSerialPortInfo::availablePorts() in /home/laurens/Qt5.2.1/5.2.1/gcc_64/lib/libQt5SerialPort.so.5.2.1
      6: DeviceDetector::refresh() in <a href="file:///home/laurens/projects/build-configurator-Desktop_Qt_5_2_1_GCC_64bit-Debug/src/gui/../../../s001_configurator/src/gui/devicedetector.cpp:25" >src/gui/devicedetector.cpp:25</a>
      7: DeviceDetector::DeviceDetector(QObject*) in <a href="file:///home/laurens/projects/build-configurator-Desktop_Qt_5_2_1_GCC_64bit-Debug/src/gui/../../../s001_configurator/src/gui/devicedetector.cpp:13" >src/gui/devicedetector.cpp:13</a>
      8: MainWindow::MainWindow(QWidget*) in <a href="file:///home/laurens/projects/build-configurator-Desktop_Qt_5_2_1_GCC_64bit-Debug/src/gui/../../../s001_configurator/src/gui/gui_mainwindow.cpp:14" >src/gui/gui_mainwindow.cpp:14</a>
      9: main in <a href="file:///home/laurens/projects/build-configurator-Desktop_Qt_5_2_1_GCC_64bit-Debug/src/gui/../../../s001_configurator/src/gui/main.cpp:7" >src/gui/main.cpp:7</a>

      Attachments

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

        Activity

          People

            lpapp Laszlo Papp
            lcoudeville Laurens Coudeville
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes