microsoft / microsoft/vscode-cpptools
Go to definition failing when done twice on symbol defined locally
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: LanguageService
Describe the bug
- OS and Version: Ubuntu 20.04
- VS Code Version: 1.50.0
- C/C++ Extension Version: 1.0.1
- Other extensions you installed (and if the issue persists after disabling them): Remote - SSH (no)
- Does this issue involve using SSH remote to run the extension on a remote machine?: No
Steps to reproduce
- Open a .cpp file
- Click on any symbol defined in the same opened file
- Go to definition (or Peek definition)
- This works (an editor, or the peek viewer, opens), and IntelliSense also works as expected (hovering shows definition, etc)
- Close the newly opened editor / peek viewer
- Click on any symbol (whatsoever) and go to definition
- No definition found for 'symbol'. Also, IntelliSense stops working (hovering does not highlight anything).
This might be related to the fact that the
Logs
(sorry for italian)-------- Diagnostics - 8/10/2020, 20:49:13
Version: 1.0.1
Current Configuration:
{
"name": "Linux",
"includePath": [
big list of paths
],
"defines": [],
"compilerPath": "compilerpath",
"cStandard": "c11",
"cppStandard": "c++14",
"intelliSenseMode": "gcc-x64",
"browse": {
"limitSymbolsToIncludedHeaders": true,
"path": [
big list of paths
]
},
"compilerArgs": []
}
Translation Unit Mappings:
[ /path/to//myfile.cc. ]:
/path/to//myfile.cc
Translation Unit Configurations:
[ /path/to//myfile.cc ]: not ready
Process ID: 22754
Memory Usage: 3 MB
Compiler Path: compiler path
Includes:
big list of paths
Standard Version: c++14
IntelliSense Mode: gcc-x64
Other Flags:
--g++
--gnu_version=80200
Total Memory Usage: 3 MB
------- Workspace parsing diagnostics -------
Number of folders and files enumerated: 21991
Number of files discovered (not excluded): 18112
# C++ log
ciclo inattivo: rianalisi del documento attivo
textDocument/hover: file:///path/to//myfile.cc (id: 26)
textDocument/hover: file:///path/to//myfile.cc (id: 27)
textDocument/hover: file:///path/to//myfile.cc (id: 28)
Arresto del server IntelliSense: /path/to//myfile.cc
terminazione del processo figlio: 22666
ancora attivo. Verrà terminato...
Il processo non è stato ancora terminato. Verrà sospeso per 10 millisecondi prima di riprovare.
Il processo non è stato ancora terminato. Verrà sospeso per 20 millisecondi prima di riprovare.
Il processo non è stato ancora terminato. Verrà sospeso per 40 millisecondi prima di riprovare.
Chiusura del canale di comunicazione.
Il client IntelliSense non è disponibile. Verrà usato il parser di tag per passare alla definizione.
Il client IntelliSense non è disponibile. Verrà usato il parser di tag per accedere alle informazioni rapide.
utilizzo del parser di tag per accedere alle informazioni rapide
Additional context
The file is quite big (~2000 lines), and the project is also big (as you can see from logs). It might be relevant that the project is accessed on an AFS mount.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in a .cpp file by using Go to Definition or Peek Definition twice, then inspect the C/C++ log and Log Diagnostics output when IntelliSense stops responding. Compare the first successful lookup with the second failed lookup and confirm that definition lookup and hovering continue working after closing the first editor or peek viewer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100