Forum Xamarin.Forms


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

System.ArgumentException'jobject' must not be IntPtr.Zero. Parameter name: jobject Raw issue

I see the following causing a random app crash in our Android project. The same shared code works well on iOS without any issues.
Seems to have something to do with GC from what i was told in the discussions on Stack Overflow:

System.ArgumentException'jobject' must not be IntPtr.Zero. Parameter name: jobject
Android.Runtime.JNIEnv.CallVoidMethod(IntPtr jobject, IntPtr jmethod)
Xamarin.Forms.Ticker.SendSignals(int timestep)
at Xamarin.Forms.Platform.Android.AndroidTicker.<.ctor>b__0 (System.Object sender, Android.Animation.AnimatorUpdateEventArgs e) <0xdadcdc00 + 0x0001f> in :0
Android.Animation.ValueAnimator.IAnimatorUpdateListenerImplementor.OnAnimationUpdate(ValueAnimator animation)
Android.Animation.ValueAnimator.IAnimatorUpdateListenerInvoker.n_OnAnimationUpdate_Landroid_animation_ValueAnimator_(IntPtr jnienv, IntPtr native__this, IntPtr native_animation)
at (wrapper dynamic-method) System.Object:44ce42ed-fb72-4165-90ce-aacb2d5abb31 (intptr,intptr,intptr)

This seems like a well known issue on Android. BTW I upgraded to the latest Xam forms. But even that has not fixed this issue.


Sign In or Register to comment.