microsoft / microsoft/vscode-cpptools

Go to definition failing when done twice on symbol defined locally

Open
#6,280 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug investigate: repro Language Service symlinks
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

  1. Open a .cpp file
  2. Click on any symbol defined in the same opened file
  3. Go to definition (or Peek definition)
  4. This works (an editor, or the peek viewer, opens), and IntelliSense also works as expected (hovering shows definition, etc)
  5. Close the newly opened editor / peek viewer
  6. Click on any symbol (whatsoever) and go to definition
  7. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.