-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Cannot read property 'start' of undefined: TypeError: Cannot read property 'start' of undefined #99410
Comments
intersection(t){const i=v.Max(t.start,this._start) |
|
Thanks for the pointer, allowed me to find the issue - our language server was returning some Diagnostics with a null Range. This wasn't a problem for publishing errors to the diagnostics collection, that code was tolerant of this and this code has been like this a long time. What triggered the error is that we started implementing provideCodeActions in the TypeScript (completely separate from our language server, which is a C# LSP), and that code in vscode didn't handle the null ranges in the diagnostics collection. Seems like this could trip other extensions even... I've fixed our code, but I recommend that you either sanitize the range when they're pushed to a diagnostics collection teach the code actions code to be tolerant of a null range. Thanks! |
@sandy081 Assigning you since it sounds like we may want to validate diagnostics before adding them to the diagnostic collection |
This seems to be in diagnostics API so moving to @jrieken |
creating diagnostics without range or message now throws a type error |
Thx |
Adding verified based on code review |
Issue Type: Bug
Seeing this frequently in my pipeline builds (e.g. https://dev.azure.com/ms-azuretools/AzCode/_build/results?buildId=20513&view=logs&j=a5e52b91-c83f-5429-4a68-c246fc63a4f7&t=95359773-9cfc-583f-7b87-0a0d44ca7da9&l=769). Have occasionally see it locally, but don't have a repro scenaro.
Pretty sure this is not in my code.
VS Code version: Code - Insiders 1.46.0-insider (595d2b9, 2020-06-03T05:38:33.098Z)
OS version: Darwin x64 18.7.0
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Extensions (11)
The text was updated successfully, but these errors were encountered: