-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
"RangeError: Maximum call stack size exceeded" when DocumentSymbolProvider is used #2586
Comments
@jrieken wouldn't it make more sense to use the object identity as key for the cache in |
@jrieken Can you move away from using hash on provider objects? |
Fair enough... Tho, a try-catch-return-const could also do it. This isn't a real issue, reported against monaco, since in vscode it is all free of cycles, and since the error seems to be reported against an old version. There is no more use of hash from outline. |
@jrieken If I try running the code from the playground now the |
Things work when removing |
That said the use of |
You are right... |
monaco-editor version: 0.26.1
Browser: Chrome, Firefox
OS: Windows 10
Playground code that reproduces the issue:
Then hit Ctrl-Shift-O in the editor view on the right with the console open. The problem is that
LanguageFeatureRequestDelays.update
calculates a hash of the provider. The hash function used produces a stack overflow if the provider has circular references.Stacktrace:
Edit: It also seems like a bad idea to repeatedly hash an entire object graph in code meant to improve performance.
The text was updated successfully, but these errors were encountered: