Bug 19539 - NRE in UnreachableCodeIssue
Summary: NRE in UnreachableCodeIssue
Status: RESOLVED INVALID
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 5.0
Hardware: PC Mac OS
: Low normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2014-05-05 17:21 UTC by Mikayla Hutchinson [MSFT]
Modified: 2016-10-25 15:19 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Mikayla Hutchinson [MSFT] 2014-05-05 17:21:57 UTC
ERROR [2014-05-05 16:41:41Z]: CodeAnalysis: Got exception in inspector 'MonoDevelop.CSharp.Refactoring.CodeIssues.NRefactoryIssueProvider'
System.NullReferenceException: Object reference not set to an instance of an object
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor+StatementIssueCollector.AddStatement (ICSharpCode.NRefactory.CSharp.Statement statement) [0x00141] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:162 
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor+StatementIssueCollector.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:133 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:252 
  at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs:130 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00017] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor+StatementIssueCollector.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x0001c] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:134 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitIfElseStatement (ICSharpCode.NRefactory.CSharp.IfElseStatement ifElseStatement) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:317 
  at ICSharpCode.NRefactory.CSharp.IfElseStatement.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs:73 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00017] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor+StatementIssueCollector.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x0001c] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:134 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:252 
  at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs:130 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00017] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor+StatementIssueCollector.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x0001c] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:134 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitForeachStatement (ICSharpCode.NRefactory.CSharp.ForeachStatement foreachStatement) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:292 
  at ICSharpCode.NRefactory.CSharp.ForeachStatement.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForeachStatement.cs:88 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00017] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor+StatementIssueCollector.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x0001c] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:134 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:252 
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor+StatementIssueCollector.Collect (ICSharpCode.NRefactory.CSharp.Refactoring.GatherVisitor visitor, ICSharpCode.NRefactory.CSharp.BlockStatement body) [0x00029] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:127 
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor.VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration methodDeclaration) [0x00008] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:58 
  at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs:80 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00017] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00014] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:104 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:142 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase`1[ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue].VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00020] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/GatherVisitorBase.cs:173 
  at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs:123 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00017] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00014] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:104 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:137 
  at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs:139 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00017] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue+GatherVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00014] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs:104 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:57 
  at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs:140 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase`1[ICSharpCode.NRefactory.CSharp.Refactoring.UnreachableCodeIssue].GetIssues () [0x0000d] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/GatherVisitorBase.cs:165 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorCodeIssueProvider.GetIssues (ICSharpCode.NRefactory.CSharp.Refactoring.BaseRefactoringContext context, System.String subIssue) [0x00022] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/GatherVisitorBase.cs:64 
  at MonoDevelop.CSharp.Refactoring.CodeIssues.NRefactoryIssueProvider.GetIssues (System.Object ctx, CancellationToken cancellationToken) [0x00055] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeIssues/NRefactoryIssueProvider.cs:106 
  at MonoDevelop.CodeIssues.CodeAnalysisRunner+<Check>c__AnonStorey0.<>m__0 (MonoDevelop.CodeIssues.CodeIssueProvider parentProvider) [0x00047] in /Users/michael/Mono/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs:85
Comment 1 Ram Chandra 2014-10-29 04:41:40 UTC
I tried this issue but I am unable to reproduce this issue.

Could you please provide sample application or steps to reproduce this issue? So that we can reproduce this issue at our end.
Comment 2 Jason Imison 2016-10-25 15:19:50 UTC
Closing as the C# binding has moved to Roslyn.