-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lsp crash on opening xml file in project #11453
Comments
Hi @shevernitskiy . The C/C++ Extension is not associated with files with the The "Unable to access browse database" error message is logged when the C/C++ Extension is unable to access its primary database. Can you tell if this message occurs before or after the crash? (It may be occurring after the Could you enable It might also be possible to connect the debugger to |
I found the exact point of the crash. It occurs when i comeback to setting.json {
"cmake.configureOnOpen": false,
"files.associations": {
"*.txt": "log",
"*.yml": "yaml",
"tuple": "cpp",
"vector": "cpp",
"random": "cpp",
"xutility": "cpp",
"xstring": "cpp",
"algorithm": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cuchar": "cpp",
"cwchar": "cpp",
"deque": "cpp",
"exception": "cpp",
"coroutine": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"resumable": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"format": "cpp",
"fstream": "cpp",
"functional": "cpp",
"future": "cpp",
"hash_map": "cpp",
"hash_set": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"locale": "cpp",
"memory": "cpp",
"mutex": "cpp",
"new": "cpp",
"numeric": "cpp",
"optional": "cpp",
"ostream": "cpp",
"queue": "cpp",
"ranges": "cpp",
"ratio": "cpp",
"regex": "cpp",
"span": "cpp",
"sstream": "cpp",
"stack": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"system_error": "cpp",
"thread": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"utility": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xtr1common": "cpp",
"xtree": "cpp",
"codecvt": "cpp",
"*.inc": "cpp",
"shared_mutex": "cpp",
"execution": "cpp",
"filesystem": "cpp"
}
} C/C++ output: loggingLevel: Debug
cpptools version (TypeScript): 1.17.5
cpptools version (native): 1.17.5.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
LSP: cpptools/queryCompilerDefaults (id: 1)
LSP: cpptools/queryCompilerDefaults (id: 2)
LSP: cpptools/didChangeCppProperties (id: 3)
LSP: textDocument/didOpen: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp
LSP: cpptools/activeDocumentChange: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp
LSP: cpptools/textEditorSelectionChange
Code browsing service initialized
Attempting to get defaults from C++ compiler in "compilerPath" property: 'cl.exe'
Attempting to get defaults from C compiler in "compilerPath" property: 'cl.exe'
Folder: C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO/2022/BUILDTOOLS/VC/TOOLS/MSVC/14.37.32822/INCLUDE/* will be indexed
Folder: C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22000.0/CPPWINRT/ will be indexed
Folder: C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22000.0/SHARED/ will be indexed
Folder: C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22000.0/UCRT/ will be indexed
Folder: C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22000.0/UM/ will be indexed
Folder: C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22000.0/WINRT/ will be indexed
Folder: E:/PROGRAMMING/CPLUS/DFHACK/ will be indexed
Folder: C:/USERS/MAHAH/APPDATA/LOCAL/.XMAKE/PACKAGES/ will be indexed
Folder: C:/VCPKG/PACKAGES/ will be indexed
Discovering files...
Processing folder (non-recursive): C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO/2022/BUILDTOOLS/VC/TOOLS/MSVC/14.37.32822/INCLUDE
Processing folder (recursive): C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22000.0/CPPWINRT/
Processing folder (recursive): C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22000.0/SHARED/
Processing folder (recursive): C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22000.0/UCRT/
Processing folder (recursive): C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22000.0/UM/
Processing folder (recursive): C:/PROGRAM FILES (X86)/WINDOWS KITS/10/INCLUDE/10.0.22000.0/WINRT/
Processing folder (recursive): E:/PROGRAMMING/CPLUS/DFHACK/
Unable to resolve include path: e:/programming/cplus/dfhack/pch.h
Unable to resolve include path: e:/programming/cplus/dfhack/src/pch.h
Unable to resolve include path: e:/programming/cplus/dfhack/src/hook/pch.h
Processing folder (recursive): C:/USERS/MAHAH/APPDATA/LOCAL/.XMAKE/PACKAGES/
Processing folder (recursive): C:/VCPKG/PACKAGES/
LSP: cpptools/getInlayHints: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 4)
Discovering files: 19188 file(s) processed
3 file(s) removed from database
Done discovering files.
Populating include completion cache.
Parsing remaining files...
Parsing: 0 files(s) processed
Done parsing remaining files.
LSP: cpptools/getFoldingRanges: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 5)
LSP: Message ignored due to no registered handler: $/setTrace
LSP: cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: cpptools/getSemanticTokens: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 6)
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 7)
LSP: $/cancelRequest (<unknown/completed>, id: 7)
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 8)
Checking for syntax errors: E:\programming\cplus\dfhack\library\modules\Textures.cpp
LSP: Message ignored due to no registered handler: $/setTrace
LSP: cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
tag parsing file: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include\CodeAnalysis\sourceannotations.h
tag parsing file: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include\experimental\resumable
tag parsing file: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include\experimental\coroutine
sending compilation args for E:\programming\cplus\dfhack\library\modules\Textures.cpp
include: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\BUILDTOOLS\VC\TOOLS\MSVC\14.37.32822\INCLUDE
include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22000.0\UM
include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22000.0\UCRT
include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22000.0\SHARED
include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22000.0\WINRT
include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22000.0\CPPWINRT
include: E:\PROGRAMMING\CPLUS\DFHACK\DEPENDS\LIBEXPAT\EXPAT\LIB
include: E:\PROGRAMMING\CPLUS\DFHACK\LIBRARY\INCLUDE
include: E:\PROGRAMMING\CPLUS\DFHACK\DEPENDS\SDL2\SDL2-2.26.2\INCLUDE
include: E:\PROGRAMMING\CPLUS\DFHACK\DEPENDS\LUA\INCLUDE
define: _DEBUG
define: UNICODE
define: _UNICODE
stdver: ms_c++latest
intelliSenseMode: windows-msvc-x64
Checking for syntax errors: E:\programming\cplus\dfhack\library\modules\Textures.cpp
Queueing IntelliSense update for files in translation unit of: E:\programming\cplus\dfhack\library\modules\Textures.cpp
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 9)
LSP: $/cancelRequest (<unknown/completed>, id: 9)
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 10)
LSP: Message ignored due to no registered handler: $/setTrace
LSP: cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: Message ignored due to no registered handler: $/setTrace
LSP: cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: Message ignored due to no registered handler: $/setTrace
LSP: cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
Error squiggle count: 0
Update IntelliSense time (sec): 4.619
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 11)
LSP: cpptools/getDocumentSymbols: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 12)
LSP: Message ignored due to no registered handler: $/setTrace
LSP: cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
tag parsing file: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include\CodeAnalysis\sourceannotations.h
tag parsing file: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include\experimental\resumable
tag parsing file: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include\experimental\coroutine
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 13)
LSP: cpptools/getFoldingRanges: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 14)
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 15)
LSP: cpptools/getFoldingRanges: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 16)
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 17)
LSP: $/cancelRequest (<unknown/completed>, id: 17)
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 18)
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 19)
LSP: cpptools/getFoldingRanges: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 20)
LSP: cpptools/fileDeleted: file:///e%3A/programming/cplus/dfhack/.git/modules/plugins/stonesense/objects/maintenance.lock
Custom configuration provider 'CMake Tools' registered
LSP: cpptools/didChangeCppProperties (id: 21)
LSP: cpptools/clearCustomConfigurations
LSP: cpptools/getCodeActions: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 22)
LSP: cpptools/clearCustomConfigurations
LSP: cpptools/getFoldingRanges: file:///e%3A/programming/cplus/dfhack/library/modules/Textures.cpp (id: 23)
LSP: cpptools/fileDeleted: file:///e%3A/programming/cplus/dfhack/.git/modules/library/xml/objects/maintenance.lock
LSP: cpptools/clearCustomConfigurations
LSP: cpptools/fileDeleted: file:///e%3A/programming/cplus/dfhack/.git/modules/depends/jsoncpp/objects/maintenance.lock
LSP: cpptools/fileDeleted: file:///e%3A/programming/cplus/dfhack/.git/modules/depends/xlsxio/objects/maintenance.lock
LSP: cpptools/fileDeleted: file:///e%3A/programming/cplus/dfhack/.git/modules/depends/libzip/objects/maintenance.lock
LSP: cpptools/fileDeleted: file:///e%3A/programming/cplus/dfhack/.git/modules/depends/libexpat/objects/maintenance.lock
LSP: cpptools/fileDeleted: file:///e%3A/programming/cplus/dfhack/.git/modules/plugins/isoworld/modules/agui/objects/maintenance.lock
LSP: cpptools/fileDeleted: file:///e%3A/programming/cplus/dfhack/.git/modules/plugins/isoworld/modules/allegro/objects/maintenance.lock
Database safe to open.
Shutting down IntelliSense server: E:\programming\cplus\dfhack\library\modules\Textures.cpp
cpptools version (TypeScript): 1.17.5
cpptools version (native): 1.17.5.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
LSP: cpptools/queryCompilerDefaults (id: 1)
cpptools version (TypeScript): 1.17.5
cpptools version (native): 1.17.5.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
LSP: cpptools/queryCompilerDefaults (id: 1)
cpptools version (TypeScript): 1.17.5
cpptools version (native): 1.17.5.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
LSP: cpptools/queryCompilerDefaults (id: 1)
cpptools version (TypeScript): 1.17.5
cpptools version (native): 1.17.5.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
IntelliSense Engine = default.
LSP: cpptools/queryCompilerDefaults (id: 1) cpptools-srv.exe callstack on exception:
cpptools.exe callstack on exception:
|
Hi @shevernitskiy . The stacks you provided appear to indicate either normal termination of the native process, or some sort of internal error. (Perhaps unexpected termination, not an actual crash, per se).. Though, I see from your logs that the last message received, which likely instigated the issue, is Are you able to replicate this issue with a simple project and a simple xml file? I'm not able to. If this repro's for you with a simple project, can you tell me if there is anything unusual about your system or environment? Or, if this only happens within a particular project, perhaps there is something specific about that project that we might need to identify in order to reproduce the issue and investigate further. |
This may be fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.18.0 |
Unfortunately, 1.18.0 doesn't fix it. |
Hi @shevernitskiy . Could you provide an updated log from a repro using 1.18.0? It has some additional logging at start-up that might help explain the repeated crashes when this starts to repro. Are you able to repro with no other extensions installed? Does it occur with any other types of file? (The C/C++ extension does not treat an XML file any differently than any other file extension that is not C or C++. In fact, the native process would get no notification of its existence, which is evident by no occurances of a |
I decided to reinstall vscode from scratch. On a fresh new setup there is no issue. Well, it seems like that was unique special env case. Thanks for reposponses! Issue may be closed now, i guess. |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
I have some xml's in a project (it can be valid or not). LSP crashed everytime, when i open a tab with one of those xml.
XML file example (remove
.txt
):df.announcements.xml.txt
Configuration and Logs
Project workspace has no separate
c_cpp_properties.json
Output from C/C++:
Output from cpptools:
Other Extensions
No extansions for xml installed.
Additional context
No response
The text was updated successfully, but these errors were encountered: