Bug 41463 - CarouselView Crashes with "Sequence Does not Contain a Matching Element"
Summary: CarouselView Crashes with "Sequence Does not Contain a Matching Element"
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.2.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
: 42112 ()
Depends on:
Reported: 2016-06-02 16:34 UTC by FieldstrikeMobile
Modified: 2016-11-03 10:46 UTC (History)
16 users (show)

Is this bug a regression?: ---
Last known good build:

Reproproject (213.13 KB, application/x-zip-compressed)
2016-06-28 14:22 UTC, thomas
Bug Origin (27.64 KB, image/png)
2016-06-29 11:47 UTC, thomas

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description FieldstrikeMobile 2016-06-02 16:34:02 UTC
Using the latest CarouselView nuget package.

Put a carousel view in your application and scroll to the left but DONT go to the next page. stop before it clicks to the next page. (so you remain on the initial page)

application will crash with "Sequence does not contain a matching element"

I have only tested this on Android
Comment 1 Rodrigo Elias 2016-06-03 13:11:07 UTC
Same here. Version is 2.3.0-pre1
Comment 2 adrianknight89 2016-06-14 16:35:58 UTC
I think everyone has this issue.
Comment 3 Werner Schnedl 2016-06-23 09:32:12 UTC
Same here. XF, CarouselView 2.3.0-pre1
Comment 4 thomas 2016-06-28 10:29:15 UTC
Same here CarouselView 2.3.0-pre1.

This is really serious. I refactroed my App from CarouselPage to CarouselView because it was announced CarouselPage will be deprecated and now I'm facing this exception.
Comment 5 thomas 2016-06-28 10:45:19 UTC
I have pasted stacktraces where it happend here:
Comment 6 thomas 2016-06-28 14:22:40 UTC
Created attachment 16510 [details]
Comment 7 thomas 2016-06-29 11:47:51 UTC
Created attachment 16520 [details]
Bug Origin

As you can see, where Single is called the collection contains two elements, likely because it's in between two elements.
Changing the Single call to .First eliminates the bug.
Comment 8 thomas 2016-06-29 11:52:12 UTC
Actually just realized, that although the result is the same in my case the Exception was ""Sequence contains more than one element" not the one above in the Issue Title. Not sure if this is another problem.
Comment 9 FieldstrikeMobile 2016-06-29 12:09:20 UTC
@thomas That could be a mistake on my part. It sounds like the same error from what you are describing
Comment 10 Sam 2016-06-29 15:17:39 UTC
Also occurs with Xamarin.Forms
Comment 11 adrianknight89 2016-06-30 19:32:28 UTC
Can you open source this control even before it's merged to the XF branch?
Comment 12 Chris King 2016-07-01 06:51:01 UTC
Confirmed duplicate of https://bugzilla.xamarin.com/show_bug.cgi?id=40513. Will be fixed in pre2.
Comment 13 thomas 2016-07-01 12:36:18 UTC
When will be pre 2 be released?
Comment 16 ro 2016-07-29 07:01:00 UTC
The version pre-2 is now available on nuget.org.
Comment 17 Parmendra Kumar 2016-09-20 18:45:42 UTC
I have checked this issue with latest Xamarin.forms.CarouseView 2.3.0-pre2 and xamarin.forms and observed that this issue has been fixed.

Hence closing this issue.

NOTE: I am getting Load exception when using latest Xamarin.forms so I have filed separate Bug: https://bugzilla.xamarin.com/show_bug.cgi?id=44533  

Comment 18 Parmendra Kumar 2016-09-21 10:54:03 UTC
*** Bug 42112 has been marked as a duplicate of this bug. ***
Comment 19 man_xam 2016-11-02 07:19:29 UTC
I am still getting this error with Xamarin.forms.CarouseView 2.3.0-pre2 and xamarin.forms
Comment 20 man_xam 2016-11-02 17:23:20 UTC
Getting same error with Preview version of XForms
Comment 21 Parmendra Kumar 2016-11-03 10:46:40 UTC
@Man_xam, I have already filed a issue with Xamarin.forms.CarouseView 2.3.0-pre2 which is mention in comment #17.

Please let me if you getting same issue as bug:#44533 or any other issue.