Xamarin.forms: The Xamarin.Forms.CarouselView crashes inside a ListView in iOS only

Created on 26 Feb 2019  路  8Comments  路  Source: xamarin/Xamarin.Forms

Description

When using the new Xamarin.Forms.CarouselView inside a ListView it throws an exception "System.InvalidCastException: Specified cast is not valid." and the application cannot start. To help to investigate this issue I have developed a very simple app with Xamarin.Forms.CarouselView inside a ListView and it is attached to this ticket.

I am using the latest version of the nightly Xamarin.Forms build: 4.0.1.188134-nightly

Steps to Reproduce

  1. Run the attached iOS solution called "App13".
  2. The App won't start and it will throw the following exception "System.InvalidCastException: Specified cast is not valid."
  3. The app doesn't initialize.

Expected Behavior

The app supposed to display a list view with 6 records and each record contains a Carousel with 3 items (People names).

Actual Behavior

The App won't start and it will throw the following exception "System.InvalidCastException: Specified cast is not valid."

Basic Information

  • Version with issue: 4.0.1.188134-nightly
  • Last known good version: Since the Xamarin.Forms.CarouselView was introduced in the Xamarin.Forms 4, this CarouselView has never worked with ListView.
  • IDE: Visual Studio 15.9.3 Preview 1.0
  • Platform Target Frameworks:

    • iOS: 12.2.1.15

    • Nuget Packages:

    • Affected Devices:

Screenshots

The app in iOS supposed to show something like this one in Android:

image

Reproduction Link

Here is a zip file with a small solution to help to reproduce the issue:

App13.zip

StackTrace

StackTraceBug.txt

4.1.0 carouselview listview 4 high iOS 馃崕 bug

All 8 comments

Hi @samhouts . I noticed this issue was moved to iOS Ready For Work and after that, it was moved back to Triage. Let me know if you need more clarification around this issue.

@ricardouffcomp We just took it out of the triage board and put it in the Ready for Work board. It's ready for someone to look at! Thanks!

Hi @samhouts . Do you know when you are going to have a resource available from the Xamarin Team to work on this issue?

Hi @samhouts. I clicked by mistake on the button "Close and Comment"/"Reopen" and the ticket is now sitting in "In Progress" under my name. I am not able to move the ticket back to ToDo. Can you move it back to Todo again? Cheers

Hi @samhouts . Are these Xamarin issues being fixed only by the community or there are Microsoft engineers working on these tickets as well? I have reported this bug 2 months ago and it is not clear for me if someone will pick it up soon. It is blocking the release of my app.

Hi @ricardouffcomp! Microsoft engineers definitely work on these tickets! CarouselView is still in very early preview. We plan to work on it more in the coming sprints. Thank you for your patience!

Thanks for the repro sample!. I've been doing tests. I reproduce the same problem with Xamarin.Forms 4.0.1.188134-nightly.

However, I am happy to share that the problem is fixed. If you update the sample to Xamarin.Forms 4.3:
issue5382

If you update to the latest current version, 4.3.0.819712-pre2, keep in mind that the Layout supported by the CarouselView is LinearItemsLayout.

@jsuarezruiz thanks for looking into this issue. I am glad to hear it is fixed now. 馃榾

Was this page helpful?
0 / 5 - 0 ratings