Closed RedCMD closed 1 month ago
I get an exception in the extension when I try to use it.
workbench.web.main.internal.js:3109 Error: No grammar provided for <undefined>
at collectReferencesOfReference (/home/node/.vscode-remote/extensions/redcmd.tmlanguage-syntax-highlighter-2.5.0/out/textmate/grammar/grammarDependencies.js:102:19)
at ScopeDependencyProcessor.processQueue (/home/node/.vscode-remote/extensions/redcmd.tmlanguage-syntax-highlighter-2.5.0/out/textmate/grammar/grammarDependencies.js:71:13)
at Registry._loadGrammar (/home/node/.vscode-remote/extensions/redcmd.tmlanguage-syntax-highlighter-2.5.0/out/textmate/main.js:81:33)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at tokenizeFile (/home/node/.vscode-remote/extensions/redcmd.tmlanguage-syntax-highlighter-2.5.0/out/TextMate.js:204:21)
at Object.getChildren (/home/node/.vscode-remote/extensions/redcmd.tmlanguage-syntax-highlighter-2.5.0/out/Providers/TreeDataProvider.js:34:23)
at vy.Y (file:///vscode/bin/linux-x64/d78a74bcdfad14d5d3b1b782f87255d802b57511-insider/out/vs/workbench/api/node/extensionHostProcess.js:156:13744)
at vy.getChildren (file:///vscode/bin/linux-x64/d78a74bcdfad14d5d3b1b782f87255d802b57511-insider/out/vs/workbench/api/node/extensionHostProcess.js:156:10258)
Do you have a minimal repro I could use?
there was no language assigned to the file? I should prob handle that and show a friendly error
assign language CPP and use example text:
typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<int>::type>::type>::type>::type>::type>::type>::type>::type>::type ptr{nullptr};
I'll look into making a repo
The language assigned to the file was C++, and syntax highlighting reflecdted that. I even saved it as a C++ file.
repo: https://github.com/RedCMD/TreeViewMaxCallStackError
notice if you lower the sibling nodes down to 125000, it doesn't error but VSCode takes a very very long time to display them even tho the extension returns every single node in less than a 100ms
notice if you lower the nested nodes to 3000 and after the tree has been displayed, scrolling down too far causes VSCode to freeze
@alexr00 once a MaxCallStackError occurs it permanently breaks the TreeView and requires VSCode to be restarted
Thank you for the repo! I can easily fix the call stack issue. The slowness is coming from many cross process calls. I'm tracking that here: https://github.com/microsoft/vscode/issues/232263
Max call stack error when there's too many nodes in a TreeView
Steps to Reproduce:
typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<typename::std::add_pointer<int>::type>::type>::type>::type>::type>::type>::type>::type>::type ptr{nullptr};
works well in a CPP fileShow TextMate Calling Stack
Seems TreeView cant expand more than 170k nesting nodes all at once
related: #61524