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

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


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

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 2.3.0.49, 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:
http://forums.xamarin.com/discussion/comment/206302/#Comment_206302
Comment 6 thomas 2016-06-28 14:22:40 UTC
Created attachment 16510 [details]
Reproproject
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 2.3.0.107
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 2.3.2.127 and observed that this issue has been fixed.

Hence closing this issue.

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

Thanks.
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 2.3.2.127
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.

Note You need to log in before you can comment on or make changes to this bug.