Bug 43958 - Crash with back-indent on a new buffer
Summary: Crash with back-indent on a new buffer
Status: RESOLVED FIXED
Alias: None
Product: Workbooks & Inspector
Classification: Xamarin
Component: Client: Mac ()
Version: master
Hardware: PC Mac OS
: Normal major
Target Milestone: ---
Assignee: xamarininteractive
URL:
Depends on:
Blocks:
 
Reported: 2016-09-01 22:04 UTC by Jérémie Laval
Modified: 2017-01-13 17:24 UTC (History)
5 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 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 Jérémie Laval 2016-09-01 22:04:16 UTC
http://screencast.com/t/w8FrYvds

[Critical][00:00:25.7507290] AppDomain: unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at Xamarin.Interactive.Workbook.WorkbookBuffer+WorkbookBufferSourceText.get_Item (System.Int32 index) [0x00000] in <filename unknown>:0 
  at Microsoft.CodeAnalysis.CSharp.Completion.Providers.CompletionUtilities.IsTriggerCharacter (Microsoft.CodeAnalysis.Text.SourceText text, System.Int32 characterPosition, Microsoft.CodeAnalysis.Options.OptionSet options) [0x00000] in <filename unknown>:0 
  at Microsoft.CodeAnalysis.CSharp.Completion.Providers.AttributeNamedParameterCompletionProvider.IsTriggerCharacter (Microsoft.CodeAnalysis.Text.SourceText text, System.Int32 characterPosition, Microsoft.CodeAnalysis.Options.OptionSet options) [0x00000] in <filename unknown>:0 
  at Microsoft.CodeAnalysis.Completion.AbstractCompletionService+<>c__DisplayClass17_0.<IsTriggerCharacter>b__0 (Microsoft.CodeAnalysis.Completion.CompletionListProvider p) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00035] in <filename unknown>:0 
  at Microsoft.CodeAnalysis.Completion.AbstractCompletionService.IsTriggerCharacter (Microsoft.CodeAnalysis.Text.SourceText text, System.Int32 characterPosition, System.Collections.Generic.IEnumerable`1[T] completionProviders, Microsoft.CodeAnalysis.Options.OptionSet options) [0x00043] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
Comment 1 Sandy Armstrong [MSFT] 2016-09-01 22:12:35 UTC
Is this 0.10.0?
Comment 2 Arpit Jha 2016-10-12 08:27:10 UTC
I have checked this issue with Workbook 0.10.0.627 and unable to reproduce this issue at my end.

On the basis of screencast posted in bug description I tried the same but workbooks does not crashed in my case.

#Steps that I have tried to reproduce:
1. Launch Xamarin Workbooks.
2. Create a Workbooks iOS application.
3. Write  following code in C# cell.

   using CoreAnimation; 

4. Create a new C# cell using “+” icon.
5. Copy code snippet form gist and paste to c# cell.
 https://gist.github.com/Arpit360/f6f914a72edbc9e47f3e32395f708824

6.  Cut code snippet using ( Command + X )from C# cell and create a new C# cell above to the cell and paste the clipboard code snippet using (Command + V).

In my case Workbooks does not crashed.

@Jeremie, Could you please checked this issue with latest workbooks and let me know the behaviour.

Please let me know If I am missing anything to reproduce this issue.

Supplement Info:
Screencast : http://www.screencast.com/t/a3De4hvphKir
Workbook version: 0.10.0.627
Comment 4 Aaron Bockover [MSFT] 2017-01-13 17:24:54 UTC
This was likely fixed/made irrelevant from the switch to Monaco. Please reopen if this is still an issue.