Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt4.8 memory leak in QLineEdit::setReadOnly(true)
Forum Updated to NodeBB v4.3 + New Features

Qt4.8 memory leak in QLineEdit::setReadOnly(true)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 4 Posters 549 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.
  • R Offline
    R Offline
    Ramakanth
    wrote on last edited by Ramakanth
    #1

    When we run valgrind on Qt 4.8.4 application using QLineEdit::SetReadOnly(true), it shows memory leak in input-context as shown below. Any suggestions on how to fix the same as it causes segmentation fault on target?

    1 bytes in 1 blocks are still reachable in loss record 1 of 244
    ==4063== at 0x402CE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
    ==4063== by 0x6FFDBC0: _XlcDefaultMapModifiers (in /usr/lib/i386-linux-gnu/libX11.so.6.3.0)
    ==4063== by 0x6FFDFFA: XSetLocaleModifiers (in /usr/lib/i386-linux-gnu/libX11.so.6.3.0)
    ==4063== by 0x4D079BE: ??? (in /home/gator/qt-4.8.4/lib/libQtGui.so.4.8.4)
    ==4063== by 0x4D05983: QInputContextFactory::create(QString const&, QObject*) (in /home/gator/qt-4.8.4/lib/libQtGui.so.4.8.4)
    ==4063== by 0x46ABC51: QApplication::inputContext() const (in /home/gator/qt-4.8.4/lib/libQtGui.so.4.8.4)
    ==4063== by 0x46F4707: QWidgetPrivate::inputContext() const (in /home/gator/qt-4.8.4/lib/libQtGui.so.4.8.4)
    ==4063== by 0x4701140: QWidget::setAttribute(Qt::WidgetAttribute, bool) (in /home/gator/qt-4.8.4/lib/libQtGui.so.4.8.4)
    ==4063== by 0x4B29433: QLineEdit::setReadOnly(bool) (in /home/gator/qt-4.8.4/lib/libQtGui.so.4.8.4)

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The first thing would likely be to update and use a more recent version of Qt. If not Qt 5 then at least Qt 4.8.7 which is the latest and last version of the Qt 4 series.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Ramakanth said in Qt4.8 memory leak in QLineEdit::setReadOnly(true):

        Any suggestions on how to fix the same as it causes segmentation fault on target?

        I don't think that this will cause a segfault - it's allocated once at application startup but not released during destruction which is not good but also not a big deal.

        1 Reply Last reply
        2
        • A Offline
          A Offline
          adomanim
          Banned
          wrote on last edited by
          #4
          This post is deleted!
          Christian EhrlicherC 1 Reply Last reply
          -2
          • A adomanim

            This post is deleted!

            Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            1

            • Login

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