Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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/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;
    }
    

  • Lifetime Qt Champion

    @Guerrian

    Creator 3.5.1

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

    Regards



  • 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


  • Lifetime Qt Champion

    @Guerrian

    http://download.qt.io/official_releases/qtcreator 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