Bug 33129 - Adding a button to storyboard in VS Designer with a space in the name will cause crash
Summary: Adding a button to storyboard in VS Designer with a space in the name will ca...
Status: RESOLVED DUPLICATE of bug 20963
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 4.0.0 (C6)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-08-14 19:32 UTC by Glenn Wester
Modified: 2015-08-15 12:27 UTC (History)
7 users (show)

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


Attachments
Crash text of the thrown exception in the designer (5.57 MB, text/plain)
2015-08-14 19:32 UTC, Glenn Wester
Details
Photo of Crash text of the thrown exception in the designer (208.63 KB, image/jpeg)
2015-08-14 19:34 UTC, Glenn Wester
Details


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 DUPLICATE of bug 20963

Description Glenn Wester 2015-08-14 19:32:31 UTC
Created attachment 12520 [details]
Crash text of the thrown exception in the designer

If you create a button in an iOS Application in the Visual Studio Designer and name it something that contains a space the designer will crash with "System.ArgumentOutOfRangeException: Value must be between 1 and 48".

Steps to Reproduce:

0) Create a iOS Single View app in Visual Studio
1) Drag a button onto a StoryBoard
2) Name it something with a space, for example "my button"

I've attached the full crash text dump in crash.txt


System.ArgumentOutOfRangeException: Value must be between 1 and 48
Parameter name: line
Actual value was 2147483647.
   at ICSharpCode.NRefactory.Editor.ReadOnlyDocument.GetOffset(Int32 line, Int32 column)
   at ICSharpCode.NRefactory.Editor.ReadOnlyDocument.GetOffset(TextLocation location)
   at ICSharpCode.NRefactory.Editor.StringBuilderDocument.GetOffset(TextLocation location)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.AdjustNewLineBlock(AstNode startNode, Int32 targetMinimumNewLineCount)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.EnsureMinimumNewLinesAfter(AstNode node, Int32 blankLines)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.<>c__DisplayClass16.<VisitTypeDeclaration>b__15(AstNode child)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitChildrenToFormat(AstNode parent, Action`1 callback)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitTypeDeclaration(TypeDeclaration typeDeclaration)
   at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.<>c__DisplayClass13.<VisitNamespaceDeclaration>b__12(AstNode child)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitChildrenToFormat(AstNode parent, Action`1 callback)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration)
   at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.<>c__DisplayClassf.<VisitSyntaxTree>b__e(AstNode child)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitChildrenToFormat(AstNode parent, Action`1 callback)
   at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitSyntaxTree(SyntaxTree unit)
   at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.CSharpFormatter.AnalyzeFormatting(IDocument document, SyntaxTree syntaxTree, CancellationToken token)
   at ICSharpCode.NRefactory.CSharp.CSharpFormatter.InternalFormat(IDocument document)
   at ICSharpCode.NRefactory.CSharp.CSharpFormatter.Format(String text)
   at MonoTouch.Design.Client.SimpleTypeInfo.FormatFile(SyntaxTree file)
   at MonoTouch.Design.Client.SimpleTypeInfo.GenerateDesignerFile(IEnumerable`1 actionsEnumerable, IEnumerable`1 outletsEnumerable)
   at MonoTouch.Design.Client.SimpleTypeInfo.UpdateType(IEnumerable`1 actions, IEnumerable`1 outlets)
   at MonoTouch.Design.Client.IPhoneDesignerSession.SynchronizeOutlets()
   at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass14.<ReloadItems>b__f(Task`1 t)

Version info:
Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00079

Installed Version: Professional

Visual Basic 2015   00322-40000-00000-AA639
Microsoft Visual Basic 2015

Visual C# 2015   00322-40000-00000-AA639
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA639
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-40000-00000-AA639
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   14.0.20626.0
ASP.NET and Web Tools

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.50616.0
Microsoft SQL Server Data Tools

Visual Studio Tools for Universal Windows Apps   14.0.23121.00 D14OOB
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.0.0.865 (c5fdf77)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.99.486 (d77313a)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.13.0.39 (66a0544)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Glenn Wester 2015-08-14 19:34:00 UTC
Created attachment 12521 [details]
Photo of Crash text of the thrown exception in the designer
Comment 2 Alex Corrado [MSFT] 2015-08-15 12:27:42 UTC

*** This bug has been marked as a duplicate of bug 20963 ***