Type: LanguageService
Always getting this error when opening file with Cmd+click:
This file (blabla) is already opened in the editor but with a different casing. IntelliSense features will be disabled on this copy of the file.
Describe the bug
To Reproduce
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/usr/local/opt/tbb/include/",
"/usr/local/opt/boost/include/"
],
"defines": [],
"macFrameworkPath": [],
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64",
"configurationProvider": "vector-of-bool.cmake-tools",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
Just open any file with Cmd+click on any symbol ...
Expected behavior
Don't show any errors ..
Got this problem too with 10.14.5 (18F132) with newest vscode and 0.24.0-insiders ,full warning message:
This file (/Users/coder52/Downloads/vscode/mycode/handle_message.h) is already opened in the editor but with a different casing. IntelliSense features will be disabled on this copy of the file.
Also I got a problem with terminal suddenly appear with some json error.
cpptools sometimes will produce some error with this problem,maybe it's a same problem锛孖 tried just open one vscode,still got the same error message.
[Error - 12:14:08 AM] Connection to server got closed. Server will not be restarted.
[Error - 12:14:08 AM] Request textDocument/hover failed.
Error: Connection got disposed.
at Object.dispose (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:2556:25)
at Object.dispose (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:3313:35)
at LanguageClient.handleConnectionClosed (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:5395:42)
at LanguageClient.handleConnectionClosed (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:11804:15)
at closeHandler (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:5382:18)
at CallbackList.invoke (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:7515:39)
at Emitter.fire (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:7573:36)
at closeHandler (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:1906:26)
at CallbackList.invoke (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:7515:39)
at Emitter.fire (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:7573:36)
at StreamMessageReader.fireClose (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:9855:27)
at Socket.module.exports.listen.readable.on (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:9895:46)
at Socket.emit (events.js:187:15)
at Pipe.Socket._destroy._handle.close [as _onclose] (net.js:596:12)
[Error - 12:14:08 AM] Request textDocument/documentHighlight failed.
Error: Connection got disposed.
at Object.dispose (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:2556:25)
at Object.dispose (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:3313:35)
at LanguageClient.handleConnectionClosed (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:5395:42)
at LanguageClient.handleConnectionClosed (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:11804:15)
at closeHandler (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:5382:18)
at CallbackList.invoke (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:7515:39)
at Emitter.fire (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:7573:36)
at closeHandler (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:1906:26)
at CallbackList.invoke (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:7515:39)
at Emitter.fire (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:7573:36)
at StreamMessageReader.fireClose (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:9855:27)
at Socket.module.exports.listen.readable.on (/Users/coder52/.vscode/extensions/ms-vscode.cpptools-0.24.0-insiders/dist/main.js:9895:46)
at Socket.emit (events.js:187:15)
at Pipe.Socket._destroy._handle.close [as _onclose] (net.js:596:12)
same problem on windows 10.
That "different casing" code is only supposed to run on Windows. @andreeis Are you able to investigate this?
@zrno What problem are you seeing on Windows? If you're just getting crashes that is being tracked by https://github.com/microsoft/vscode-cpptools/issues/3792 . Do you folders have case sensitivity enabled? Is there something special about the URIs/filenames that are being opened that might cause our code to incorrect think it's a duplicate?
@andreeis Do you have enough info to fix this? I don't know how to repro it. I guess we could just disable all these code paths on Linux/Mac, even if we don't understand why it's failing.
Does anyone know what is special about the URIs that causes this issue to occur? Our code thinks a duplicate file is being opened. Are there symlinks on the path?
I'm getting the same problem on windows 8.1 and cpptools 0.24.0-insiders. No two files of the same name exist in the project. No symlink. No network drive. Single VS Code instance open. The files in the log were not previously opened. It was working fine in previous cpptools.
Log after opening a few dozen random files in the project (most didn't trigger the error):
This file (c:\Users\alex\Documents\ESP32\go-lynx\components\lynx\system.h) is already opened in the editor but with a different casing. IntelliSense features will be disabled on this copy of the file.
This file (c:\Users\alex\Documents\ESP32\go-lynx\components\lynx\system.cpp) is already opened in the editor but with a different casing. IntelliSense features will be disabled on this copy of the file.
Failed to create IntelliSense client. Can't create intellisense client for C:\USERS\ALEX\DOCUMENTS\ESP32\GO-LYNX\COMPONENTS\LYNX\SYSTEM.H
This file (c:\Users\alex\Documents\ESP32\go-lynx\components\odroid-go\spi_lcd.c) is already opened in the editor but with a different casing. IntelliSense features will be disabled on this copy of the file.
This file (c:\Users\alex\Documents\ESP32\go-lynx\components\lynx\ram.h) is already opened in the editor but with a different casing. IntelliSense features will be disabled on this copy of the file.
This file (c:\Users\alex\Documents\ESP32\go-lynx\components\lynx\ram.cpp) is already opened in the editor but with a different casing. IntelliSense features will be disabled on this copy of the file.
This file (c:\Users\alex\Documents\ESP32\go-lynx\components\lynx\memmap.cpp) is already opened in the editor but with a different casing. IntelliSense features will be disabled on this copy of the file.
@sean-mcmanus Same problems as @ducalex . Nothing spectacular in the uri of my files. I don't have crashes, only the annoying message pop up. Reverting the version fixed it.
"C:\Projects\abc\ExampleModule\Submodule\SubSubModule\AlertSeverity.h" just as an example.
@ducalex @zrno That is really strange -- I don't see how that is possible and haven't been able to get repro yet. Are you seeing multiple didOpen with debug logging enabled? We have a pending fix for the Linux/Mac repros, but not the Windows case yet.
@sean-mcmanus The easiest way to reproduce seems to be ctrl+click on a function to open its definition file, it does the error almost every time. It is less frequent but still present when opening the files via the explorer.
Here's a the full log from VS Code startup to the occurrence of the error: https://gist.github.com/ducalex/41afd76d9f90c69a211a3530d30b34e2
Probably not terribly useful, but here's a clip showing the problem: https://i.imgur.com/rwsGnol.mp4
Thank you for reporting this issue and giving us a repro. We have a fix for the windows case too. It will be included in the next insiders update.
Fixed with 0.24.0-insiders2. Set the "C_Cpp.updateChannel" setting to "Insiders" to auto-install it.
Using Version 0.26.0-insiders2 The issue still persists
It does (re)open the file but with all caps.
In Windows 10, opening a file in diff view from vs code's source control while already having the same file open in another tab triggers the error. The error seems to not be triggered if first opening a diff view and then opening the same file from the explorer.
Most helpful comment
Using Version 0.26.0-insiders2 The issue still persists
It does (re)open the file but with all caps.