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

Crashes in linq query #36

Open
fluter01 opened this issue Dec 12, 2017 · 0 comments
Open

Crashes in linq query #36

fluter01 opened this issue Dec 12, 2017 · 0 comments

Comments

@fluter01
Copy link

The CarouselView crashes when swipe half way of the view item and then releases, it looks in this case visiblePositions will be holding more than one item, so it crashes in the linq's Single query:

12-12 10:00:28.431 I/MonoDroid( 3010): UNHANDLED EXCEPTION:
12-12 10:00:28.494 I/MonoDroid( 3010): System.InvalidOperationException: Sequence contains more than one element
12-12 10:00:28.494 I/MonoDroid( 3010): at System.Linq.Enumerable.Single[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00070] in :0
12-12 10:00:28.494 I/MonoDroid( 3010): at Xamarin.Forms.Platform.CarouselViewRenderer.b__8_2 () [0x00011] in <3867cb0a879d490a9a2604d76def86f4>:0
12-12 10:00:28.494 I/MonoDroid( 3010): at Xamarin.Forms.Platform.CarouselViewRenderer+OnScrollListener.OnScrollStateChanged (Android.Support.V7.Widget.RecyclerView recyclerView, System.Int32 newState) [0x0003d] in <3867cb0a879d490a9a2604d76def86f4>:0
12-12 10:00:28.494 I/MonoDroid( 3010): at Android.Support.V7.Widget.RecyclerView+OnScrollListener.n_OnScrollStateChanged_Landroid_support_v7_widget_RecyclerView_I (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_recyclerView, System.Int32 newState) [0x00011] in <00ef854e109241db9d853f1dd4d69cd9>:0
12-12 10:00:28.494 I/MonoDroid( 3010): at (wrapper dynamic-method) System.Object:b132f440-26d6-4af5-88e0-df5ad0f45ec7 (intptr,intptr,intptr,int)

I'm just using the demo project at https://github.com/jamesmontemagno/Xamarin.Forms-Monkeys/tree/master/Monkeys-CarouselView

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant