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

Memory leakage due to QT Libraries (libQtGui.so.4.8.7 and libQtCore.so.4.8.7)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Invalid
    • Affects Version/s: 4.8.7
    • Fix Version/s: None
    • Component/s: Build tools: qmake
    • Labels:
      None
    • Environment:
      Using centos 6.7, Qt 4.8.7, netbeans 8.2, opengl and c++
    • Platform/s:
      Linux/X11

      Description

      I am getting memory leakage in my c++ projects while using qt 4.8.7. I am testing my project with valgrind tool. The memory leakage is in Qt libraries like QTGui and QTCore.

      for example: 

      1,040 bytes in 26 blocks are possibly lost in loss record 8,747 of 9,242
      ==5013== at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
      ==5013== by 0x5CAF470: QListData::detach_grow(int*, int) (in /opt/qt4/lib/libQtCore.so.4.8.7)
      ==5013== by 0x5CAA09B: ??? (in /opt/qt4/lib/libQtCore.so.4.8.7)
      ==5013== by 0x5D4ED44: ??? (in /opt/qt4/lib/libQtCore.so.4.8.7)
      ==5013== by 0x5D4F50B: ??? (in /opt/qt4/lib/libQtCore.so.4.8.7)
      ==5013== by 0x5D51D54: ??? (in /opt/qt4/lib/libQtCore.so.4.8.7)
      ==5013== by 0x5D53172: ??? (in /opt/qt4/lib/libQtCore.so.4.8.7)
      ==5013== by 0x5D4AC86: QSettings::value(QString const&, QVariant const&) const (in /opt/qt4/lib/libQtCore.so.4.8.7)
      ==5013== by 0x5D73F52: QFactoryLoader::updateDir(QString const&, QSettings&) (in /opt/qt4/lib/libQtCore.so.4.8.7)
      ==5013== by 0x5D75DCC: QFactoryLoader::update() (in /opt/qt4/lib/libQtCore.so.4.8.7)
      ==5013== by 0x5D760FA: QFactoryLoader::QFactoryLoader(char const*, QString const&, Qt::CaseSensitivity) (in /opt/qt4/lib/libQtCore.so.4.8.7)

       

      ==5013== by 0x56D3551: ??? (in /opt/qt4/lib/libQtGui.so.4.8.7)

      ==5013== 4,176 (1,536 direct, 2,640 indirect) bytes in 3 blocks are definitely lost in loss record 9,048 of 9,242
      ==5013== at 0x4A06C20: realloc (vg_replace_malloc.c:662)
      ==5013== by 0x33050197F1: ??? (in /usr/lib64/libfontconfig.so.1.4.4)
      ==5013== by 0x330501A2C7: ??? (in /usr/lib64/libfontconfig.so.1.4.4)
      ==5013== by 0x330501A4B8: FcPatternDuplicate (in /usr/lib64/libfontconfig.so.1.4.4)
      ==5013== by 0x5405898: QFontEngineMultiFT::QFontEngineMultiFT(QFontEngine*, _FcPattern*, _FcPattern*, int, QFontDef const&) (in /opt/qt4/lib/libQtGui.so.4.8.7)

      ==5013== by 0x5355694: ??? (in /opt/qt4/lib/libQtGui.so.4.8.7)
      ==5013== by 0x5359F1F: QFontDatabase::load(QFontPrivate const*, int) (in /opt/qt4/lib/libQtGui.so.4.8.7)
      ==5013== by 0x533271C: QFontPrivate::engineForScript(int) const (in /opt/qt4/lib/libQtGui.so.4.8.7)
      ==5013== by 0x5348E7D: QFontMetricsF::leading() const (in /opt/qt4/lib/libQtGui.so.4.8.7)
      ==5013== by 0x5262A94: ??? (in /opt/qt4/lib/libQtGui.so.4.8.7)
      ==5013== by 0x5263BFD: QPainter::drawText(QRect const&, int, QString const&, QRect*) (in /opt/qt4/lib/libQtGui.so.4.8.7)
      ==5013== by 0x54A5905: QCleanlooksStyle::drawItemText(QPainter*, QRect const&, int, QPalette const&, bool, QString const&, QPalette::ColorRole) const (in /opt/qt4/lib/libQtGui.so.4.8.7)

       

      18,432 bytes in 256 blocks are possibly lost in loss record 9,182 of 9,242
      ==5013== at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
      ==5013== by 0x3301049CD4: g_malloc (in /lib64/libglib-2.0.so.0.2800.8)
      ==5013== by 0x3417D18F88: ??? (in /usr/lib64/libgtk-x11-2.0.so.0.2400.23)
      ==5013== by 0x3417D19087: ??? (in /usr/lib64/libgtk-x11-2.0.so.0.2400.23)
      ==5013== by 0x3417D19087: ??? (in /usr/lib64/libgtk-x11-2.0.so.0.2400.23)
      ==5013== by 0x3417D1A0B8: ??? (in /usr/lib64/libgtk-x11-2.0.so.0.2400.23)
      ==5013== by 0x3417D1A742: ??? (in /usr/lib64/libgtk-x11-2.0.so.0.2400.23)
      ==5013== by 0x3417D1BF49: gtk_icon_theme_lookup_icon (in /usr/lib64/libgtk-x11-2.0.so.0.2400.23)
      ==5013== by 0x3417D1C0FB: gtk_icon_theme_load_icon (in /usr/lib64/libgtk-x11-2.0.so.0.2400.23)
      ==5013== by 0x3417D166D1: gtk_icon_set_render_icon (in /usr/lib64/libgtk-x11-2.0.so.0.2400.23)
      ==5013== by 0x5495069: ??? (in /opt/qt4/lib/libQtGui.so.4.8.7)
      ==5013== by 0x5486EC8: QGtkStyle::standardIconImplementation(QStyle::StandardPixmap, QStyleOption const*, QWidget const*) const (in /opt/qt4/lib/libQtGui.so.4.8.7)

       

      Is there any solution of removing memory bugs of qt related libraries as its a source of high memory. Please see my latest comment for more detail.

        Attachments

        1. error
          3 kB
        2. Opengl
          885 kB
        3. Opengl.zip
          1008 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            shujja shujja butt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes