CompilationDatabaseProjectManager: crashes qtcreator when the .json file is modified Backtraces, all end with: Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f8401741120 in QList::QList(QList const&) () from /home/totto/dev/qt-creator-build/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #0 0x00007f8401741120 in QList::QList(QList const&) () from /home/totto/dev/qt-creator-build/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #1 0x00007f84017fb558 in ProjectExplorer::TreeScanner::release() () from /home/totto/dev/qt-creator-build/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #2 0x00007f83f705a1cb in CompilationDatabaseProjectManager::Internal::CompilationDatabaseProject::buildTreeAndProjectParts(Utils::FileName const&) () from /home/totto/dev/qt-creator-build/qt-creator-build/lib/qtcreator/plugins/libCompilationDatabaseProjectManager.so #3 0x00007f83f705a6a6 in Utils::Internal::AsyncJob::run() () from /home/totto/dev/qt-creator-build/qt-creator-build/lib/qtcreator/plugins/libCompilationDatabaseProjectManager.so #4 0x00007f841517345d in Utils::Internal::RunnableThread::run() () from /home/totto/dev/qt-creator-build/qt-creator-build/bin/../lib/qtcreator/libUtils.so.4 #5 0x00007f8413ee9620 in ?? () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #6 0x00007f8413986dd5 in start_thread () from /lib64/libpthread.so.0 #7 0x00007f8412e14ead in clone () from /lib64/libc.so.6 #0 0x0000000000020005 in ?? () #1 0x00007f7e56b91ec1 in ProjectExplorer::Internal::FlatModel::flags(QModelIndex const&) const () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #2 0x00007f7e6a1e3fcd in QTreeViewPrivate::layout(int, bool, bool) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #3 0x00007f7e6a1e40ae in QTreeViewPrivate::layout(int, bool, bool) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #4 0x00007f7e6a1eba61 in QTreeView::doItemsLayout() () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #5 0x00007f7e6a17f9cd in QAbstractItemView::timerEvent(QTimerEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #6 0x00007f7e6a1ebf92 in QTreeView::timerEvent(QTimerEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #7 0x00007f7e694ee2bb in QObject::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #8 0x00007f7e69f8b7ab in QWidget::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #9 0x00007f7e6a02ba9e in QFrame::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #10 0x00007f7e6a02e51c in QAbstractScrollArea::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #11 0x00007f7e6a188e85 in QAbstractItemView::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #12 0x00007f7e69f4f7d1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #13 0x00007f7e69f569a0 in QApplication::notify(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #14 0x00007f7e694c5c39 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #15 0x00007f7e69513fa8 in QTimerInfoList::activateTimers() () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #16 0x00007f7e6951222c in QEventDispatcherUNIX::processEvents(QFlags) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #17 0x00007f7e600dd4ed in ?? () from /opt/qt-5.11.1/plugins/platforms/../../lib/libQt5XcbQpa.so.5 #18 0x00007f7e694c4a4b in QEventLoop::exec(QFlags) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #19 0x00007f7e694cc7ae in QCoreApplication::exec() () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #20 0x000000000040ae5f in main () #0 0x00007fb2b84737bf in ProjectExplorer::Internal::FlatModel::data(QModelIndex const&, int) const () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #1 0x00007fb2c7a5255d in QStyledItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #2 0x00007fb2c7a923ed in QTreeViewPrivate::widthHintForIndex(QModelIndex const&, int, QStyleOptionViewItem const&, int) const () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #3 0x00007fb2c7a94eeb in QTreeView::sizeHintForColumn(int) const () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #4 0x00007fb2b84564a9 in ProjectTreeView::sizeHintForColumn(int) const () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #5 0x00007fb2c7a40aa1 in ?? () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #6 0x00007fb2c7a41199 in QHeaderView::visualIndexAt(int) const () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #7 0x00007fb2c7a9293e in QTreeView::indexRowSizeHint(QModelIndex const&) const () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #8 0x00007fb2c7a9adfd in QTreeView::dataChanged(QModelIndex const&, QModelIndex const&, QVector const&) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #9 0x00007fb2c7a30fa8 in ?? () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #10 0x00007fb2c6d9ca93 in QMetaObject::activate(QObject*, int, int, void**) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #11 0x00007fb2c6d2be0d in QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&, QVector const&) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #12 0x00007fb2b8473541 in ProjectExplorer::Internal::FlatModel::parsingStateChanged(ProjectExplorer::Project*) () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #13 0x00007fb2c6d9cbf0 in QMetaObject::activate(QObject*, int, int, void**) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #14 0x00007fb2a9bbfa8d in CompilationDatabaseProjectManager::Internal::CompilationDatabaseProject::reparseProject() () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libCompilationDatabaseProjectManager.so #15 0x00007fb2c6d9cbf0 in QMetaObject::activate(QObject*, int, int, void**) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #16 0x00007fb2c7e93522 in Utils::FileSystemWatcher::fileChanged(QString const&) () from /home/totto/dev/qt-creator-build/bin/../lib/qtcreator/libUtils.so.4 #17 0x00007fb2c6d9cbf0 in QMetaObject::activate(QObject*, int, int, void**) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #18 0x00007fb2c6d0171c in QFileSystemWatcher::fileChanged(QString const&, QFileSystemWatcher::QPrivateSignal) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #19 0x00007fb2c6d9ca93 in QMetaObject::activate(QObject*, int, int, void**) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #20 0x00007fb2c6d017a3 in ?? () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #21 0x00007fb2c6d2af05 in ?? () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #22 0x00007fb2c6d9ca93 in QMetaObject::activate(QObject*, int, int, void**) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #23 0x00007fb2c6da7ba9 in QSocketNotifier::activated(int, QSocketNotifier::QPrivateSignal) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #24 0x00007fb2c6da7e91 in QSocketNotifier::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #25 0x00007fb2c77fe7d1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #26 0x00007fb2c78059a0 in QApplication::notify(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #27 0x00007fb2c6d74c39 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #28 0x00007fb2c6dc0ebb in QEventDispatcherUNIXPrivate::activateSocketNotifiers() () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #29 0x00007fb2c6dc1197 in QEventDispatcherUNIX::processEvents(QFlags) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #30 0x00007fb2bd98c4ed in ?? () from /opt/qt-5.11.1/plugins/platforms/../../lib/libQt5XcbQpa.so.5 #31 0x00007fb2c6d73a4b in QEventLoop::exec(QFlags) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #32 0x00007fb2c6d7b7ae in QCoreApplication::exec() () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #33 0x000000000040ae5f in main () #0 0x00007efce3344c7c in ProjectExplorer::sortWrapperNodes(ProjectExplorer::Internal::WrapperNode const*, ProjectExplorer::Internal::WrapperNode const*) () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #0 0x00007efce3344c7c in ProjectExplorer::sortWrapperNodes(ProjectExplorer::Internal::WrapperNode const*, ProjectExplorer::Internal::WrapperNode const*) () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #1 0x00007efce334b29b in std::_Function_handler::sortChildren(std::function const&)::{lambda(Utils::TreeItem const*, Utils::TreeItem const*)#1}>::_M_invoke(std::_Any_data const&, Utils::TreeItem const*&&, std::_Any_data const&) () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #2 0x00007efcf6ed60f6 in void std::__introsort_loop > >(Utils::TreeItem**, Utils::TreeItem**, long, __gnu_cxx::__ops::_Iter_comp_iter >) () from /home/totto/dev/qt-creator-build/bin/../lib/qtcreator/libUtils.so.4 #3 0x00007efcf6ed4e9b in Utils::TreeItem::sortChildren(std::function const&) () from /home/totto/dev/qt-creator-build/bin/../lib/qtcreator/libUtils.so.4 #4 0x00007efce3346eac in ProjectExplorer::Internal::FlatModel::addFolderNode(ProjectExplorer::Internal::WrapperNode*, ProjectExplorer::FolderNode*, QSet*) () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #5 0x00007efce3346e10 in ProjectExplorer::Internal::FlatModel::addFolderNode(ProjectExplorer::Internal::WrapperNode*, ProjectExplorer::FolderNode*, QSet*) () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #6 0x00007efce3346e10 in ProjectExplorer::Internal::FlatModel::addFolderNode(ProjectExplorer::Internal::WrapperNode*, ProjectExplorer::FolderNode*, QSet*) () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #7 0x00007efce33471dd in ProjectExplorer::Internal::FlatModel::addOrRebuildProjectModel(ProjectExplorer::Project*) () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #8 0x00007efcf5e2d302 in QObject::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #9 0x00007efcf688e7d1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #10 0x00007efcf68959a0 in QApplication::notify(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #11 0x00007efcf5e04c39 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #12 0x00007efcf5e07acb in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #13 0x00007efcf5e50f5b in QEventDispatcherUNIX::processEvents(QFlags) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #14 0x00007efceca1c4ed in ?? () from /opt/qt-5.11.1/plugins/platforms/../../lib/libQt5XcbQpa.so.5 #15 0x00007efcf5e03a4b in QEventLoop::exec(QFlags) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #16 0x00007efcf5e0b7ae in QCoreApplication::exec() () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #17 0x000000000040ae5f in main () #0 0x0000000000020005 in ?? () #0 0x0000000000020005 in ?? () #1 0x00007fcd606aeec1 in ProjectExplorer::Internal::FlatModel::flags(QModelIndex const&) const () from /home/totto/dev/qt-creator-build/lib/qtcreator/plugins/libProjectExplorer.so #2 0x00007fcd6fcce024 in QTreeViewPrivate::hasVisibleChildren(QModelIndex const&) const () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #3 0x00007fcd6fcd17ee in QTreeViewPrivate::itemDecorationRect(QModelIndex const&) const () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #4 0x00007fcd6fcd19ee in QTreeViewPrivate::itemDecorationAt(QPoint const&) const () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #5 0x00007fcd6fcd1b65 in QTreeView::drawTree(QPainter*, QRegion const&) const () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #6 0x00007fcd6fcd635a in QTreeView::paintEvent(QPaintEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #7 0x00007fcd6fa763b8 in QWidget::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #8 0x00007fcd6fb16a9e in QFrame::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #9 0x00007fcd6fc74184 in QAbstractItemView::viewportEvent(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #10 0x00007fcd6fcd727b in QTreeView::viewportEvent(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #11 0x00007fcd6efb0963 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #12 0x00007fcd6fa3a7c1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #13 0x00007fcd6fa419a0 in QApplication::notify(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #14 0x00007fcd6efb0c39 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #15 0x00007fcd6fa6f3ea in QWidgetPrivate::sendPaintEvent(QRegion const&) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #16 0x00007fcd6fa6fc6f in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #17 0x00007fcd6fa49423 in ?? () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #18 0x00007fcd6fa49601 in ?? () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #19 0x00007fcd6fa5fad5 in QWidgetPrivate::syncBackingStore() () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #20 0x00007fcd6fa76458 in QWidget::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #21 0x00007fcd6fb74584 in QMainWindow::event(QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #22 0x00007fcd6fa3a7d1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #23 0x00007fcd6fa419a0 in QApplication::notify(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Widgets.so.5 #24 0x00007fcd6efb0c39 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #25 0x00007fcd6efb3acb in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #26 0x00007fcd6effcf5b in QEventDispatcherUNIX::processEvents(QFlags) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #27 0x00007fcd65bc84ed in ?? () from /opt/qt-5.11.1/plugins/platforms/../../lib/libQt5XcbQpa.so.5 #28 0x00007fcd6efafa4b in QEventLoop::exec(QFlags) () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #29 0x00007fcd6efb77ae in QCoreApplication::exec() () from /opt/qt-5.11.1/lib/libQt5Core.so.5 #30 0x000000000040ae5f in main ()