Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21416

Crash when opening .pro file

    XMLWordPrintable

    Details

    • Commits:
      5f79b5d2e5e33321cdcd00362f0d6d9442a73ec2 (qt-creator/qt-creator/4.8) 1f998e040eb7202691f4a4eb5fb77499247b2aab (qt/qtbase/5.12)

      Description

      I just caught an instance where apparently a QMakeEvaluator is deleted from thread 2 while it is parsing the project in thread 1. I don't have debug symbols, but the backtraces are still quite illuminating:

      Thread 1, this segfaults:

      #0  0x00007f29d66098e0 in QHash<QString, int>::findNode(QString const&, unsigned int) const () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #1  0x00007f29d6608b51 in QMakeVfs::idForFileName(QString const&, QFlags<QMakeVfs::VfsFlag>) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #2  0x00007f29d65f27fd in QMakeEvaluator::writeFile(QString const&, QString const&, QFlags<QIODevice::OpenModeFlag>, QFlags<QMakeVfs::VfsFlag>, QString const&) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #3  0x00007f29d65f5bef in QMakeEvaluator::evaluateBuiltinConditional(int, ProKey const&, ProStringList const&) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #4  0x00007f29d65ea94b in QMakeEvaluator::evaluateConditionalFunction(ProKey const&, unsigned short const*&) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #5  0x00007f29d65e6554 in QMakeEvaluator::visitProBlock(unsigned short const*) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #6  0x00007f29d65e6534 in QMakeEvaluator::visitProBlock(unsigned short const*) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #7  0x00007f29d65e977c in QMakeEvaluator::evaluateFunction(ProFunctionDef const&, QList<ProStringList> const&, ProStringList*) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #8  0x00007f29d65e99e0 in QMakeEvaluator::evaluateBoolFunction(ProFunctionDef const&, QList<ProStringList> const&, ProString const&) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #9  0x00007f29d65ea8ba in QMakeEvaluator::evaluateConditionalFunction(ProKey const&, unsigned short const*&) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #10 0x00007f29d65e6554 in QMakeEvaluator::visitProBlock(unsigned short const*) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #11 0x00007f29d65e977c in QMakeEvaluator::evaluateFunction(ProFunctionDef const&, QList<ProStringList> const&, ProStringList*) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #12 0x00007f29d65e99e0 in QMakeEvaluator::evaluateBoolFunction(ProFunctionDef const&, QList<ProStringList> const&, ProString const&) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #13 0x00007f29d65ea8ba in QMakeEvaluator::evaluateConditionalFunction(ProKey const&, unsigned short const*&) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #14 0x00007f29d65e6554 in QMakeEvaluator::visitProBlock(unsigned short const*) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #15 0x00007f29d65e6ae1 in QMakeEvaluator::visitProFile(ProFile*, QMakeHandler::EvalFileType, QFlags<QMakeEvaluator::LoadFlag>) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #16 0x00007f29d65e7443 in QMakeEvaluator::evaluateFile(QString const&, QMakeHandler::EvalFileType, QFlags<QMakeEvaluator::LoadFlag>) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #17 0x00007f29d65e7f5f in QMakeEvaluator::evaluateFeatureFile(QString const&, bool) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #18 0x00007f29d65e83a9 in QMakeEvaluator::evaluateConfigFeatures() () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #19 0x00007f29d65e6bcb in QMakeEvaluator::visitProFile(ProFile*, QMakeHandler::EvalFileType, QFlags<QMakeEvaluator::LoadFlag>) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #20 0x00007f29d65eeb08 in ProFileEvaluator::accept(ProFile*, QFlags<QMakeEvaluator::LoadFlag>) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #21 0x00007f29c7429db4 in evaluateOne(QmakeProjectManager::Internal::QmakeEvalInput const&, ProFile*, QtSupport::ProFileReader*, bool, QtSupport::ProFileReader**) [clone .constprop.172] ()
         from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmakeProjectManager.so
      #22 0x00007f29c742f1d7 in QmakeProjectManager::QmakeProFile::evaluate(QmakeProjectManager::Internal::QmakeEvalInput const&) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmakeProjectManager.so
      #23 0x00007f29c7432373 in QmakeProjectManager::QmakeProFile::asyncEvaluate(QFutureInterface<QmakeProjectManager::Internal::QmakeEvalResult*>&, QmakeProjectManager::Internal::QmakeEvalInput) ()
         from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmakeProjectManager.so
      #24 0x00007f29c743c3ba in void Utils::Internal::runAsyncMemberDispatch<QmakeProjectManager::Internal::QmakeEvalResult*, Utils::Internal::MemberCallable<void (QmakeProjectManager::QmakeProFile::*)(QFutureInterface<QmakeProjectManager::Internal::QmakeEvalResult*>&, QmakeProjectManager::Internal::QmakeEvalInput)>, QmakeProjectManager::Internal::QmakeEvalInput, void>(QFutureInterface<QmakeProjectManager::Internal::QmakeEvalResult*>, Utils::Internal::MemberCallable<void (QmakeProjectManager::QmakeProFile::*)(QFutureInterface<QmakeProjectManager::Internal::QmakeEvalResult*>&, QmakeProjectManager::Internal::QmakeEvalInput)>&&, QmakeProjectManager::Internal::QmakeEvalInput&&) ()
         from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmakeProjectManager.so
      #25 0x00007f29c743c533 in Utils::Internal::AsyncJob<QmakeProjectManager::Internal::QmakeEvalResult*, void (QmakeProjectManager::QmakeProFile::*)(QFutureInterface<QmakeProjectManager::Internal::QmakeEvalResult*>&, QmakeProjectManager::Internal::QmakeEvalInput), QmakeProjectManager::QmakeProFile*, QmakeProjectManager::Internal::QmakeEvalInput&>::run() () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmakeProjectManager.so
      #26 0x00007f29ed00ce3f in QThreadPoolThread::run() () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #27 0x00007f29ed016564 in QThreadPrivate::start(void*) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #28 0x00007f29ecae0494 in start_thread (arg=0x7f2995098700) at pthread_create.c:333
      #29 0x00007f29ebf85acf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Thread 2, incidentally deleting a QMakeEvaluator at the same time:

      #0  _int_free (av=0x7f296c000020, p=0x7f296c094fa0, have_lock=0) at malloc.c:3962
      #1  0x00007f29ed064314 in QHashData::free_helper(void (*)(QHashData::Node*)) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #2  0x00007f29d65e03d6 in QLinkedList<QHash<ProKey, ProStringList> >::freeData(QLinkedListData*) [clone .isra.31] () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #3  0x00007f29d65e11bb in QMakeEvaluator::~QMakeEvaluator() () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #4  0x00007f29d65ee511 in ProFileEvaluator::~ProFileEvaluator() () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #5  0x00007f29d6648b29 in QtSupport::ProFileReader::~ProFileReader() () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #6  0x00007f29d6648c99 in QtSupport::ProFileReader::~ProFileReader() () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQtSupport.so
      #7  0x00007f29c7447e29 in QmakeProjectManager::QmakeProject::destroyProFileReader(QtSupport::ProFileReader*) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmakeProjectManager.so
      #8  0x00007f29c7426aae in QmakeProjectManager::QmakeProFile::cleanupProFileReaders() () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmakeProjectManager.so
      #9  0x00007f29c7433600 in QmakeProjectManager::QmakeProFile::applyEvaluate(QmakeProjectManager::Internal::QmakeEvalResult*) () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmakeProjectManager.so
      #10 0x00007f29c7433a20 in QmakeProjectManager::QmakeProFile::applyAsyncEvaluate() () from /home/ulf/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmakeProjectManager.so
      #11 0x00007f29ed1f94b6 in QMetaObject::activate(QObject*, int, int, void**) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #12 0x00007f29ed013ae1 in QFutureWatcherBase::event(QEvent*) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #13 0x00007f29ee5b9e2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Widgets.so.5
      #14 0x00007f29ee5c0f60 in QApplication::notify(QObject*, QEvent*) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Widgets.so.5
      #15 0x00007f29ed1ce2d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #16 0x00007f29ed1d0ceb in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #17 0x00007f29ed222d93 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #18 0x00007f29e8d8a7f7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      #19 0x00007f29e8d8aa60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      #20 0x00007f29e8d8ab0c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      #21 0x00007f29ed2223ff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #22 0x00007f29e5ba30d1 in QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/ulf/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5
      #23 0x00007f29ed1ccc3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #24 0x00007f29ed1d5640 in QCoreApplication::exec() () from /home/ulf/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5
      #25 0x00000000004099f4 in main ()
      

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                allan.jensen Allan Sandfeld Jensen
                Reporter:
                ulherman Ulf Hermann
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes