microspaze / CarouselView.Maui

CarouselView controls for .NET MAUI
MIT License
47 stars 7 forks source link

In Maui android inside carousel , Button is there, after tapping Button, it is crashing & showing unhandled exception #8

Open Arviksain opened 1 month ago

Arviksain commented 1 month ago

In Maui android inside carousel , Button is there, after tapping Button, it is crashing & showing unhandled exception

microspaze commented 1 month ago

@Arviksain Can you provide a demo project to reproduce this issue?

Arviksain commented 1 month ago

Hi @microspaze Android.Runtime.RuntimeNativeMethods.monodroid_debugger_unhandled_exception (Android.Runtime.RuntimeNativeMethods.monodroid_debugger_unhandled_exception:-1) Android.Runtime.JNINativeWrapper._unhandled_exception (JNINativeWrapper.g.cs:12) Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLI_L (JNINativeWrapper.g.cs:221) Java.Interop.JniPeerMembers.AssertSelf (sources/xamarin/java.interop/3c5cf34b0e3cc9427521530db9aa4b4abe39d20d/src/Java.Interop/Java.Interop/JniPeerMembers.cs:153) Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod (sources/xamarin/java.interop/3c5cf34b0e3cc9427521530db9aa4b4abe39d20d/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:57) Android.Views.ViewGroup.RemoveAllViews (sources/xamarin/xamarin-android/0d97e20b84d8e87c3502469ee395805907905fe3/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.Views.ViewGroup.cs:4164) Microsoft.Maui.Handlers.ContentViewHandler.DisconnectHandler (sources/dotnet/maui/44a1673f7d2da631396ec9820e1d5cf3c29c9b1a/src/Core/src/Handlers/ContentView/ContentViewHandler.Android.cs:54) Microsoft.Maui.Handlers.ViewHandler<Microsoft.Maui.IContentView,Microsoft.Maui.Platform.ContentViewGroup>.OnDisconnectHandler Screenshot_1722585540

Here u can see this is a content of carouselview in maui android. In this content of caraouselview, there is a button, or any listview or whatever button, when tapped on this particular button that time above error is showing the crash, Particular for Android . IOS working fine. even formsplugin also worked in xamarin app. Kindly give me solution

Arviksain commented 1 month ago

Hi @microspaze , Can u please solve this issue?

microspaze commented 1 month ago

https://github.com/user-attachments/assets/6ce916d5-4af2-46fe-a3e9-51477e1aee7e

I‘m really sorry about that I can not reproduce your issue from the log you given. I have tested the button in CarouselView and it works well as the screen record video.

So can you just provide a minimum project that can reproduce your problem and then I will take a deeper look.

Arviksain commented 1 month ago

Hi @microspaze Sure I will share. But this button operation is inside same page, what u have shared. But my case is after tapping button there will be navigation to another page. that time this error came

Arviksain commented 1 month ago

Hi @microspaze , I am using freshmvvm.maui in my project as a navigation panel

microspaze commented 1 month ago

https://github.com/user-attachments/assets/b72f5dc5-4e0d-49c3-bad9-9048977ed543

I tested that it works fine by the shell navigation.


Routing.RegisterRoute("home", typeof(MainPage));
Routing.RegisterRoute("second", typeof(SecondPage));

await Shell.Current.GoToAsync("second");

await Shell.Current.GoToAsync("..");

You'd better give me a test demo to reproduce your issue.