Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.6.0-beta1
-
None
-
b8a9e85880c4efc8207c20bf26b3df8dc4e02d88
Description
- Open a *.cpp file
- Delete the file from outside Qt Creator and watch how the clangbackend process crashes:
Qt Creator stdout/stderr
ClangCodeModel ConnectionClient LocalSocket Error: "QLocalSocket: Remote closed" ClangCodeModel ConnectionClient LocalSocket Error: "QLocalSocket::connectToServer: Connection refused" Clang back end finished unexpectedly, restarted.
Stacktrace
Thread 1 (Thread 0x7fd1f2a0a780 (LWP 26499)): #0 0x00007fd1f17a06a9 in ?? () from /usr/lib/llvm-3.6/lib/libclang-3.6.so.1 No symbol table info available. #1 0x00007fd1f17a0b03 in clang_getDiagnosticSetFromTU () from /usr/lib/llvm-3.6/lib/libclang-3.6.so.1 No symbol table info available. #2 0x000000000040bd7a in ClangBackEnd::TranslationUnit::diagnostics (this=0x1c690c0) at /home/nik/dev/creator/creator-com-master/qtcreator/src/tools/clangbackend/ipcsource/translationunit.cpp:205 No locals. #3 0x0000000000416f23 in ClangBackEnd::TranslationUnits::sendDiagnosticChangedMessage (this=0x7fffe1a06350, translationUnit=...) at /home/nik/dev/creator/creator-com-master/qtcreator/src/tools/clangbackend/ipcsource/translationunits.cpp:222 message = {file_ = {filePath_ = {byteArray = {d = 0x7fffe1a063a0}}, projectPartId_ = {byteArray = {d = 0x7fffe1a05a90}}, unsavedFileContent_ = {byteArray = {d = 0x7fffe1a05a60}}, documentRevision_ = 29790400, hasUnsavedFileContent_ = false}, diagnostics_ = {d = 0x7fffe1a05a60}} #4 0x000000000041698d in ClangBackEnd::TranslationUnits::sendChangedDiagnostics (this=0x7fffe1a06350) at /home/nik/dev/creator/creator-com-master/qtcreator/src/tools/clangbackend/ipcsource/translationunits.cpp:137 translationUnit = @0x1c690c0: {d = {<std::__shared_ptr<ClangBackEnd::TranslationUnitData, (__gnu_cxx::_Lock_policy)2>> = {_M_ptr = 0x1c68f38, _M_refcount = {_M_pi = 0x1c68f20}}, <No data fields>}} __for_range = @0x7fffe1a06398: {<std::_Vector_base<ClangBackEnd::TranslationUnit, std::allocator<ClangBackEnd::TranslationUnit> >> = {_M_impl = {<std::allocator<ClangBackEnd::TranslationUnit>> = {<__gnu_cxx::new_allocator<ClangBackEnd::TranslationUnit>> = {<No data fields>}, <No data fields>}, _M_start = 0x1c690c0, _M_finish = 0x1c690d0, _M_end_of_storage = 0x1c690d0}}, <No data fields>} __for_begin = {_M_current = 0x1c690c0} __for_end = {_M_current = 0x1c690d0} #5 0x00000000004079e5 in ClangBackEnd::ClangIpcServer::ClangIpcServer()::{lambda()#2}::operator()() const () at /home/nik/dev/creator/creator-com-master/qtcreator/src/tools/clangbackend/ipcsource/clangipcserver.cpp:73 No locals. #6 0x00000000004097c4 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, ClangBackEnd::ClangIpcServer::ClangIpcServer()::__lambda1>::call(ClangBackEnd::ClangIpcServer::__lambda1, void **) (f=..., arg=0x7fffe1a05c70) at /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/include/QtCore/qobjectdefs_impl.h:494 No locals. #7 0x000000000040977d in QtPrivate::Functor<ClangBackEnd::ClangIpcServer::ClangIpcServer()::__lambda1, 0>::call<QtPrivate::List<>, void>(ClangBackEnd::ClangIpcServer::__lambda1 &, void *, void **) (f=..., arg=0x7fffe1a05c70) at /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/include/QtCore/qobjectdefs_impl.h:551 No locals. #8 0x00000000004096b7 in QtPrivate::QFunctorSlotObject<ClangBackEnd::ClangIpcServer::ClangIpcServer()::__lambda1, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x1c5e8a0, r=0x7fffe1a063c0, a=0x7fffe1a05c70, ret=0x0) at /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/include/QtCore/qobject_impl.h:192 No locals. #9 0x00007fd1f11ef035 in QMetaObject::activate(QObject*, int, int, void**) () from /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5 No symbol table info available. #10 0x00007fd1f11fcd72 in QTimer::timerEvent(QTimerEvent*) () from /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5 No symbol table info available. #11 0x00007fd1f11f0fe9 in QObject::event(QEvent*) () from /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5 No symbol table info available. #12 0x00007fd1f11bcfdd in QCoreApplication::notify(QObject*, QEvent*) () from /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5 No symbol table info available. #13 0x00007fd1f11bcc84 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5 No symbol table info available. #14 0x00007fd1f12169c4 in QTimerInfoList::activateTimers() () from /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5 No symbol table info available. #15 0x00007fd1f1216ca1 in ?? () from /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5 No symbol table info available. #16 0x00007fd1ecde7e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #17 0x00007fd1ecde8048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #18 0x00007fd1ecde80ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. #19 0x00007fd1f1217554 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5 No symbol table info available. #20 0x00007fd1f11baeab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5 No symbol table info available. #21 0x00007fd1f11bfdc5 in QCoreApplication::exec() () from /home/nik/usr/qt-5.4.0-install/5.4/gcc_64/lib/libQt5Core.so.5 No symbol table info available. #22 0x0000000000424468 in main (argc=2, argv=0x7fffe1a064e8) at /home/nik/dev/creator/creator-com-master/qtcreator/src/tools/clangbackend/clangbackendmain.cpp:61 __PRETTY_FUNCTION__ = "int main(int, char**)" clangIpcServer = {<ClangBackEnd::IpcServerInterface> = {<ClangBackEnd::IpcInterface> = {_vptr.IpcInterface = 0x637830 <vtable for ClangBackEnd::ClangIpcServer+16>}, clientDispatcher = {<ClangBackEnd::IpcClientInterface> = {<ClangBackEnd::IpcInterface> = {_vptr.IpcInterface = 0x7fd1f25077b0 <vtable for ClangBackEnd::IpcClientDispatcher+16>}, <No data fields>}, clients = {d = 0x1c60610}}}, projects = {projects_ = {<std::_Vector_base<ClangBackEnd::ProjectPart, std::allocator<ClangBackEnd::ProjectPart> >> = {_M_impl = {<std::allocator<ClangBackEnd::ProjectPart>> = {<__gnu_cxx::new_allocator<ClangBackEnd::ProjectPart>> = {<No data fields>}, <No data fields>}, _M_start = 0x1c60250, _M_finish = 0x1c60260, _M_end_of_storage = 0x1c60260}}, <No data fields>}}, unsavedFiles = {d = {<std::__shared_ptr<ClangBackEnd::UnsavedFilesData, (__gnu_cxx::_Lock_policy)2>> = {_M_ptr = 0x1c5dbe8, _M_refcount = {_M_pi = 0x1c5dbd0}}, <No data fields>}}, translationUnits = {fileSystemWatcher = {<QObject> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0x7fd1f15fecc0 <QObject::staticMetaObject>, stringdata = 0x4274c0 <qt_meta_stringdata_ClangBackEnd__ClangFileSystemWatcher>, data = 0x427540 <qt_meta_data_ClangBackEnd__ClangFileSystemWatcher>, static_metacall = 0x4248fc <ClangBackEnd::ClangFileSystemWatcher::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, watcher = <incomplete type>, translationUnits = @0x7fffe1a06350}, sendDiagnosticsChangedCallback = {<std::_Maybe_unary_or_binary_function<void, ClangBackEnd::DiagnosticsChangedMessage const&>> = {<std::unary_function<ClangBackEnd::DiagnosticsChangedMessage const&, void>> = {<No data fields>}, <No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x1c5e810, _M_const_object = 0x1c5e810, _M_function_pointer = 0x1c5e810, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x1c5e810, this adjustment 9184886075931269952}, _M_pod_data = "\020\350\305\001\000\000\000\000@\233P\362\070Ew\177"}, _M_manager = 0x4092b8 <std::_Function_base::_Base_manager<ClangBackEnd::ClangIpcServer::ClangIpcServer()::__lambda0>::_M_manager(std::_Any_data &, const std::_Any_data &, std::_Manager_operation)>}, _M_invoker = 0x40927a <std::_Function_handler<void(const ClangBackEnd::DiagnosticsChangedMessage&), ClangBackEnd::ClangIpcServer::ClangIpcServer()::__lambda0>::_M_invoke(const std::_Any_data &, const ClangBackEnd::DiagnosticsChangedMessage &)>}, translationUnits_ = {<std::_Vector_base<ClangBackEnd::TranslationUnit, std::allocator<ClangBackEnd::TranslationUnit> >> = {_M_impl = {<std::allocator<ClangBackEnd::TranslationUnit>> = {<__gnu_cxx::new_allocator<ClangBackEnd::TranslationUnit>> = {<No data fields>}, <No data fields>}, _M_start = 0x1c690c0, _M_finish = 0x1c690d0, _M_end_of_storage = 0x1c690d0}}, <No data fields>}, projectParts = @0x7fffe1a06328, unsavedFiles_ = @0x7fffe1a06340}, sendDiagnosticsTimer = <incomplete type>} application = <incomplete type> connectionServer = {<QObject> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0x7fd1f15fecc0 <QObject::staticMetaObject>, stringdata = 0x7fd1f22f04c0 <qt_meta_stringdata_ClangBackEnd__ConnectionServer>, data = 0x7fd1f22f0540 <qt_meta_data_ClangBackEnd__ConnectionServer>, static_metacall = 0x7fd1f22eb626 <ClangBackEnd::ConnectionServer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, ipcClientProxies = {<std::_Vector_base<ClangBackEnd::IpcClientProxy, std::allocator<ClangBackEnd::IpcClientProxy> >> = {_M_impl = {<std::allocator<ClangBackEnd::IpcClientProxy>> = {<__gnu_cxx::new_allocator<ClangBackEnd::IpcClientProxy>> = {<No data fields>}, <No data fields>}, _M_start = 0x1c60550, _M_finish = 0x1c60590, _M_end_of_storage = 0x1c60590}}, <No data fields>}, localSockets = {<std::_Vector_base<QLocalSocket*, std::allocator<QLocalSocket*> >> = {_M_impl = {<std::allocator<QLocalSocket*>> = {<__gnu_cxx::new_allocator<QLocalSocket*>> = {<No data fields>}, <No data fields>}, _M_start = 0x1c60660, _M_finish = 0x1c60668, _M_end_of_storage = 0x1c60668}}, <No data fields>}, ipcServer = 0x7fffe1a06310, localServer = <incomplete type>, static connectionName = {static null = {<No data fields>}, d = 0x1c5ef30}, aliveTimerId = 1}
Attachments
For Gerrit Dashboard: QTCREATORBUG-15070 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
126244,8 | Clang: Don't set a translation unit dirty if the main file is deleted | master | qt-creator/qt-creator | Status: ABANDONED | -1 | 0 |
127335,3 | Clang: Don't set a translation unit dirty if the main file is deleted | 3.6 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |