RadekVyM / SimpleToolkit

SimpleToolkit is a .NET MAUI library of helpers and simple, fully customizable controls, such as SimpleShell - custom Shell implementation that allows you to create unique navigation experiences.
MIT License
425 stars 41 forks source link

Java.Lang.NullPointerException: Attempt to invoke virtual method 'void android.view.animation.Animation.setStartTime(long)' on a null object reference #49

Closed andersonvieiragomeslopes closed 3 months ago

andersonvieiragomeslopes commented 3 months ago
`Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod(JniObjectReference , JniObjectReference , JniMethodInfo , JniArgumentValue* )
Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod(String , IJavaPeerable , JniArgumentValue* )
Android.Views.View.StartAnimation(Animation )
SimpleToolkit.SimpleShell.NavigationManager.PlatformSimpleStackNavigationManager.NavigateWithPlatformTransitionToPageInContainer(SimpleShell shell, IView previousShellItemContainer, IView previousShellSectionContainer, IView previousPage, Boolean isPreviousPageRoot, Func`2 pageTransition, Func`1 args, Boolean animated)
SimpleToolkit.SimpleShell.NavigationManager.PlatformSimpleStackNavigationManager.NavigateToPage(SimpleShellTransitionType transitionType, PresentationMode presentationMode, ArgsNavigationRequest args, SimpleShell shell, IReadOnlyList`1 newPageStack, IView previousShellItemContainer, IView previousShellSectionContainer, IView previousPage, Boolean isPreviousPageRoot)
System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
Android.App.SyncContext.<>c__DisplayClass2_0.<Post>b__0()
Java.Lang.Thread.RunnableImplementor.Run()
Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this)
Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz)
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.animation.Animation.setStartTime(long)' on a null object reference
android.view.View.startAnimation View.java:28856
mono.java.lang.RunnableImplementor.n_run(Native Method)
mono.java.lang.RunnableImplementor.run RunnableImplementor.java:31
android.os.Handler.handleCallback Handler.java:958
android.os.Handler.dispatchMessage Handler.java:99
android.os.Looper.loopOnce Looper.java:230
android.os.Looper.loop Looper.java:319
android.app.ActivityThread.main ActivityThread.java:8893
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:608
com.android.internal.os.ZygoteInit.main ZygoteInit.java:1103`

SimpleToolkit.SimpleShell Version 4.1.3 or 5.0.0 SimpleToolkit.Core Version 4.0.0 or 5.0.0 Microsoft.Maui.Controls 8.0.60 Microsoft.Maui.Controls.Compatibility 8.0.60 .net maui 8.0.60 SR6 (8.0.6)

This problem appeared when I updated Visual Studio Preview for version 17.11.0 When I browse the application using the tabbar occurs a mysterious, inexplicated crash. I'm still investigating, but it seems to have something to do with this plugin.

RadekVyM commented 3 months ago

Hi @andersonvieiragomeslopes,

could you please create a public repository (or private and invite me) with a reproduction sample and share the link?

andersonvieiragomeslopes commented 3 months ago

It won't be necessary, I found the enemy (FFImageLoading.Maui) lol I built a new example so that the problem doesn't occur, but when adding this plugin for images the problem started to happen too, thank you @RadekVyM.