-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][Android] Crash when CarouselView is nested in a ScrollView, inside a TabViewItem (XCT) #592
Comments
Maybe it's related to this xamarin/XamarinCommunityToolkit#1104 ? |
Hi, I actually got the issue from an endless recursive loop in the CarouselViewImplementation. Indeed, the method
as it is not able to find the MainActivity :/ Do you think you could have a look at it please @alexrainman ? |
Here are some logs in case that helps a little bit: Console logs for a working Carousel controller
Console logs for crashing Carousel controller
|
Actually @alexrainman , I think it is because the same object is passed through the recursive call. Indeed, _context.BaseContext is always passed, so if MainActivity is not found during the first recursive call, then it will trigger an endless loop. |
Hello @alexrainman , sorry to spam you, but I think I have fixed my issue by replacing CarouselView/CarouselView/CarouselView.FormsPlugin.Android/CarouselViewImplementation.cs Line 82 in eda4fd3
with
But I'm only able to validate the fix by running your demo project... Could you please help me to understand how to directly refer your source code into my repro project ? |
Isn't |
Description
Hello @alexrainman , I have been using your component for a few months, after I've got rid off the official CarouselView (so many events issues...) and I have to say : thank you very much for your great library !
But the thing is I am now using the Xamarin.CommunityToolkit (XCT) library so that I can navigate to my pages with bottom tabs. And my app is getting crashed every time I try to display your CarouselView inside a ScrollView.
I am actually having a java.lang.StackOverflowError :
Expand Stacktrace
I have tried to catch the error by debugging both Xamarin.CommunityToolkit and your CarouselView library, but I was only getting a crash without having being able to get a hint...
Also, I can see a related issue #560 which seems to be fixed in 6.0.0.
Then I may think that your fix works if the content is loaded in a ContentPage, but maybe not in a ContentView ?
Steps to Reproduce
Basic Information
Workaround
Reproduction Link
CarouselView_Stackoverflow.zip
The text was updated successfully, but these errors were encountered: