Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Valgrind Memory Analyzer is crashing Qt Creator

    General and Desktop
    2
    5
    233
    Loading More Posts
    • 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.
    • Guerrian
      Guerrian last edited by Guerrian

      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

      aha_1980 1 Reply Last reply Reply Quote 0
      • aha_1980
        aha_1980 Lifetime Qt Champion @Guerrian last edited by

        @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 Reply Quote 2
        • Guerrian
          Guerrian last edited by

          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

          aha_1980 1 Reply Last reply Reply Quote 0
          • aha_1980
            aha_1980 Lifetime Qt Champion @Guerrian last edited by

            @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 Reply Quote 1
            • Guerrian
              Guerrian last edited by Guerrian

              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 Reply Quote 2
              • First post
                Last post