Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 5.0.0-rc1
-
None
-
Gentoo Linux AMD64.
-
-
830aeb8010a7c74c97c75f893a5aaf6614a5c31f (qt-creator/tqtc-qt-creator/6.0)
Description
After opening a project based on compile_commands.json, Creator segfaults. I installed Creator 5.0 RC through the online installer.
Steps to reproduce (you need bear installed to create the compile_commands.json):
mkdir test_project cd test_project echo "int main() {};" > tst.cpp bear -- make tst qtcreator compile_commands.json
Creator with load the file and ask you for a kit. Pick anything (the default Qt kit will do.) When you click "Configure Project", the editor will open and after 1 second or so, Creator will segfault.
If you don't have bear installed, here is the compile_commands.json file. You will need to adapt the file paths, of course:
[ { "arguments": [ "/usr/bin/c++", "-c", "-o", "tst", "tst.cpp" ], "directory": "/home/realnc/test_project", "file": "/home/realnc/test_project/tst.cpp", "output": "/home/realnc/test_project/tst" } ]
Full backtrace of the segfault:
(gdb) thread apply all bt Thread 14 (Thread 0x7fffbdf28640 (LWP 4609) "Thread (pooled)"): #0 0x00007ffff46486c2 in __futex_abstimed_wait_common64 (futex_word=futex_word@entry=0x7fffb40054e0, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x7fffbdf27c80, private=private@entry=0, cancel=cancel@entry=true) at ../sysdeps/nptl/futex-internal.c:74 #1 0x00007ffff464872b in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fffb40054e0, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x7fffbdf27c80, private=private@entry=0) at ../sysdeps/nptl/futex-internal.c:123 #2 0x00007ffff46421b4 in __pthread_cond_wait_common (abstime=0x7fffbdf27c80, clockid=1, mutex=0x7fffb4005490, cond=0x7fffb40054b8) at pthread_cond_wait.c:504 #3 __pthread_cond_timedwait (cond=0x7fffb40054b8, mutex=0x7fffb4005490, abstime=0x7fffbdf27c80) at pthread_cond_wait.c:637 #4 0x00007ffff57fc5a4 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #5 0x00007ffff57f98d1 in QThreadPoolThread::run() () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #6 0x00007ffff57f5b35 in QThreadPrivate::start(void*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #7 0x00007ffff463be1e in start_thread (arg=0x7fffbdf28640) at pthread_create.c:481 #8 0x00007ffff525a9cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 8 (Thread 0x7fffd5c3f640 (LWP 4521) "QQmlThread"): #0 0x00007ffff524fcff in __GI___poll (fds=0x7fffc4004a60, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007ffff2219b8e in ?? () from /usr/lib64/libglib-2.0.so.0 #2 0x00007ffff2219caf in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #3 0x00007ffff5a3b1cc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #4 0x00007ffff59de21a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #5 0x00007ffff57f4844 in QThread::exec() () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #6 0x00007ffff4bac9f5 in QQmlThreadPrivate::run() () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/qtcreator/../Qt/lib/libQt5Qml.so.5 #7 0x00007ffff57f5b35 in QThreadPrivate::start(void*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #8 0x00007ffff463be1e in start_thread (arg=0x7fffd5c3f640) at pthread_create.c:481 #9 0x00007ffff525a9cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 7 (Thread 0x7fffd6440640 (LWP 4520) "QThread"): #0 0x00007ffff524fcff in __GI___poll (fds=0x7fffc0004e60, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007ffff2219b8e in ?? () from /usr/lib64/libglib-2.0.so.0 #2 0x00007ffff2219caf in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #3 0x00007ffff5a3b1cc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #4 0x00007ffff59de21a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #5 0x00007ffff57f4844 in QThread::exec() () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #6 0x00007ffff57f5b35 in QThreadPrivate::start(void*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #7 0x00007ffff463be1e in start_thread (arg=0x7fffd6440640) at pthread_create.c:481 #8 0x00007ffff525a9cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 6 (Thread 0x7fffd6c41640 (LWP 4519) "QThread"): #0 0x00007ffff524fcff in __GI___poll (fds=0x7fffcc004e60, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007ffff2219b8e in ?? () from /usr/lib64/libglib-2.0.so.0 #2 0x00007ffff2219caf in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #3 0x00007ffff5a3b1cc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #4 0x00007ffff59de21a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #5 0x00007ffff57f4844 in QThread::exec() () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #6 0x00007ffff57f5b35 in QThreadPrivate::start(void*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #7 0x00007ffff463be1e in start_thread (arg=0x7fffd6c41640) at pthread_create.c:481 #8 0x00007ffff525a9cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 5 (Thread 0x7fffd7452640 (LWP 4514) "QThread"): #0 0x00007ffff524fcff in __GI___poll (fds=0x7fffc80055a0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007ffff2219b8e in ?? () from /usr/lib64/libglib-2.0.so.0 #2 0x00007ffff2219caf in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #3 0x00007ffff5a3b1cc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #4 0x00007ffff59de21a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #5 0x00007ffff57f4844 in QThread::exec() () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #6 0x00007ffff57f5b35 in QThreadPrivate::start(void*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #7 0x00007ffff463be1e in start_thread (arg=0x7fffd7452640) at pthread_create.c:481 #8 0x00007ffff525a9cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 3 (Thread 0x7fffd84fa640 (LWP 4511) "QDBusConnection"): #0 0x00007ffff524fcff in __GI___poll (fds=0x7fffd0004e60, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007ffff2219b8e in ?? () from /usr/lib64/libglib-2.0.so.0 #2 0x00007ffff2219caf in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #3 0x00007ffff5a3b1cc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #4 0x00007ffff59de21a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #5 0x00007ffff57f4844 in QThread::exec() () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #6 0x00007ffff1001fd5 in QDBusConnectionManager::run() () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/lib/Qt/plugins/platforms/../../lib/libQt5DBus.so.5 #7 0x00007ffff57f5b35 in QThreadPrivate::start(void*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #8 0x00007ffff463be1e in start_thread (arg=0x7fffd84fa640) at pthread_create.c:481 #9 0x00007ffff525a9cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 2 (Thread 0x7ffff0956640 (LWP 4510) "QXcbEventQueue"): #0 0x00007ffff524fcff in __GI___poll (fds=0x7ffff0955c28, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007ffff1d9fd62 in ?? () from /usr/lib64/libxcb.so.1 #2 0x00007ffff1da215a in xcb_wait_for_event () from /usr/lib64/libxcb.so.1 #3 0x00007ffff13fd7b0 in QXcbEventQueue::run() () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/lib/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5 #4 0x00007ffff57f5b35 in QThreadPrivate::start(void*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #5 0x00007ffff463be1e in start_thread (arg=0x7ffff0956640) at pthread_create.c:481 #6 0x00007ffff525a9cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 1 (Thread 0x7ffff1d57f80 (LWP 4506) "qtcreator"): #0 0x00007ffff58007a0 in QFutureWatcherBase::isFinished() const () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #1 0x00007fffe784f929 in ProjectExplorer::TreeScanner::isFinished (this=<optimized out>) at /home/qt/work/build/qt-creator/src/plugins/projectexplorer/treescanner.cpp:97 #2 0x00007fffe7852b0d in ProjectExplorer::TreeScanner::release (this=0x0) at /home/qt/work/build/qt-creator/src/plugins/projectexplorer/treescanner.cpp:109 #3 0x00007fffe08943af in CompilationDatabaseProjectManager::Internal::CompilationDbParser::scannedFiles (this=0x2bee460) at /home/qt/work/build/qt-creator/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp:141 #4 0x00007fffe0887082 in CompilationDatabaseProjectManager::Internal::CompilationDatabaseBuildSystem::buildTreeAndProjectParts (this=0x1b6bec0) at /home/qt/work/build/qt-creator/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp:413 #5 0x00007fffe088835c in CompilationDatabaseProjectManager::Internal::CompilationDatabaseBuildSystem::<lambda(CompilationDatabaseProjectManager::Internal::ParseResult)>::operator() (result=CompilationDatabaseProjectManager::Internal::ParseResult::Success, __closure=0x1c82570) at /home/qt/work/build/qt-creator/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp:472 #6 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<CompilationDatabaseProjectManager::Internal::ParseResult>, void, CompilationDatabaseProjectManager::Internal::CompilationDatabaseBuildSystem::reparseProject()::<lambda(CompilationDatabaseProjectManager::Internal::ParseResult)> >::call (arg=<optimized out>, f=...) at /home/qt/work/build/qt_install_dir/include/QtCore/qobjectdefs_impl.h:146 #7 QtPrivate::Functor<CompilationDatabaseProjectManager::Internal::CompilationDatabaseBuildSystem::reparseProject()::<lambda(CompilationDatabaseProjectManager::Internal::ParseResult)>, 1>::call<QtPrivate::List<CompilationDatabaseProjectManager::Internal::ParseResult>, void> (arg=<optimized out>, f=...) at /home/qt/work/build/qt_install_dir/include/QtCore/qobjectdefs_impl.h:256 #8 QtPrivate::QFunctorSlotObject<CompilationDatabaseProjectManager::Internal::CompilationDatabaseBuildSystem::reparseProject()::<lambda(CompilationDatabaseProjectManager::Internal::ParseResult)>, 1, QtPrivate::List<CompilationDatabaseProjectManager::Internal::ParseResult>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x1c82560, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /home/qt/work/build/qt_install_dir/include/QtCore/qobjectdefs_impl.h:443 #9 0x00007ffff5a17f30 in void doActivate<false>(QObject*, int, void**) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #10 0x00007fffe087f11e in CompilationDatabaseProjectManager::Internal::CompilationDbParser::finished (this=this@entry=0x2bee460, _t1=<optimized out>, _t1@entry=CompilationDatabaseProjectManager::Internal::ParseResult::Success) at src/plugins/compilationdatabaseprojectmanager/CompilationDatabaseProjectManager_autogen/EWIEGA46WW/moc_compilationdbparser.cpp:134 #11 0x00007fffe0893dd6 in CompilationDatabaseProjectManager::Internal::CompilationDbParser::finish (result=CompilationDatabaseProjectManager::Internal::ParseResult::Success, this=<optimized out>) at /home/qt/work/build/qt-creator/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp:148 #12 CompilationDatabaseProjectManager::Internal::CompilationDbParser::<lambda()>::operator() (__closure=0x16e3f60) at /home/qt/work/build/qt-creator/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp:63 #13 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, CompilationDatabaseProjectManager::Internal::CompilationDbParser::CompilationDbParser(const QString&, const Utils::FilePath&, const Utils::FilePath&, CompilationDatabaseProjectManager::Internal::MimeBinaryCache&, ProjectExplorer::BuildSystem::ParseGuard&&, QObject*)::<lambda()> >::call (arg=<optimized out>, f=...) at /home/qt/work/build/qt_install_dir/include/QtCore/qobjectdefs_impl.h:146 #14 QtPrivate::Functor<CompilationDatabaseProjectManager::Internal::CompilationDbParser::CompilationDbParser(const QString&, const Utils::FilePath&, const Utils::FilePath&, CompilationDatabaseProjectManager::Internal::MimeBinaryCache&, ProjectExplorer::BuildSystem::ParseGuard&&, QObject*)::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /home/qt/work/build/qt_install_dir/include/QtCore/qobjectdefs_impl.h:256 #15 QtPrivate::QFunctorSlotObject<CompilationDatabaseProjectManager::Internal::CompilationDbParser::CompilationDbParser(const QString&, const Utils::FilePath&, const Utils::FilePath&, CompilationDatabaseProjectManager::Internal::MimeBinaryCache&, ProjectExplorer::BuildSystem::ParseGuard&&, QObject*)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x16e3f50, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /home/qt/work/build/qt_install_dir/include/QtCore/qobjectdefs_impl.h:443 #16 0x00007ffff5a17f30 in void doActivate<false>(QObject*, int, void**) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #17 0x00007ffff5800cf1 in QFutureWatcherBase::event(QEvent*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #18 0x00007ffff6d7c43c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Widgets.so.5 #19 0x00007ffff6d82f20 in QApplication::notify(QObject*, QEvent*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Widgets.so.5 #20 0x00007ffff59df808 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #21 0x00007ffff59e2882 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #22 0x00007ffff5a3bb33 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #23 0x00007ffff221993b in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 #24 0x00007ffff2219bf8 in ?? () from /usr/lib64/libglib-2.0.so.0 #25 0x00007ffff2219caf in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #26 0x00007ffff5a3b1cc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #27 0x00007ffff59de21a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #28 0x00007ffff59e71d3 in QCoreApplication::exec() () from /mnt/Data/cache/Qt Creator 5.0.0-rc1/bin/../lib/Qt/lib/libQt5Core.so.5 #29 0x000000000040a1d6 in main (argc=<optimized out>, argv=<optimized out>) at /home/qt/work/build/qt-creator/src/app/main.cpp:762