Bug 13741 - Intent.PutStringArrayListExtra
Summary: Intent.PutStringArrayListExtra
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.8.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2013-08-05 00:00 UTC by Aleksandr Medvedev
Modified: 2013-08-16 10:00 UTC (History)
1 user (show)

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:

Description Aleksandr Medvedev 2013-08-05 00:00:13 UTC
The following code fails with System.NullPointerException:

var list = new List<string>();
new Intent().PutStringArrayListExtra("_",list);

System.NullReferenceException: Object reference not set to an instance of an object
  at Java.Interop.JavaConvert.<LocalJniHandleConverters>m__A3 (object) [0x00000] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/src/Java.Interop/JavaConvert.cs:266
  at Java.Interop.JavaConvert.WithLocalJniHandle<string, bool> (string,System.Func`2<intptr, bool>) [0x0003d] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/src/Java.Interop/JavaConvert.cs:294
  at at Android.Runtime.JavaList`1<string>.Add (string) <0x0018b>
  at at Android.Runtime.JavaList`1<string>..ctor (System.Collections.Generic.IEnumerable`1<string>) <0x001c3>
  at at Android.Runtime.JavaList`1<string>.ToLocalJniHandle (System.Collections.Generic.IList`1<string>) <0x0015b>
  at Android.Content.Intent.PutStringArrayListExtra (string,System.Collections.Generic.IList`1<string>) [0x00034] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/platforms/android-8/src/generated/Android.Content.Intent.cs:3967
  at PutStringArrayListExtraBugProof.MainActivity.OnCreate (Android.OS.Bundle) [0x00069] in /Users/q/Projects/PutStringArrayListExtraBugProof/PutStringArrayListExtraBugProof/MainActivity.cs:29
  at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00010] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/platforms/android-8/src/generated/Android.App.Activity.cs:1561
  at at (wrapper dynamic-method) object.225eab0e-c6e7-4d14-88c5-f2889f08fcb0 (intptr,intptr,intptr) <IL 0x00017, 0x00043>
Comment 1 Jonathan Pryor 2013-08-16 10:00:54 UTC
Fixed in monodroid/b2d61091.