Important: Please read the Qt Code of Conduct -

Valgrind Memory Analyzer is crashing Qt Creator

  • 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/
      2: /usr/lib/x86_64-linux-gnu/
      3: _XmbTextListToTextProperty in /usr/lib/x86_64-linux-gnu/
      4: 0x40b438e
      5: QWindow::setTitle(QString const&) in /usr/lib/x86_64-linux-gnu/
      6: QWidgetPrivate::setWindowTitle_helper(QString const&) in /usr/lib/x86_64-linux-gnu/
      7: QWidget::create(unsigned long long, bool, bool) in /usr/lib/x86_64-linux-gnu/
      8: QWidget::setVisible(bool) in /usr/lib/x86_64-linux-gnu/
      9: QDialog::setVisible(bool) in /usr/lib/x86_64-linux-gnu/
      10: QDialog::exec() in /usr/lib/x86_64-linux-gnu/
      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/
      15: QWidget::event(QEvent*) in /usr/lib/x86_64-linux-gnu/
      16: QMainWindow::event(QEvent*) in /usr/lib/x86_64-linux-gnu/
      17: QApplicationPrivate::notify_helper(QObject*, QEvent*) in /usr/lib/x86_64-linux-gnu/
      18: QApplication::notify(QObject*, QEvent*) in /usr/lib/x86_64-linux-gnu/
      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/
      21: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) in /usr/lib/x86_64-linux-gnu/
      22: /usr/lib/x86_64-linux-gnu/
      23: g_main_context_dispatch in /lib/x86_64-linux-gnu/
      24: /lib/x86_64-linux-gnu/
      25: g_main_context_iteration in /lib/x86_64-linux-gnu/

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

    SolveDialog::SolveDialog(QWidget *parent) :
        ui(new Ui::SolveDialog)
        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);
        delete ui;

  • Lifetime Qt Champion


    Creator 3.5.1

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


  • 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


  • Lifetime Qt Champion

    @Guerrian has standalone installers. You can even put that in your $HOME.

  • 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.

Log in to reply