Xamarin Android App crash: System.ArgumentException'jobject 'should not be IntPtr.Zero. Random app crash

Hi, we are currently developing a cross-platform application using Xamarin forms with a PCL project.

Or the application works like a gem on iOS. However, on android, we seem to encounter this unpredictable random crash. Watching the xamarin info, this is the stack trace I got:

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) <0xd6bdc460 + 0x0001f> in <filename unknown>: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:58d57b72-260d-44c0-954f-016b48334d23 (intptr,intptr,intptr)

I found similar entries in a stack overflow. Looking for everyone who encountered and fixed this problem.

In addition, we hesitate to update our Xamarin forms, as this seems to create more errors than solving problems.

+4
source share

Source: https://habr.com/ru/post/1626289/


All Articles