Bug 12096 - Error on removing redundant assignment of default value.
Summary: Error on removing redundant assignment of default value.
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 4.0.4
Hardware: PC Mac OS
: Normal normal
Target Milestone: 4.0.9 (from master)
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-05-03 14:10 UTC by Mikayla Hutchinson [MSFT]
Modified: 2013-06-24 16:18 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 NOT_REPRODUCIBLE

Description Mikayla Hutchinson [MSFT] 2013-05-03 14:10:58 UTC
Error on removing redundant assignment of default value.

System.InvalidOperationException: Detected overlapping changes [TextReplaceAction: Offset=5109, RemovalLength=1, NewText=
			]/[TextReplaceAction: Offset=5109, RemovalLength=1, NewText= ]
  at ICSharpCode.NRefactory.CSharp.FormattingChanges.ApplyChanges (Int32 startOffset, Int32 length, System.Action`3 documentReplace, System.Func`4 filter) [0x00082] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingChanges.cs:94 
  at ICSharpCode.NRefactory.CSharp.FormattingChanges.ApplyChanges (Int32 startOffset, Int32 length) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingChanges.cs:62 
  at ICSharpCode.NRefactory.CSharp.Refactoring.DocumentScript.FormatText (IEnumerable`1 nodes) [0x00110] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/DocumentScript.cs:119 
  at ICSharpCode.NRefactory.CSharp.Refactoring.Script.Dispose () [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs:404 
  at ICSharpCode.NRefactory.CSharp.Refactoring.DocumentScript.Dispose () [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/DocumentScript.cs:56 
  at MonoDevelop.CSharp.Refactoring.CodeActions.MDRefactoringScript.DisposeOnClose (Boolean force) [0x00047] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/MDRefactoringScript.cs:251 
  at MonoDevelop.CSharp.Refactoring.CodeActions.MDRefactoringScript.Dispose () [0x00001] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/MDRefactoringScript.cs:257 
  at MonoDevelop.CSharp.Refactoring.CodeActions.NRefactoryCodeAction.Run (MonoDevelop.Ide.Gui.Document document, TextLocation loc) [0x00019] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/NRefactoryCodeAction.cs:54 
  at MonoDevelop.CodeIssues.CodeAnalysisRunner+<Check>c__AnonStorey28+<Check>c__AnonStorey2A+<Check>c__AnonStorey29.<>m__48 () [0x00000] in /Users/michael/Mono/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs:75 
  at MonoDevelop.AnalysisCore.Fixes.GenericFix.Fix () [0x00001] in /Users/michael/Mono/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Fixes/GenericFix.cs:89 
  at MonoDevelop.AnalysisCore.FixOperationsHandler.Run (System.Object dataItem) [0x00024] in /Users/michael/Mono/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/AnalysisCommands.cs:105 
  at MonoDevelop.Components.Commands.CommandHandler.InternalRun (System.Object dataItem) [0x00001] in /Users/michael/Mono/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) [0x00085] in /Users/michael/Mono/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) [0x002e1] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1075
Comment 1 Mike Krüger 2013-05-10 02:22:38 UTC
Can you give me an example - this works for me.
Comment 2 Mikayla Hutchinson [MSFT] 2013-05-10 14:26:22 UTC
It was a one-off, I don't have a repro. I was filing in case the trace was enough to fix it.
Comment 3 Mike Krüger 2013-05-17 06:39:02 UTC
The problem is that I've done many changes in the formatting routines in nrefactory ... therfore I can't fix it with the trace atm :/. Reopen if it happens again.
Comment 4 PJ 2013-06-24 16:18:53 UTC
This bug was marked as fixed for Xamarin Studio 4.0.9, which is currently in the beta channel. Try it out!