Skip to content
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: byte length of Uint32Array should be a multiple of 4 #94521

Closed
alexdima opened this issue Apr 6, 2020 · 2 comments
Closed

RangeError: byte length of Uint32Array should be a multiple of 4 #94521

alexdima opened this issue Apr 6, 2020 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release important Issue identified as high-priority verified Verification succeeded
Milestone

Comments

@alexdima
Copy link
Member

alexdima commented Apr 6, 2020

ERR byte length of Uint32Array should be a multiple of 4: RangeError: byte length of Uint32Array should be a multiple of 4
    at new Uint32Array (<anonymous>)
    at fromLittleEndianBuffer (file:///Users/jrieken/Code/vscode/out/vs/workbench/api/common/shared/semanticTokensDto.js:42:20)
    at Object.decodeSemanticTokensDto (file:///Users/jrieken/Code/vscode/out/vs/workbench/api/common/shared/semanticTokensDto.js:105:21)
    at MainThreadDocumentSemanticTokensProvider.provideDocumentSemanticTokens (file:///Users/jrieken/Code/vscode/out/vs/workbench/api/browser/mainThreadLanguageFeatures.js:613:45)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)

This was spotted by @jrieken when working. There are no steps to reproduce because this has to do with how a specific part of an extension host message (the semantic tokens dto) aligns on bytes in the underlying nodejs stream.

I can reproduce through unit testing.

This can lead to semantic tokens becoming stale and not updating.

@alexdima alexdima self-assigned this Apr 6, 2020
@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release important Issue identified as high-priority labels Apr 6, 2020
@alexdima alexdima added this to the March 2020 milestone Apr 6, 2020
alexdima added a commit that referenced this issue Apr 6, 2020
Fixes issue #94521: Make sure to always specify Uint32Array length
@alexdima
Copy link
Member Author

alexdima commented Apr 6, 2020

The fix is now in master and also in release/1.44

@alexdima alexdima closed this as completed Apr 6, 2020
@alexdima
Copy link
Member Author

alexdima commented Apr 7, 2020

There is a unit test for this case and there are no steps to verify => giving verified label.

@alexdima alexdima added the verified Verification succeeded label Apr 7, 2020
@github-actions github-actions bot locked and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release important Issue identified as high-priority verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

1 participant