Bug 61001 - iOS app crashes occasionally with System.ArgumentOutOfRangeException since Xamarin.Forms 2.5
Summary: iOS app crashes occasionally with System.ArgumentOutOfRangeException since Xa...
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.5.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-12-06 12:15 UTC by schmidt
Modified: 2017-12-06 13:08 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 ANSWERED

Description schmidt 2017-12-06 12:15:13 UTC
# Steps to reproduce
Not found yet.

# Expected behavior
No crashes.

# Actual behavior
My iOS app occasionally crashes with System.ArgumentOutOfRangeException since the update from Xamarin.Forms 2.4 to 2.5.

# Supplemental info (logs, images, videos)
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00018] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.4.0.214/src/mono/mcs/class/referencesource/mscorlib/system/throwhelper.cs:93 
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.4.0.214/src/mono/mcs/class/referencesource/mscorlib/system/throwhelper.cs:56 
  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <1f5960abbfdf4434802d3b8a03ded4fa>:0 
  at System.Collections.ObjectModel.Collection`1[T].get_Item (System.Int32 index) [0x00000] in <1f5960abbfdf4434802d3b8a03ded4fa>:0 
  at System.Collections.ObjectModel.ReadOnlyCollection`1[T].get_Item (System.Int32 index) [0x00000] in <1f5960abbfdf4434802d3b8a03ded4fa>:0 
  at Xamarin.Forms.Platform.iOS.RendererPool.UpdateRenderers (Xamarin.Forms.Element newElement) [0x0004e] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:150 
  at Xamarin.Forms.Platform.iOS.RendererPool.UpdateNewElement (Xamarin.Forms.VisualElement newElement) [0x00080] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:78 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00050] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:161 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnRendererElementChanged (System.Object sender, Xamarin.Forms.Platform.iOS.VisualElementChangedEventArgs args) [0x0000f] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:144 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x0002c] in <f321195339234cc7a2f7f1d5fa08167d>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00118] in <f321195339234cc7a2f7f1d5fa08167d>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <f321195339234cc7a2f7f1d5fa08167d>:0 
  at Xamarin.Forms.Platform.iOS.RendererPool.UpdateRenderers (Xamarin.Forms.Element newElement) [0x0008c] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:157 
  at Xamarin.Forms.Platform.iOS.RendererPool.UpdateNewElement (Xamarin.Forms.VisualElement newElement) [0x00080] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:78 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00050] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:161 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnRendererElementChanged (System.Object sender, Xamarin.Forms.Platform.iOS.VisualElementChangedEventArgs args) [0x0000f] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:144 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x0002c] in <f321195339234cc7a2f7f1d5fa08167d>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00118] in <f321195339234cc7a2f7f1d5fa08167d>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <f321195339234cc7a2f7f1d5fa08167d>:0 
  at Xamarin.Forms.Platform.iOS.RendererPool.UpdateRenderers (Xamarin.Forms.Element newElement) [0x0008c] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:157 
  at Xamarin.Forms.Platform.iOS.RendererPool.UpdateNewElement (Xamarin.Forms.VisualElement newElement) [0x00080] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\RendererPool.cs:78 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00050] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:161 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnRendererElementChanged (System.Object sender, Xamarin.Forms.Platform.iOS.VisualElementChangedEventArgs args) [0x0000f] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:144 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x0002c] in <f321195339234cc7a2f7f1d5fa08167d>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00118] in <f321195339234cc7a2f7f1d5fa08167d>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <f321195339234cc7a2f7f1d5fa08167d>:0 
  at Xamarin.Forms.Platform.iOS.ViewCellRenderer+ViewTableCell.UpdateCell (Xamarin.Forms.ViewCell cell) [0x000d9] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\Cells\ViewCellRenderer.cs:173 
  at Xamarin.Forms.Platform.iOS.ViewCellRenderer+ViewTableCell.set_ViewCell (Xamarin.Forms.ViewCell value) [0x0000a] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\Cells\ViewCellRenderer.cs:68 
  at Xamarin.Forms.Platform.iOS.ViewCellRenderer.GetCell (Xamarin.Forms.Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) [0x0004d] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\Cells\ViewCellRenderer.cs:22 
  at Xamarin.Forms.Platform.iOS.CellTableViewCell.GetNativeCell (UIKit.UITableView tableView, Xamarin.Forms.Cell cell, System.Boolean recycleCells, System.String templateId) [0x00081] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\Cells\CellTableViewCell.cs:72 
  at Xamarin.Forms.Platform.iOS.ListViewRenderer+ListViewDataSource.GetCell (UIKit.UITableView tableView, Foundation.NSIndexPath indexPath) [0x00017] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\Renderers\ListViewRenderer.cs:863 
  at (wrapper managed-to-native) ObjCRuntime.Messaging:void_objc_msgSend_IntPtr_Int64 (intptr,intptr,intptr,long)
  at UIKit.UITableView.ReloadRows (Foundation.NSIndexPath[] atIndexPaths, UIKit.UITableViewRowAnimation withRowAnimation) [0x00033] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/build/ios/native/UIKit/UITableView.g.cs:809 
  at Xamarin.Forms.Platform.iOS.CellRenderer+<>c__DisplayClass5_0.<WireUpForceUpdateSizeRequested>b__0 (System.Object sender, System.EventArgs e) [0x00032] in D:\agent\_work\1\s\Xamarin.Forms.Platform.iOS\Cells\CellRenderer.cs:60 
  at (wrapper delegate-invoke) <Module>:invoke_void_object_EventArgs (object,System.EventArgs)
  at Xamarin.Forms.Cell+<OnForceUpdateSizeRequested>d__39.MoveNext () [0x00086] in D:\agent\_work\1\s\Xamarin.Forms.Core\Cells\Cell.cs:189 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.4.0.214/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.4.0.214/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
  at UIKit.UIKitSynchronizationContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/UIKit/UIKitSynchronizationContext.cs:24 
  at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/Foundation/NSAction.cs:163 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/UIKit/UIApplication.cs:63 
  at WasteXApp.iOS.Application.Main (System.String[] args) [0x00001] in C:\Apps\WasteXApp\WasteXApp\APM\WasteXApp.iOS\Main.cs:17

# Test environment (full version information)
Microsoft Visual Studio Community 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.02046

Installierte Version: Community

Visual Basic 2015   00322-20000-00000-AA978
Microsoft Visual Basic 2015

Visual C# 2015   00322-20000-00000-AA978
Microsoft Visual C# 2015

Visual C++ 2015   00322-20000-00000-AA978
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - DEU   00322-20000-00000-AA978
Windows Phone SDK 8.0 - DEU

Allgemeine Azure-Tools   1.8
Bietet allgemeine Dienste für die Verwendung durch Azure Mobile Services und Microsoft Azure-Tools.

Application Insights-Tools für Visual Studio-Paket   7.18.00214.2
Application Insights-Tools für Visual Studio

ASP.NET and Web Tools 2015.1   14.1.21111.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

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

Azure App Service Tools v2.8.1   14.0.11123.0
Azure App Service Tools v2.8.1

JavaScript-Sprachdienst   2.0
JavaScript-Sprachdienst

JavaScript Project System   2.0
JavaScript Project System

JetBrains ReSharper Ultimate 2017.2.2    Build 109.0.20171006.122324
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft .NET Core Tools (Preview 2)   14.1.21111.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Mono Debugging for Visual Studio   4.8.4-pre (3fe64e3)
Support for debugging Mono processes with Visual Studio.

MySQL for Visual Studio   1.2.6
Data design and management tools for MySQL.  Copyright © 2007-2015 Oracle, Inc.

NuGet-Paket-Manager   3.5.0
NuGet-Paket-Manager in Visual Studio. Weitere Informationen zu NuGet finden Sie unter "http://docs.nuget.org/".

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio-Erweiterung zur Visualisierung aggregierter Zusammenfassungen vom PreEmptive Analytics-Produkt.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript   1.8.36.0
TypeScript-Tools für Visual Studio

Visual Studio Tools für Universelle Windows-Apps   14.0.25527.01
Mit den Visual Studio Tools für Universelle Windows-Apps können Sie eine universelle App-Erfahrung erstellen, die auf jedem Gerät genutzt werden kann, das Windows 10 ausführt: Smartphone, Tablet, PC und viele weitere Geräte. Das Microsoft Windows 10 SDK ist in den Tools enthalten.

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Xamarin   4.8.0.752 (4a1f0ea)
Visual Studio-Erweiterung, um Entwicklung für Xamarin.iOS und Xamarin.Android zu ermöglichen.

Xamarin Designer   4.8.182 (76aa1723e)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android   8.1.0.13 (f241f51)
Visual Studio-Erweiterung zur Unterstützung von Entwicklung für Xamarin.Android.

Xamarin.Android SDK   8.1.0.23 (HEAD/f65f87747)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS   11.4.0.214 (c4240f3)
Visual Studio-Erweiterung, um Entwicklung für Xamarin.iOS zu ermöglichen.

Xamarin.iOS and Xamarin.Mac SDK   11.4.0.214 (c4240f3)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 1 Samantha Houts [MSFT] 2017-12-06 13:08:35 UTC
Thank you for your submission. At this time, all new reports should be made on the Xamarin.Forms GitHub Issues repository. Please resubmit this report at https://github.com/xamarin/Xamarin.Forms/issues. This Bugzilla report will now be closed and will not be monitored.