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:

http://stackoverflow.com/questions/35052309/xamarin-android-app-crash-system-argumentexceptionjobject-must-not-be-intptr?noredirect=1#comment57839950_35052309

System.ArgumentException'jobject' must not be IntPtr.Zero. Parameter name: jobject
Raw
Android.Runtime.JNIEnv.CallVoidMethod(IntPtr jobject, IntPtr jmethod)
Android.Animation.Animator.Cancel()
Xamarin.Forms.Platform.Android.AndroidTicker.DisableTimer()
Xamarin.Forms.Ticker.Disable()
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.

Posts

Sign In or Register to comment.