Bug 60226 - ArgumentOutOfRangeExcepton when calling Remove() and RemoveAt() on RootElement (MT.D)
Summary: ArgumentOutOfRangeExcepton when calling Remove() and RemoveAt() on RootElemen...
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: MonoTouch.Dialog ()
Version: XI 11.2 (d15-4)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-10-17 10:34 UTC by Joseph Hanna
Modified: 2017-11-21 23:34 UTC (History)
3 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 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 NORESPONSE

Description Joseph Hanna 2017-10-17 10:34:40 UTC
In a custom DialogViewController, my unmodified code recently (after upgrading VS for Mac on the Stable channel) started raising exceptions when the Remove or RemoveAt method is called on a RootElement.  The parameter object/index is valid and this code has been in production for at least 3 years.

The following lines both raise the exception:

      this.Root.Remove (imageManagerSection);

      this.Root.RemoveAt (1);



My environment:

=== Visual Studio Professional 2017 for Mac ===

Version 7.2 (build 636)
Installation UUID: 4624b815-785f-450a-9ac2-ec0385a81247
Runtime:
	Mono 5.4.0.201 (2017-06/71277e78f6e) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504000201

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 1.0.0
SDK: /usr/local/share/dotnet/sdk/1.0.0-preview2-003121/Sdks
SDK Version: 1.0.0-preview2-003121
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.iOS ===

Version: 11.2.0.11 (Visual Studio Professional)
Hash: 2f8bbec0
Branch: d15-4-xi
Build date: 2017-10-05 20:56:05-0400

=== Xamarin.Android ===

Version: 8.0.0.33 (Visual Studio Professional)
Android SDK: /Users/joe/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)
		7.0   (API level 24)
		7.1   (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.6
SDK Build Tools Version: 24.0.1

Java SDK: /usr
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Xamarin.Mac ===

Version: 3.8.0.49 (Visual Studio Professional)

=== Build Information ===

Release ID: 702000636
Git revision: b349c8fc0c2e1aab0179917d56eed75eb3a03337
Build date: 2017-10-06 15:20:04-04
Xamarin addins: a8da992c78f7eb65b3cdb3f951c34a30337cab35
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.13.0
Darwin 17.0.0 Darwin Kernel Version 17.0.0
    Thu Aug 24 21:48:19 PDT 2017
    root:xnu-4570.1.46~2/RELEASE_X86_64 x86_64
Comment 2 John Miller [MSFT] 2017-10-18 18:23:54 UTC
Hi Joseph,

I'm unable to reproduce this using the Same-Unified app from the repository for MonoTouch.Dialog. It does call RemoveAt on a RootElement and it's working OK. 

Can you provide me a sample project that reproduces this issue? Also, if you can share the full stack trace of the exception that might help too. 

You can zip and attach those to the bug report. 

Thanks!
Comment 3 Alex Soto [MSFT] 2017-11-21 23:34:23 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!