Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] - XF 5 CarouselView PeekAreaInsets crashing #14311

Open
Pandu-V opened this issue May 31, 2021 · 11 comments
Open

[Bug] - XF 5 CarouselView PeekAreaInsets crashing #14311

Pandu-V opened this issue May 31, 2021 · 11 comments
Labels
a/carouselview s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/unverified New report that has yet to be verified t/bug 🐛
Projects

Comments

@Pandu-V
Copy link

Pandu-V commented May 31, 2021

Description

Steps to Reproduce

  1. We are using CarouselView with PeekAreaInsets
  2. When we remove PeekAreaInsets there is no crash, but we add PeekAreaInsets with any thickness its getting crashed
    .

Expected Behavior

CarouselView with PeekAreaInsets should work

Actual Behavior

Crashing while using PeekAreaInsets in CarouselView

Basic Information

  • Version with issue:
  • Last known good version:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library / AndroidX Version:
  • NuGet Packages:
  • Affected Devices:

Environment

Show/Hide Visual Studio info

Build Logs

Screenshots

Reproduction Link

Workaround

@Pandu-V Pandu-V added s/unverified New report that has yet to be verified t/bug 🐛 labels May 31, 2021
@jsuarezruiz jsuarezruiz added this to New in Triage via automation Jun 1, 2021
@rachelkang
Copy link
Contributor

Hi, @Pandu-V - thanks for submitting this issue. I tested with our CarouselView samples, and wasn't able to reproduce the issue. Which version of XF 5 exactly are you experiencing this on? And on which devices/platforms?

@rachelkang rachelkang added s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Jun 10, 2021
@rachelkang rachelkang moved this from New to Needs Info in Triage Jun 10, 2021
@Pandu-V
Copy link
Author

Pandu-V commented Jun 11, 2021

Hi Team, I have this issue only on iOS[All phones] when we set PeakAreaInsets property in CarouselView for XF v5.0.0.2.
Thanks,
Pandu

@rachelkang
Copy link
Contributor

Hi, @Pandu-V - would you be able to share a sample? I just tested again on an iOS device, with XF 5.0.0.2, but wasn't able to reproduce any issues

@jsuarezruiz
Copy link
Contributor

Tried but cannot reproduce the issue. Could you attach a small sample?
Issue14555.zip

@DamienDoumer
Copy link

I still have this bug in version 5.0.0.7775 of Xamarin Forms

@AdamEssenmacher
Copy link

Just hit this myself.

UIKitCore error message is: negative or zero item sizes are not supported in the flow layout

MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: negative sizes are not supported in the flow layout.

In my case, I was experiencing this when PeekAreaInsets was set > 0 AND the view was also rotated around the Y-axis, which is common enough in animations.

@softlion
Copy link
Contributor

softlion commented Mar 2, 2022

Maybe linked to #15191

@ac2112
Copy link

ac2112 commented May 3, 2022

I'm having a similar problem with the CarouselView. If set PeekAreInsets I get the following failure: *** Assertion failure in -[Xamarin_Forms_Platform_iOS_CarouselViewLayout _getSizingInfosWithExistingSizingDictionary:], UICollectionViewFlowLayout.m:1501

@bbenetskyy
Copy link
Contributor

@ac2112 Facing the same issue with iOS Simulators, fix from #15191 helps to solve as a temporary solution

@grounch
Copy link

grounch commented Oct 21, 2022

@rachelkang facing the same issue with XF 5.0.0.2012 only on iOS.
If i start the app and PeekAreInsets is defined (in xaml or code) the app crashes with the errors everyone mention above.
If i start the app and i define PeekAreInsets in runtime, it seems to set it well with HotReload. However, with no surprise, if then i close the app and open it again: crash.

I tried to set it after page load without success.
Not using the feature as @bbenetskyy suggests from this post isn't really a workaround but just closing your eyes on it.

I tried with the CarouselViewDemos sample and it's actually working fine.
The only difference i see with my project is that i retrieve the content of the ObservableCollection from a server, and in the sample it's hardcoded.

It's really annoying as it's a nice UI feature and having it completely crashing the app was not expected..
Could you have a look at the issue? It seems to exist since a long time.

@grounch
Copy link

grounch commented Nov 9, 2022

Looks like it's not gonna be handled anytime soon, used collectionview instead it looks similar...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/carouselview s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/unverified New report that has yet to be verified t/bug 🐛
Projects
Triage
  
Needs Info
Development

No branches or pull requests

9 participants