Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Variable misuse ML model found a bug where wrong variable is used to … #23437
…call a method.
Customer clicks on error list to navigate to an error and VS crash.
Bugs this fixes
Workarounds, if any
There is no workaround.
Low risk. the code path is fallback code path, so not always exercised. and it will no longer throw an exception.
Is this a regression from a previous update?
Root cause analysis
when we try to navigate to an error, we try our best to go to right location. since error list can contain staled error, location info can be wrong, so we try to get right snapshot to calculate right location. but it is not always guaranteed that we can get to right text snapshot from roslyn snapshot. when that is failed, we fallback to whatever latest text snapshot we have to calculate location. here code used wrong snapshot when it is supposed to use current snapshot which lead to null ref.
How was the bug found?
Variable misuse ML model tool.
Nov 29, 2017
15 checks passed
Here's the accepted AI conference paper explaining this new "QA" tool that found this bug. Expect more AI improvements in SW in the future.