10000 Intellisense inifinitely tries to index folders that don't exist · Issue #13366 · microsoft/vscode-cpptools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Intellisense inifinitely tries to index folders that don't exist #13366

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

Closed
Terbold opened this issue Mar 11, 2025 · 20 comments
Closed

Intellisense inifinitely tries to index folders that don't exist #13366

Terbold opened this issue Mar 11, 2025 · 20 comments
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service performance regression A bug that didn't exist in a previous release verified Bug has been reproduced
Milestone

Comments

@Terbold
Copy link
Terbold commented Mar 11, 2025

Environment

  • OS and Version: Macbook Pro Sonoma 14.0
  • VS Code Version: 1.98.1
  • C/C++ Extension Version: 1.24.2
  • If using SSH remote, specify OS of remote machine: N/A

Bug Summary and Steps to Reproduce

Bug Summary:
Latest Intellisense version is looping trying to index folders that don't exist. Since the latest update, anytime I make a change to any C++ file and intellisense needs to rescan, it gets stuck in a loop for about 5-10 minutes trying to index a bunch of folders that do not exist and is barely functional. Reverting to last stable release is required.

Expected behavior:
Before the latest prerelease update, these errors did not appear and intellisense runs smoothly.

This log repeats every 1-2 seconds until the service gives up I guess
intellisense_log.txt

Configuration and Logs

config for unreal engine project:
{
    "configurations": [
        {
            "name": "rubidium_roomsEditor Editor Mac Development (rubidium_rooms)",
            "compilerPath": "/usr/bin/clang++",
            "compilerArgs": [
                "-isysroot",
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
            ],
            "macFrameworkPath": [
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
            ],
            "cStandard": "c17",
            "cppStandard": "c++20",
            "intelliSenseMode": "clang-x64",
            "includePath": [
                "${workspaceFolder}/Intermediate/**",
                "${workspaceFolder}/Plugins/**",
                "${workspaceFolder}/Source/**"
            ],
            "compileCommands": [
                "/Users/jarroda/Documents/Unreal Projects/rubidium_rooms/.vscode/compileCommands_rubidium_rooms.json"
            ]
        },
        {
            "name": "Mac",
            "compilerPath": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
            "compilerArgs": [
                "-isysroot",
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
            ],
            "macFrameworkPath": [
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
            ],
            "cStandard": "c17",
            "cppStandard": "c++20",
            "intelliSenseMode": "clang-x64",
            "includePath": [
                "${workspaceFolder}/Intermediate/**",
                "${workspaceFolder}/Plugins/**",
                "${workspaceFolder}/Source/**"
            ],
            "compileCommands": [
                "/Users/jarroda/Documents/Unreal Projects/rubidium_rooms/.vscode/compileCommands_Default.json"
            ]
        }
    ],
    "version": 4
}

config for unreal engine source:
{
    "configurations": [
        {
            "name": "rubidium_roomsEditor Editor Mac Development (rubidium_rooms)",
            "compilerPath": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
            "compilerArgs": [
                "-isysroot",
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
            ],
            "macFrameworkPath": [
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
            ],
            "cStandard": "c17",
            "cppStandard": "c++20",
            "intelliSenseMode": "clang-x64",
            "includePath": [ 
              "${workspaceFolder}/Engine/Source/**",
              "${workspaceFolder}/Engine/Intermediate/**",
              "${workspaceFolder}/Engine/Plugins/**"
            ],
            "compileCommands": [
                "/Users/Shared/Epic Games/UE_5.4/.vscode/compileCommands_rubidium_rooms.json"
            ]
        },
        {
            "name": "Mac",
            "compilerPath": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
            "compilerArgs": [
                "-isysroot",
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
            ],
            "macFrameworkPath": [
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
            ],
            "cStandard": "c17",
            "cppStandard": "c++20",
            "intelliSenseMode": "clang-x64",
            "includePath": [ 
              "${workspaceFolder}/Engine/Source/**",
              "${workspaceFolder}/Engine/Intermediate/**",
              "${workspaceFolder}/Engine/Plugins/**"
            ],
            "compileCommands": [
                "/Users/Shared/Epic Games/UE_5.4/.vscode/compileCommands_Default.json"
            ]
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

No response

@sean-mcmanus sean-mcmanus pinned this issue Mar 11, 2025
@sean-mcmanus sean-mcmanus added bug Language Service regression A bug that didn't exist in a previous release labels Mar 11, 2025
@sean-mcmanus sean-mcmanus self-assigned this Mar 11, 2025
@sean-mcmanus sean-mcmanus added this to the 1.24.3 milestone Mar 11, 2025
@sean-mcmanus
Copy link
Contributor

@Terbold This doesn't repro with 1.24.1, right?

@sean-mcmanus
Copy link
Contributor

@Terbold Are you able to create a more minimal repro? i.e. are you able to repro it without compileCommands set? Otherwise, if compileCommands is required, are you able to provide a minimal compileCommands that repros it?

@sean-mcmanus
Copy link
Contributor

@Terbold Do you know where the paths that can't be found like /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/Engine/VNI are coming from? Are they in the compileCommands?

@sean-mcmanus
Copy link
Contributor

@Terbold Also, which config is being used Mac or rubidium_roomsEditor Editor Mac Development (rubidium_rooms)

@Terbold
Copy link
Author
Terbold commented Mar 11, 2025

This issue does not appear on 1.24.1

I don't think I am able to reduce the unreal engine repo, but I can provide a sample of the compile commands, it seems this is where the ghost directories are being included.

The first configuration is used, rubidium_roomsEditor Editor Mac Development (rubidium_rooms)

compileCommands_rubidium_rooms.json

	{
		"file": "/Users/jarroda/Documents/Unreal Projects/rubidium_rooms/Source/rubidium_rooms/Abilities/AbilityBase.cpp",
		"arguments": [
			"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
			"@/Users/jarroda/Documents/Unreal Projects/rubidium_rooms/.vscode/compileCommands_rubidium_rooms/rubidium_rooms.1.rsp"
		],
		"directory": "/Users/Shared/Epic Games/UE_5.4/Engine/Source"
	},
	{
		"file": "/Users/jarroda/Documents/Unreal Projects/rubidium_rooms/Source/rubidium_rooms/Abilities/AbilityBase.h",
		"arguments": [
			"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
			"@/Users/jarroda/Documents/Unreal Projects/rubidium_rooms/.vscode/compileCommands_rubidium_rooms/rubidium_rooms.1.rsp"
		],
		"directory": "/Users/Shared/Epic Games/UE_5.4/Engine/Source"
	},
	{
		"file": "/Users/jarroda/Documents/Unreal Projects/rubidium_rooms/Source/rubidium_rooms/Abilities/AbilityComponentBase.cpp",
		"arguments": [
			"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
			"@/Users/jarroda/Documents/Unreal Projects/rubidium_rooms/.vscode/compileCommands_rubidium_rooms/rubidium_rooms.1.rsp"
		],
		"directory": "/Users/Shared/Epic Games/UE_5.4/Engine/Source"
	},
	{
		"file": "/Users/jarroda/Documents/Unreal Projects/rubidium_rooms/Source/rubidium_rooms/Abilities/AbilityComponentBase.h",
		"arguments": [
			"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
			"@/Users/jarroda/Documents/Unreal Projects/rubidium_rooms/.vscode/compileCommands_rubidium_rooms/rubidium_rooms.1.rsp"
		],
		"directory": "/Users/Shared/Epic Games/UE_5.4/Engine/Source"
	},
...

Each unreal engine module has an rsp file associated with it which include the necessary include files. I'm not sure if intellisense parsed these previously, but I've never had issues with intellisense autocomplete beforehand.

rubidium_rooms.1.rsp.txt

@Terbold
Copy link
Author
Terbold commented Mar 11, 2025

In 1.24.1, the startup log for intellisense looks like this:

loggingLevel: Information
cpptools version (TypeScript): 1.24.1
cpptools version (native): 1.24.1.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
Querying compiler for default C++ language standard using command line: /usr/bin/clang -x c++ -E -dM /dev/null
Compiler returned default language standard version: c++98. Since this version is old, will try to use newer version c++17 as default.
Querying compiler's default target using command line: "/usr/bin/clang" -dumpmachine
Compiler returned default target value: arm64-apple-darwin23.0.0
Querying compiler for default C++ language standard using command line: /usr/bin/clang++ -x c++ -E -dM /dev/null
Compiler returned default language standard version: c++98. Since this version is old, will try to use newer version c++17 as default.
Querying compiler's default target using command line: "/usr/bin/clang++" -dumpmachine
Compiler returned default target value: arm64-apple-darwin23.0.0
  Folder: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include will be indexed
  Folder: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include will be indexed
  Folder: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include will be indexed
  Folder: /Users/jarroda/Documents/Unreal Projects/rubidium_rooms/Source will be indexed
...

In 1.24.2, the startup log encounters the issue before building the list of folders to index

loggingLevel: 5
cpptools version (TypeScript): 1.24.2
cpptools version (native): 1.24.2.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
Querying compiler for default C++ language standard using command line: /usr/bin/clang -x c++ -E -dM /dev/null
Compiler returned default language standard version: c++98. Since this version is old, will try to use newer version c++17 as default.
Querying compiler's default target using command line: "/usr/bin/clang" -dumpmachine
Compiler returned default target value: arm64-apple-darwin23.0.0
Querying compiler for default C++ language standard using command line: /usr/bin/clang++ -x c++ -E -dM /dev/null
Compiler returned default language standard version: c++98. Since this version is old, will try to use newer version c++17 as default.
Querying compiler's default target using command line: "/usr/bin/clang++" -dumpmachine
Compiler returned default target value: arm64-apple-darwin23.0.0
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/Engine/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/Core/UHT. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/Core/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/TraceLog/UHT. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/TraceLog/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/CoreOnline/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/CoreUObject/VNI. error = -1
...

Eventually it gets to indexing list, after a couple minutes of erroring

@bobbrow bobbrow moved this to In progress in cpptools Mar 11, 2025
@bobbrow bobbrow added the investigate: repro This issue's repro steps needs to be investigated/confirmed label Mar 11, 2025
@sean-mcmanus
Copy link
Contributor

@Terbold Can you change your C_Cpp.loggingLevel to "Debug" with 1.24.2? There could be other important logging going on that would indicate the root cause. The "Unable to retrieve file system information for" logging just means an include path is used that doesn't exist and isn't in itself an error.

@sean-mcmanus
Copy link
Contributor

@Terbold Also, can you try removing

            "includePath": [ 
              "${workspaceFolder}/Engine/Source/**",
              "${workspaceFolder}/Engine/Intermediate/**",
              "${workspaceFolder}/Engine/Plugins/**"
            ],

from your configuration to see if it fixes the issue? 1.24.2 introduced a fix/change which causes those includePaths to be processed for workspace symbols which was not occurring in prior versions when compileCommands is used.

@sean-mcmanus
Copy link
Contributor

@Terbold Also, what is the workspace parsing status bar indicator show in the C/C++ status bar? i.e. does it show Indexing Workspace or a Tag parsing progress? Hovering over the link on the right may show more info.

Image

@Terbold
Copy link
Author
Terbold commented Mar 11, 2025

@sean-mcmanus Switched the logging to Debug and removed the include paths from the project and engine configs.

This is the startup log now:

loggingLevel: 6
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Player/PlayerCharacter.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Generic/InteractionObject.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Rooms/RoomBase.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/WeaponDataBase.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/WeaponDataBase.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/WeaponComponentBase.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/WeaponComponentBase.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/WeaponBase.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/GunBase.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/BulletBase.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/UI/PlayerHUDComponent.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Player/ProceduralAnimComponent.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Player/ProceduralAnimComponent.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Player/PlayerCharacter.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Player/PlayerStateBase.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Player/PlayerStateBase.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Pickups/WeaponPickupComponent.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Generic/ThrowableComponentBase.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Generic/ThrowableComponentBase.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/WeaponBase.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/PlayerWeaponComponent.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/GunBase.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Weapons/BulletBase.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Generic/ProjectileBase.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Generic/ProjectileBase.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/UI/PlayerCompassObjective.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/RubidiumCVars.h
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/RubidiumCVars.cpp
LSP: (received - deferred) textDocument/didOpen: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Rooms/RoomStart.h
LSP: (received) cpptools/preinitialize (id: 1)
LSP: (invoked) cpptools/preinitialize (id: 1)
LSP: Sending response (id: 1)
LSP: (received) cpptools/initialize (id: 2)
LSP: (invoked) cpptools/initialize (id: 2)
cpptools version (TypeScript): 1.24.2
cpptools version (native): 1.24.2.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
LSP: Sending response (id: 2)
LSP: (received - deferred) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/queryCompilerDefaults (id: 3)
LSP: (received - deferred) cpptools/getDocumentSymbols: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Generic/InteractionObject.cpp (id: 4)
LSP: (received - deferred) cpptools/getDocumentSymbols: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Rooms/RoomStart.h (id: 5)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 3)
LSP: (received - deferred) cpptools/getCodeActions: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Rooms/RoomStart.h (id: 6)
LSP: (received - deferred) cpptools/getCodeActions: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Generic/InteractionObject.cpp (id: 7)
Querying compiler for default C++ language standard using command line: /usr/bin/clang -x c++ -E -dM /dev/null
LSP: (received - deferred) cpptools/getDocumentSymbols: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Generic/InteractionObject.cpp (id: 8)
LSP: $/cancelRequest (cpptools/getDocumentSymbols, id: 4)
LSP: $/cancelRequest (cpptools/getDocumentSymbols, id: 5)
LSP: (received - deferred) cpptools/getDocumentSymbols: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Rooms/RoomStart.h (id: 9)
LSP: (received - deferred) cpptools/getCodeActions: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Rooms/RoomStart.h (id: 10)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 6)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 7)
LSP: (received - deferred) cpptools/getCodeActions: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Generic/InteractionObject.cpp (id: 11)
LSP: (received - deferred) cpptools/getFoldingRanges: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Generic/InteractionObject.cpp (id: 12)
LSP: (received - deferred) cpptools/getFoldingRanges: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Rooms/RoomStart.h (id: 13)
Compiler returned default language standard version: c++98. Since this version is old, will try to use newer version c++17 as default.
Querying compiler's default target using command line: "/usr/bin/clang" -dumpmachine
Compiler returned default target value: arm64-apple-darwin23.0.0
Compiler info database not connected - skipping load.
Compiler query command line: /usr/bin/clang -std=c17 -Wp,-v -fno-blocks -E -dM -x c /dev/null
Attempting to get defaults from C compiler in "compilerPath" property: '/usr/bin/clang'
Compiler info database not connected - skipping load.

8000
Compiler query command line: /usr/bin/clang -std=c++17 -Wp,-v -fno-blocks -E -dM -x c++ /dev/null
Attempting to get defaults from C++ compiler in "compilerPath" property: '/usr/bin/clang'
LSP: Sending response (id: 3)
LSP: (received) cpptools/didChangeCppProperties (id: 14)
LSP: (received) cpptools/didChangeCppProperties (id: 15)
LSP: (invoked) cpptools/didChangeCppProperties (id: 14)
LSP: (received - deferred) cpptools/didChangeVisibleTextEditors
LSP: (received - deferred) cpptools/didChangeActiveEditor: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/Source/rubidium_rooms/Rooms/RoomStart.h
LSP: (received - deferred) cpptools/didChangeVisibleTextEditors
LSP: (received - deferred) cpptools/didChangeCompileCommands: file:///Users/jarroda/Documents/Unreal%20Projects/rubidium_rooms/.vscode/compileCommands_rubidium_rooms.json
Compiler info database not connected - skipping load.
Querying compiler for default C++ language standard using command line: /usr/bin/clang++ -x c++ -E -dM /dev/null
Compiler info database not connected - skipping load.
Compiler returned default language standard version: c++98. Since this version is old, will try to use newer version c++17 as default.
Querying compiler's default target using command line: "/usr/bin/clang++" -dumpmachine
Compiler returned default target value: arm64-apple-darwin23.0.0
Compiler query command line: /usr/bin/clang++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -std=c++20 -Wp,-v -fno-blocks -E -dM -x c++ /dev/null
Compiler query command line: /usr/bin/clang++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -std=c17 -Wp,-v -fno-blocks -E -dM -x c /dev/null
Attempting to get defaults from C compiler in "compilerPath" property: '/usr/bin/clang++'
Attempting to get defaults from C++ compiler in "compilerPath" property: '/usr/bin/clang++'
LSP: (received - deferred) cpptools/didChangeVisibleTextEditors
LSP: (received - deferred) cpptools/didChangeVisibleTextEditors
Compiler info database not connected - skipping load.
Compiler query command line: /usr/bin/clang++ -std=c++20 -Wp,-v -fno-blocks -E -dM -x c++ /dev/null
Attempting to get defaults from C++ compiler in "compilerPath" property: '/usr/bin/clang++'
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/Engine/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/Core/UHT. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/Core/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/TraceLog/UHT. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/TraceLog/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/CoreOnline/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/CoreUObject/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/FieldNotification/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/NetCore/VNI. error = -1
...

Then it repeats the errors again, no additional messages between repeats, eventually it gets to the indexing list:

...
 Folder: /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/CoreTransferable.framework/Headers will be indexed
  Folder: /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/SceneKit.framework/Headers will be indexed
  Folder: /Users/jarroda/Documents/Unreal Projects/rubidium_rooms will be indexed
  Folder: /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate will be indexed
  Folder: /Users/Shared/Epic Games/UE_5.4/Engine/Plugins will be indexed
LSP: Sending response (id: 14)
LSP: (invoked) cpptools/didChangeCppProperties (id: 15)
Code browsing service initialized
Populating file name cache...
Done populating filename cache. Elapsed time: 0 ms
Querying compiler for default C++ language standard using command line: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -x c++ -E -dM /dev/null
Compiler returned default language standard version: c++98. Since this version is old, will try to use newer version c++17 as default.
Querying compiler's default target using command line: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" -dumpmachine
Compiler returned default target value: arm64-apple-darwin23.0.0
Compiler query command line: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -std=c17 -Wp,-v -fno-blocks -E -dM -x c /dev/null
Compiler query command line: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -std=c++20 -Wp,-v -fno-blocks -E -dM -x c++ /dev/null
Attempting to get defaults from C compiler in "compilerPath" property: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
Attempting to get defaults from C++ compiler in "compilerPath" property: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
Saved (gcc) compiler definition to database: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
Saved (gcc) compiler definition to database: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
Compiler query command line: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -std=c++20 -Wp,-v -fno-blocks -E -dM -x c++ /dev/null
Attempting to get defaults from C++ compiler in "compilerPath" property: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
Saved (gcc) compiler definition to database: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/Engine/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/Core/UHT. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/Core/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/TraceLog/UHT. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/TraceLog/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/CoreOnline/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/CoreUObject/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/FieldNotification/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/NetCore/VNI. error = -1
  Unable to retrieve file system information for /Users/Shared/Epic Games/UE_5.4/Engine/Intermediate/Build/Mac/UnrealEditor/Inc/NetCommon/UHT. error = -1
...

Then it goes back to error looping. While it is doing this, the status bar says its "initializing".

@Terbold
Copy link
Author
Terbold commented Mar 11, 2025

After removing the include directories, it does appear to be indexing a bit faster and autocomplete is smoothing out now, but I'm not sure how it compares to 1.24.1. I'll try it out a little bit more.

@sean-mcmanus
Copy link
Contributor

@Terbold I believe simply removing the includePath may not be sufficient because we will add ${workspaceFolder}/** automatically, but using

            "includePath": [ 
              "${workspaceFolder}/*"
            ],

may improve the performance.

We have a known regression in with the compiler querying caching into the database isn't working with 1.24.2. It's possible it could be querying the compiler for every compile_commands.json entry.

@sean-mcmanus
Copy link
Contributor
sean-mcmanus commented Mar 12, 2025

@Terbold The "Initializing" message would mean the database is busy initializing (or it's busy processing the compile_commands.json) and hasn't started indexing/parsing yet. Does logging related to adding compiler definition to database occur repeatedly?

@sean-mcmanus
Copy link
Contributor

@Terbold I've reproed a major performance problem where it's stuck "Initializing" using compile_commands.json with an rsp file, but I repro the same issue with 1.24.1/1.23.6 -- the only difference is that 1.24.2 adds the "Unable to retrieve file system" logging, which is unrelated to the performance regression (or just potentially a symptom), because I get the same logging on Linux and it takes like 6 seconds but doing the same repro on mac takes me >2 minutes (stopped waiting). I think there's a performance problem with processing the mac frameworks (which don't exist on Linux).

@sean-mcmanus
Copy link
Contributor

@Terbold Can you confirm if 1.24.1 or 1.23.6 is also stuck showing "Initializing" status for a long time? i.e. is the only difference with 1.24.2 the extra logging?

@Terbold
Copy link
Author
Terbold commented Mar 12, 2025

@sean-mcmanus Apologies for the delay, I needed to make some progress on my project last night and switched back to 1.24.1.

In 1.24.1 and 1.23.6 it may take a minute for the first initialization, but after that everything is smooth and subsequent rescans are almost instant or in worst case scenarios take up to 30 seconds (which is somewhat to be expected given the size of unreal engine). In 1.24.2, it seems that anything that causes it to rescan causes it to take 2-5 minutes or longer before highlighting and/or autocomplete will update. This includes things such as defining a new function in a class, adding a new class, adding a new include, etc, and when it finishes, sometimes it doesn't update the highlighting or autocomplete. In this state it is impossible to work with intellisense.

After further testing, I don't think there was much difference in replacing the includePath with what you provided vs leaving them as I normally set them.

@Terbold
Copy link
Author
Terbold commented Mar 12, 2025

I can try copying my project to my windows workstation a bit later and seeing if the same issue occurs, though I haven't turned that machine on in a while due to travel, hence why I've been working on my mac

@Terbold
Copy link
Author
Terbold commented Mar 12, 2025

@sean-mcmanus this is the full log from an initialization of 1.24.2

intellisense_1.24.2.txt

@sean-mcmanus
Copy link
Contributor
sean-mcmanus commented Mar 12, 2025

@Terbold Okay, thanks -- I think we have enough info now and can repro the issue you're seeing using the .rsp file you provided. I see it take 30 seconds to Initialize on mac with 1.24.2 and nearly instantly with 1.24.1/1.23.6 (you might be hitting a more severe symptom but I think the root cause is the same). The issue I was seeing yesterday with 1.24.1/1.23.6 was with a modified .rsp file with 200 lines added, so that's probably a bug too, but not a regression.

@sean-mcmanus sean-mcmanus added verified Bug has been reproduced and removed investigate: repro This issue's repro steps needs to be investigated/confirmed labels Mar 12, 2025
@sean-mcmanus sean-mcmanus moved this from In progress to Done in cpptools Mar 13, 2025
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Mar 13, 2025
@sean-mcmanus
Copy link
Contributor

@sean-mcmanus sean-mcmanus unpinned this issue Mar 24, 2025
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service performance regression A bug that didn't exist in a previous release verified Bug has been reproduced
Projects
Status: Done
Development

No branches or pull requests

4 participants
0