Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Valgrind Memory Analyzer is crashing Qt Creator
Forum Updated to NodeBB v4.3 + New Features

Valgrind Memory Analyzer is crashing Qt Creator

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 487 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.
  • G Offline
    G Offline
    Guerrian
    wrote on 23 Oct 2019, 14:27 last edited by Guerrian
    #1

    Running "Analyzer -> Valgrind Memory Analyzer" in Qt Creator 3.5.1 on Linux Mint 18.3, is mostly crashing Qt. The main window of Qt disappears when this happens.

    When it doesn't crash the only issues that are reported by the analyzer for my application are "external errors".

    Is there a crash log I can look at? Should I worry?

    Here is one of the issues:

    9 bytes in 1 blocks are definitely lost in loss record 282 of 8,078
      in SolveDialog::showSolution(Model&, MD&, int*) in /home/daniel/Documents/Qt/exxx/solvedialog.cpp:127
      1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
      2: /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
      3: _XmbTextListToTextProperty in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
      4: 0x40b438e
      5: QWindow::setTitle(QString const&) in /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.5.1
      6: QWidgetPrivate::setWindowTitle_helper(QString const&) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
      7: QWidget::create(unsigned long long, bool, bool) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
      8: QWidget::setVisible(bool) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
      9: QDialog::setVisible(bool) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
      10: QDialog::exec() in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
      11: SolveDialog::showSolution(Model&, MD&, int*) in /home/daniel/Documents/Qt/exxx/solvedialog.cpp:127
      12: MainWindow::viewSolution() in /home/daniel/Documents/Qt/exxx/mainwindow.cpp:298
      13: MainWindow::solved() in /home/daniel/Documents/Qt/exxx/mainwindow.cpp:424
      14: QObject::event(QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1
      15: QWidget::event(QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
      16: QMainWindow::event(QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
      17: QApplicationPrivate::notify_helper(QObject*, QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
      18: QApplication::notify(QObject*, QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
      19: Application::notify(QObject*, QEvent*) in /home/daniel/Documents/Qt/exxx/main.cpp:107
      20: QCoreApplication::notifyInternal(QObject*, QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1
      21: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1
      22: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1
      23: g_main_context_dispatch in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2
      24: /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2
      25: g_main_context_iteration in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2
    

    The line where this is reported is on an exec command for a dialog. The dialog has code such as:

    SolveDialog::SolveDialog(QWidget *parent) :
        QDialog(parent),
        ui(new Ui::SolveDialog)
    {
        ui->setupUi(this);
        ui->tableWidget->setHorizontalHeaderLabels(QStringList() << tr("Class") << tr("Item Index") << tr("Item Name")
            << tr("Item Cost") << tr("Item Value"));
        setWindowFlags(Qt::Window | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
    }
    
    SolveDialog::~SolveDialog()
    {
        delete ui;
    }
    

    Linux Mint 18.3
    Qt 5.14.1
    Qt Creator 4.11.1

    A 1 Reply Last reply 23 Oct 2019, 15:34
    0
    • G Guerrian
      23 Oct 2019, 14:27

      Running "Analyzer -> Valgrind Memory Analyzer" in Qt Creator 3.5.1 on Linux Mint 18.3, is mostly crashing Qt. The main window of Qt disappears when this happens.

      When it doesn't crash the only issues that are reported by the analyzer for my application are "external errors".

      Is there a crash log I can look at? Should I worry?

      Here is one of the issues:

      9 bytes in 1 blocks are definitely lost in loss record 282 of 8,078
        in SolveDialog::showSolution(Model&amp;, MD&amp;, int*) in /home/daniel/Documents/Qt/exxx/solvedialog.cpp:127
        1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
        2: /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
        3: _XmbTextListToTextProperty in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
        4: 0x40b438e
        5: QWindow::setTitle(QString const&amp;) in /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.5.1
        6: QWidgetPrivate::setWindowTitle_helper(QString const&amp;) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
        7: QWidget::create(unsigned long long, bool, bool) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
        8: QWidget::setVisible(bool) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
        9: QDialog::setVisible(bool) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
        10: QDialog::exec() in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
        11: SolveDialog::showSolution(Model&amp;, MD&amp;, int*) in /home/daniel/Documents/Qt/exxx/solvedialog.cpp:127
        12: MainWindow::viewSolution() in /home/daniel/Documents/Qt/exxx/mainwindow.cpp:298
        13: MainWindow::solved() in /home/daniel/Documents/Qt/exxx/mainwindow.cpp:424
        14: QObject::event(QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1
        15: QWidget::event(QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
        16: QMainWindow::event(QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
        17: QApplicationPrivate::notify_helper(QObject*, QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
        18: QApplication::notify(QObject*, QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
        19: Application::notify(QObject*, QEvent*) in /home/daniel/Documents/Qt/exxx/main.cpp:107
        20: QCoreApplication::notifyInternal(QObject*, QEvent*) in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1
        21: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1
        22: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1
        23: g_main_context_dispatch in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2
        24: /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2
        25: g_main_context_iteration in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2
      

      The line where this is reported is on an exec command for a dialog. The dialog has code such as:

      SolveDialog::SolveDialog(QWidget *parent) :
          QDialog(parent),
          ui(new Ui::SolveDialog)
      {
          ui->setupUi(this);
          ui->tableWidget->setHorizontalHeaderLabels(QStringList() << tr("Class") << tr("Item Index") << tr("Item Name")
              << tr("Item Cost") << tr("Item Value"));
          setWindowFlags(Qt::Window | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
      }
      
      SolveDialog::~SolveDialog()
      {
          delete ui;
      }
      
      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 23 Oct 2019, 15:34 last edited by
      #2

      @Guerrian

      Creator 3.5.1

      You should upgrade! We have 4.10.1 and a 4.11 beta.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      2
      • G Offline
        G Offline
        Guerrian
        wrote on 23 Oct 2019, 15:53 last edited by
        #3

        Hi. I installed Qt with the Software Manager in Linux Mint. Do you have a link to some instructions for upgrading Qt / Qt Creator?

        All I have found is:
        link text

        Thanks

        Linux Mint 18.3
        Qt 5.14.1
        Qt Creator 4.11.1

        A 1 Reply Last reply 23 Oct 2019, 17:43
        0
        • G Guerrian
          23 Oct 2019, 15:53

          Hi. I installed Qt with the Software Manager in Linux Mint. Do you have a link to some instructions for upgrading Qt / Qt Creator?

          All I have found is:
          link text

          Thanks

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 23 Oct 2019, 17:43 last edited by
          #4

          @Guerrian

          http://download.qt.io/official_releases/qtcreator has standalone installers. You can even put that in your $HOME.

          Qt has to stay free or it will die.

          1 Reply Last reply
          1
          • G Offline
            G Offline
            Guerrian
            wrote on 23 Oct 2019, 22:14 last edited by Guerrian
            #5

            I upgraded to Qt Creator 4.10.1 and recompiled my app. I get an actual reported error now as opposed to a crash. So I'm marking this as solved.

            Linux Mint 18.3
            Qt 5.14.1
            Qt Creator 4.11.1

            1 Reply Last reply
            2

            1/5

            23 Oct 2019, 14:27

            • Login

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