Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I have encountered an exception today in Android 4.2.1 Jellybean, Samsung Galaxy S3, Monodroid 126.96.36.199956787, Windows 8 x64, Visual Studio 2012 Ultimate SP1.
The exception occurs when passing an array of Object variables to AsyncTask.Execute(). I've included a stack trace below for reference. I do not believe that Windows or Visual Studio have any bearing, as the same project deployed to an Android 2.3.5 device (Motorola Electrify) does not exhibit the same issue.
I would be happy to perform any additional troubleshooting and debugging to assist in the resolution of this issue.
Java.Lang.ArrayStoreException: mono.android.runtime.JavaObject cannot be stored in an array of type java.lang.Boolean
0x1 in System.Diagnostics.Debugger.Mono_UnhandledException C#
0x26 in object.8c267011-348f-4fa7-abaa-6c620a187ec5 C#
0x24 in Android.Runtime.JNIEnv.SetObjectArrayElement at /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/6418373f/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1134 C#
0x12 in Android.Runtime.JNIEnv.NewObjectArray<object>.AnonymousMethod__92 at /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/6418373f/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:1106 C#
0x4C in Java.Interop.JavaConvert.WithLocalJniHandle at /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/6418373f/source/monodroid/src/Mono.Android/src/Java.Interop/JavaConvert.cs:295 C#
> 0xE9 in Android.Runtime.JNIEnv.NewObjectArray at /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/6418373f/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:1105 C#
0x2E in Android.OS.AsyncTask<object,int,object>.Execute at /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/6418373f/source/monodroid/src/Mono.Android/src/Android.OS/AsyncTask.cs:69 C#
0x43 in BWEN.Android.Common.BasicBackgrounderManager.RunTask at \\hv-desmoulin\hvfs\Profiles\aifdsc\Documents\Visual Studio 2012\Projects\FAR\Android\Code\Common\Backgrounder.cs:272 C#
I have not been able to replicate if the parameters passed to AsyncTask.Execute are all string values. It appears that a mixture of data types being passed causes this exception.
Stephan, to help us accelerate this, do you have a code snippet that shows what exactly you were doing that caused this?
Please provide a repro, or try a more recent version. (There have been a number of marshaling fixes since 4.4.x.)
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!