Bug 34076 - Android.Runtime.JavaCollection<T>.CopyTo in Mono.Android.dll lacking null check
Summary: Android.Runtime.JavaCollection<T>.CopyTo in Mono.Android.dll lacking null check
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: High normal
Target Milestone: C6SR1
Assignee: Jonathan Pryor
Depends on:
Reported: 2015-09-18 17:28 UTC by Nat Friedman
Modified: 2015-11-23 05:38 UTC (History)
3 users (show)

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


Description Nat Friedman 2015-09-18 17:28:23 UTC
## Overview

Customer reports that the implementation of Android.Runtime.JavaCollection<T>.CopyTo is lacking a IntPtr.Zero check on JavaCollection.id_toArray. 

## Description

Using the Xamarin Studio assembly browser, the code for this method seems to be:


Indeed, there is no IntPtr.Zero check.

The customer states that they work around this by manually iterating over the collection, as GetEnumerator() does not contain the same bug. 

## Versions

The customer's Xamarin.Android version is Xamarin.Android (5f55a9ef61c11b6ce0890bc91e4c71b1b92be214)

The full version info is here: https://gist.github.com/natfriedman/2f271f70aeb4a739e0d9
Comment 2 Jonathan Pryor 2015-09-21 16:44:37 UTC
Fixed in monodroid/57822ef0.
Comment 3 David Schwegler 2015-09-21 17:08:58 UTC
Thanks Jon. Where do I check what release that will be in?
Comment 4 Jonathan Pryor 2015-09-22 15:26:30 UTC
> Where do I check what release that will be in?

Release notes. Or the Target Milestone (which wasn't previously set), though that's frequently only a guideline (e.g. if a "new" "hotfoot" release is inserted before the "expected" C6SR1, that will "push down" the expected release numbers, so at best Target Milestone is only a guideline.)
Comment 5 Abhishek 2015-11-23 05:38:16 UTC
I have checked this issue with the latest master build both on Mac and Windows:
Now this issue is working fine. 

screencast for Mac XS: http://www.screencast.com/t/KgqQVPznh
Screencast for Windows XS: http://www.screencast.com/t/AxfLl7vaXu

Hence closing the issue.


Note You need to log in before you can comment on or make changes to this bug.