Bug 7272 - NRE in AssignmentMadeToSameVariableIssue
Summary: NRE in AssignmentMadeToSameVariableIssue
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-09-18 12:46 UTC by Mikayla Hutchinson [MSFT]
Modified: 2012-09-19 13:27 UTC (History)
1 user (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 FIXED

Description Mikayla Hutchinson [MSFT] 2012-09-18 12:46:01 UTC
ERROR [2012-09-18 12:34:54Z]: 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.AccessPath.Equals (System.Object obj) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertToInitializer/AccessPath.cs:115 
  at ICSharpCode.NRefactory.CSharp.Refactoring.AssignmentMadeToSameVariableIssue+GatherVisitor.AreEquivalent (ICSharpCode.NRefactory.Semantics.ResolveResult first, ICSharpCode.NRefactory.Semantics.ResolveResult second) [0x0000e] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AssignmentMadeToSameVariableIssue.cs:93 
  at ICSharpCode.NRefactory.CSharp.Refactoring.AssignmentMadeToSameVariableIssue+GatherVisitor.VisitAssignmentExpression (ICSharpCode.NRefactory.CSharp.AssignmentExpression assignmentExpression) [0x00084] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AssignmentMadeToSameVariableIssue.cs:67 
  at ICSharpCode.NRefactory.CSharp.AssignmentExpression.AcceptVisitor (IAstVisitor visitor) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AssignmentExpression.cs:91 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00013] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs:68 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitExpressionStatement (ICSharpCode.NRefactory.CSharp.ExpressionStatement expressionStatement) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:249 
  at ICSharpCode.NRefactory.CSharp.ExpressionStatement.AcceptVisitor (IAstVisitor visitor) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ExpressionStatement.cs:45 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00013] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs:68 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:244 
  at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor (IAstVisitor visitor) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs:129 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00013] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs:68 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitAccessor (ICSharpCode.NRefactory.CSharp.Accessor accessor) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:224 
  at ICSharpCode.NRefactory.CSharp.Accessor.AcceptVisitor (IAstVisitor visitor) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/Accessor.cs:81 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00013] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs:68 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitPropertyDeclaration (ICSharpCode.NRefactory.CSharp.PropertyDeclaration propertyDeclaration) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:219 
  at ICSharpCode.NRefactory.CSharp.PropertyDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs:70 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00013] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs:68 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:134 
  at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs:107 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00013] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs:68 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:129 
  at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs:118 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00013] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs:68 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:49 
  at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor (IAstVisitor visitor) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs:140 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.GetIssues () [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs:60 
  at ICSharpCode.NRefactory.CSharp.Refactoring.AssignmentMadeToSameVariableIssue.GetIssues (ICSharpCode.NRefactory.CSharp.Refactoring.BaseRefactoringContext context) [0x00000] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AssignmentMadeToSameVariableIssue.cs:45 
  at MonoDevelop.CSharp.Refactoring.CodeIssues.NRefactoryIssueProvider+<GetIssues>c__Iterator16.MoveNext () [0x00080] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeIssues/NRefactoryIssueProvider.cs:67 
  at MonoDevelop.CodeIssues.CodeAnalysisRunner+<Check>c__AnonStorey25.<>m__3A (MonoDevelop.CodeIssues.CodeIssueProvider provider) [0x0009f] in /Users/michael/Mono/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs:62
Comment 1 Mike Krüger 2012-09-19 02:30:06 UTC
Fixed that one.

btw. it would be nice if you would've a use case for these bugs - then I can make a unit test out of them. Especially for the code actions/issues I didn't write it would be very helpful to have more tests.

(All actions/issues are tested - but it's almost impossible to test all cases)
Comment 2 Mikayla Hutchinson [MSFT] 2012-09-19 13:27:47 UTC
Unfortunately I don't see the error as it happens, I only see it later in the console, so I have no idea which file it was, or what state the file was in...