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

Crash in ExtractMethod refactoring suggestion... #18823

Closed
KevinH-MS opened this issue Apr 19, 2017 · 1 comment
Closed

Crash in ExtractMethod refactoring suggestion... #18823

KevinH-MS opened this issue Apr 19, 2017 · 1 comment
Labels

Comments

@KevinH-MS
Copy link
Contributor

KevinH-MS commented Apr 19, 2017

Version Used:
d15rel 26417.0-Preview

Steps to Reproduce:
I haven't been able to narrow this down, but I'm hitting it quite a bit when browsing through my solution. Specifically, LUT repo, commit 99bc272cdeac224793f4ced3ff4849837bf63f96, doing "find next" on ".DoFullBuild" in BuildManagerState.cs

Expected Behavior:
No Crash

Actual Behavior:

InvalidOperationException: Unexpected false
   at Roslyn.Utilities.Contract.ThrowIfFalse(Boolean condition, String message)
   at Microsoft.CodeAnalysis.ExtractMethod.ExtractMethodMatrix.GetVariableStyle(Boolean captured, Boolean dataFlowIn, Boolean dataFlowOut, Boolean alwaysAssigned, Boolean variableDeclared, Boolean readInside, Boolean writtenInside, Boolean readOutside, Boolean writtenOutside, Boolean unsafeAddressTaken) in E:\A\_work\24\s\src\Features\Core\Portable\ExtractMethod\ExtractMethodMatrix.cs:line 78
   at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.Analyzer.GetVariableStyle(Dictionary`2 symbolMap, ISymbol symbol, SemanticModel model, ITypeSymbol type, Boolean captured, Boolean dataFlowIn, Boolean dataFlowOut, Boolean alwaysAssigned, Boolean variableDeclared, Boolean readInside, Boolean writtenInside, Boolean readOutside, Boolean writtenOutside, Boolean unsafeAddressTaken) in E:\A\_work\24\s\src\Features\Core\Portable\ExtractMethod\MethodExtractor.Analyzer.cs:line 461
   at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.Analyzer.GenerateVariableInfoMap(SemanticModel model, DataFlowAnalysis dataFlowAnalysisData, Dictionary`2 symbolMap) in E:\A\_work\24\s\src\Features\Core\Portable\ExtractMethod\MethodExtractor.Analyzer.cs:line 427
   at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.Analyzer.<AnalyzeAsync>d__10.MoveNext() in E:\A\_work\24\s\src\Features\Core\Portable\ExtractMethod\MethodExtractor.Analyzer.cs:line 74
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 184
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
   at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.<ExtractMethodAsync>d__13.MoveNext() in E:\A\_work\24\s\src\Features\Core\Portable\ExtractMethod\MethodExtractor.cs:line 40
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 184
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
   at Microsoft.CodeAnalysis.ExtractMethod.AbstractExtractMethodService`3.<ExtractMethodAsync>d__2.MoveNext() in E:\A\_work\24\s\src\Features\Core\Portable\ExtractMethod\AbstractExtractMethodService.cs:line 42
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 184
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
   at Microsoft.CodeAnalysis.CodeRefactorings.ExtractMethod.ExtractMethodCodeRefactoringProvider.<GetCodeActionAsync>d__1.MoveNext() in E:\A\_work\24\s\src\Features\Core\Portable\CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs:line 61
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 184
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
   at Microsoft.CodeAnalysis.CodeRefactorings.ExtractMethod.ExtractMethodCodeRefactoringProvider.<ComputeRefactoringsAsync>d__0.MoveNext() in E:\A\_work\24\s\src\Features\Core\Portable\CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs:line 47
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 184
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
   at Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.<GetRefactoringFromProviderAsync>d__8.MoveNext() in E:\A\_work\24\s\src\Features\Core\Portable\CodeRefactorings\CodeRefactoringService.cs:line 142
@KevinH-MS
Copy link
Contributor Author

Looks to be dupe of #17165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant