Skip to content

No database created during queryCompilerDefaults causing cpptools to exit #12976

Open

Description

I am getting this crash with the release and beta versions, and I would love to help you track this down because intellisense has always been hit or miss for me for (literally) decades!

I have attached to the 'ms-vscode.cpptools-1.22.11-win32-x64\bin\cpptools.exe' process, but it just eventually exits with exit code 0, so I can't get a stack trace from that.
Could you advise what I should attach to, and if there is a version of it with symbols?

This is the log from the Output window:

loggingLevel: Debug
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.22.11
cpptools version (native): 1.22.11.0
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
LSP: Message ignored due to no registered handler: $/setTrace
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.22.11
cpptools version (native): 1.22.11.0
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
LSP: Sending response (id: 1)
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
LSP: (received - deferred) cpptools/getDocumentSymbols: file:///d%3A/dev/shared/isoeditor/devices/device_directories.cpp (id: 3)
LSP: (received - deferred) cpptools/getCodeActions: file:///d%3A/dev/shared/isoeditor/devices/device_directories.cpp (id: 4)
LSP: (received - deferred) cpptools/getDocumentSymbols: file:///d%3A/dev/shared/isoeditor/devices/device_directories.cpp (id: 5)
LSP: (received - deferred) cpptools/getFoldingRanges: file:///d%3A/dev/shared/isoeditor/devices/device_directories.cpp (id: 6)

Adrian Stephens

Originally posted by adrianstephens in #10651

Activity

  1. added
    regression
    on Nov 19, 2024
  2. adrianstephens commented on Nov 19, 2024

    @adrianstephens
    Contributor

    with log level=7, I got a MessageBox saying:

    Command 'C/C++: Go to previous preprocessor directive in conditional group' resulted in an error
    Client is not running
    

    I didn't explicitly invoke that command, but my cat likes to walk across my keyboard!

    I have 3 vscode popup errors in this order:

    Sending document notification textDocument/didOpen failed

    Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Error: Pending response rejected since connection got disposed
    The language server crashed. Restarting...

    And the log says:

    loggingLevel: 7
    LSP: (received) cpptools/initialize (id: 1)
    LSP: (invoked) cpptools/initialize (id: 1)
    cpptools version (TypeScript): 1.21.6
    cpptools version (native): 1.21.6.0
    Autocomplete is enabled.
    Error squiggles are enabled.
    Hover is enabled.
    IntelliSense Engine = default.
    LSP: Sending response (id: 1)
    LSP: (received) cpptools/queryCompilerDefaults (id: 2)
    LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
    LSP: (received) cpptools/initialize (id: 1)
    LSP: (invoked) cpptools/initialize (id: 1)
    cpptools version (TypeScript): 1.21.6
    cpptools version (native): 1.21.6.0
    Autocomplete is enabled.
    Error squiggles are enabled.
    Hover is enabled.
    IntelliSense Engine = default.
    LSP: Sending response (id: 1)
    LSP: (received) cpptools/queryCompilerDefaults (id: 2)
    LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
    LSP: (received - deferred) cpptools/getDocumentSymbols: file:///d%3A/dev/shared/common/extra/timsort.h (id: 3)
    LSP: (received - deferred) cpptools/getDocumentSymbols: file:///d%3A/dev/shared/common/extra/timsort.h (id: 4)
    LSP: (received - deferred) cpptools/getFoldingRanges: file:///d%3A/dev/shared/common/extra/timsort.h (id: 5)
    
    

    I'm still using 1.21.6 (as you can see)

  3. sean-mcmanus commented on Nov 19, 2024

    @sean-mcmanus
    ContributorAuthor

    adrianstephens Okay, thanks for the info -- we'll need to look into how this is possible. We haven't gotten any similar reports like this yet for 1.21.6 and that was released 3 months ago.

  4. changed the title [-]1.22 regression: No database created during queryCompilerDefaults causing cpptools to exit[/-] [+]No database created during queryCompilerDefaults causing cpptools to exit[/+] on Nov 19, 2024
  5. adrianstephens commented on Nov 20, 2024

    @adrianstephens
    Contributor

    Sean McManus (@sean-mcmanus) Where can I take the issue of the database not being created?

    I have tried pointing the database to the one generated by Visual Studio 2022 (vs\shared\v17\Browse.VC.db). I don't know if they're compatible, but I get the same pattern of behaviour (cpptools.exe eventually exits cleanly and the message about the language server crashing)

  6. removed this from the 1.25 milestone on Apr 29, 2025
  7. 9 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language Servicebugregressionreliability

    Type

    Projects

    • Status
      Triage

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions