Bug 4321 - IndexOutOfRangeException in various context action providers
Summary: IndexOutOfRangeException in various context action providers
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-04-06 19:14 UTC by Csaba Halász
Modified: 2012-04-07 03:22 UTC (History)
1 user (show)

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

full output (60.86 KB, text/plain)
2012-04-06 19:14 UTC, Csaba Halász

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:

Description Csaba Halász 2012-04-06 19:14:26 UTC
Created attachment 1628 [details]
full output

Git revision 93fa2ebf.
Got a bunch of exceptions of this pattern:

ERROR [2012-04-07 00:51:38Z]: Error in context action provider Move type to another file
System.IndexOutOfRangeException: Array index is out of range.
  at Mono.TextEditor.GapBuffer.GetCharAt (Int32 offset) [0x00000] in monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/GapBuffer.cs:83
  at Mono.TextEditor.TextDocument.GetCharAt (DocumentLocation location) [0x00000] in monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs:316
  at Mono.TextEditor.TextEditorData.GetCharAt (DocumentLocation location) [0x00000] in monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorData.cs:1171
  at MonoDevelop.CSharp.Refactoring.CodeActions.MDRefactoringContext..ctor (MonoDevelop.Ide.Gui.Document document, TextLocation loc, CancellationToken cancellationToken) [0x00025] in monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/MDRefactoringContext.cs:176
  at MonoDevelop.CSharp.Refactoring.CodeActions.MoveTypeToFile.GetActions (MonoDevelop.Ide.Gui.Document document, TextLocation loc, CancellationToken cancellationToken) [0x00000] in monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/Actions/MoveTypeToFile.cs:47
  at MonoDevelop.Refactoring.RefactoringService+<GetValidActions>c__AnonStorey27.<>m__39 () [0x0007f] in monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoringService.cs:201

It's repeated for multiple (all?) providers. See attachment for complete output.
Comment 1 Mike Krüger 2012-04-07 03:22:56 UTC