Bug 12588 - System.NullReferenceException: Object reference not set to an instance of an object during Rename
Summary: System.NullReferenceException: Object reference not set to an instance of an ...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-06-07 04:42 UTC by Marek Safar
Modified: 2014-01-24 08:32 UTC (History)
2 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:
VERIFIED FIXED

Description Marek Safar 2013-06-07 04:42:42 UTC
class TestC {
	void test1() {
		var s = "Nice";
		switch (s) {
		case "HI":
			const string x = "Nice"; // Try to Refactor->Rename x
			break;
		case x:
			break;
		}
	}
}



System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.Refactoring.Rename.RenameRefactoring.Run (MonoDevelop.Refactoring.RefactoringOptions options) [0x00022] in /Users/builder/data/lanes/monodevelop-lion-master/15c1606c/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameRefactoring.cs:189 
  at MonoDevelop.Refactoring.Rename.RenameHandler.Run (MonoDevelop.Refactoring.RefactoringOptions options) [0x00012] in /Users/builder/data/lanes/monodevelop-lion-master/15c1606c/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameHandler.cs:48 
  at MonoDevelop.Refactoring.AbstractRefactoringCommandHandler.Run (System.Object data) [0x0000d] in /Users/builder/data/lanes/monodevelop-lion-master/15c1606c/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/AbstractRefactoringCommandHandler.cs:87 
  at MonoDevelop.Refactoring.AbstractRefactoringCommandHandler.Start (System.Object data) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-master/15c1606c/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/AbstractRefactoringCommandHandler.cs:53 
  at MonoDevelop.Refactoring.CurrentRefactoryOperationsHandler.<Update>m__18 () [0x00000] in /Users/builder/data/lanes/monodevelop-lion-master/15c1606c/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs:260 
  at MonoDevelop.Refactoring.CurrentRefactoryOperationsHandler.Run (System.Object data) [0x0000d] in /Users/builder/data/lanes/monodevelop-lion-master/15c1606c/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs:75 
  at MonoDevelop.Components.Commands.CommandHandler.InternalRun (System.Object dataItem) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-master/15c1606c/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandHandler.cs:42 
  at MonoDevelop.Components.Commands.CommandManager.DefaultDispatchCommand (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info, System.Object dataItem, System.Object target, CommandSource source) [0x00076] in /Users/builder/data/lanes/monodevelop-lion-master/15c1606c/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1108 
  at MonoDevelop.Components.Commands.CommandManager.DispatchCommand (System.Object commandId, System.Object dataItem, System.Object initialTarget, CommandSource source) [0x002de] in /Users/builder/data/lanes/monodevelop-lion-master/15c1606c/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1075
Comment 1 Mike Krüger 2013-06-07 06:27:39 UTC
fixed
Comment 2 Atin 2014-01-24 08:32:09 UTC
Today, we have checked this issue with:

XS 4.2.3(build 154)- 4dca4a28d7ecc2c4df8a4d58e74b8902d0283b53
Xamarin addins: cc120a6f639fa6649aa4d23a0f0e7c5701134047

Now this issue is not exist, we are successfully able to 'Refactor->Rename x' in above mentioned code.

Screencast: http://www.screencast.com/t/OnbPbnye

Hence marking this as Verified.