CarouselView crash on UWP when right or left arrow control is used
See original GitHub issueFollowing is working on Android (probably on iOS also, not tested yet) but in UWP it crashes app (exception is System.NullReferenceException: Object reference not set to an instance of an object):
<cards:CarouselView Grid.RowSpan="2" Margin="0" ItemsSource="{Binding CarouselPages}" SelectedIndex="{Binding CarouselPosition, Mode=TwoWay}" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<cards:CarouselView.ItemTemplate>
<DataTemplate>
<Grid Margin="0" Padding="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="150"/>
</Grid.RowDefinitions>
<Frame Grid.Row="0" BorderColor="{StaticResource Accent}" CornerRadius="10" BackgroundColor="{StaticResource White90}" Margin="20,0,20,0" HasShadow="True" Padding="10" WidthRequest="500" HorizontalOptions="Center" VerticalOptions="Center">
<Frame.Content>
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="{Binding Title}" TextColor="{StaticResource Accent}" FontSize="Medium" HorizontalOptions="Center" VerticalTextAlignment="Center"/>
<Label Text="{Binding Text}" HorizontalOptions="Center" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"/>
</StackLayout>
</Frame.Content>
</Frame>
</Grid>
</DataTemplate>
</cards:CarouselView.ItemTemplate>
<cardscontrols:LeftArrowControl/>
<cardscontrols:RightArrowControl/>
<cardscontrols:IndicatorsControl SelectedIndicatorStyle="{StaticResource CarouselViewActiveIndicator}" UnselectedIndicatorStyle="{StaticResource CarouselViewInactiveIndicator}"/>
</cards:CarouselView>
Stack trace on UWP:
Xamarin.Forms
AnimationExtensions.DoAction (IAnimatable self, Action action)
Xamarin.Forms
AnimationExtensions.Animate[T] (IAnimatable self, String name, Func2 transform, Action
1 callback, UInt32 rate, UInt32 length, Easing easing, Action2 finished, Func
1 repeat)
Xamarin.Forms
AnimationExtensions.Animate (IAnimatable self, String name, Action1 callback, UInt32 rate, UInt32 length, Easing easing, Action
2 finished, Func1 repeat) Xamarin.Forms AnimationExtensions.Animate (IAnimatable self, String name, Animation animation, UInt32 rate, UInt32 length, Easing easing, Action
2 finished, Func`1 repeat)
PanCardView.Utility
AnimationWrapper.Commit (View view, String name, UInt32 rate, UInt32 length, Easing easing)
PanCardView.Controls.ArrowControl
<ResetVisibility>d__53.MoveNext ()
System.Runtime.ExceptionServices
ExceptionDispatchInfo.Throw ()
System.Runtime.CompilerServices.AsyncMethodBuilderCore
<>c.<ThrowAsync>b__6_0 (Object state)
System.Threading.WinRTSynchronizationContextBase
Invoker.InvokeCore ()
Windows.ApplicationModel.Core
UnhandledError.Propagate ()
Microsoft.AppCenter.Utils
ApplicationLifecycleHelper.<ctor>b__17_1 (Object sender, UnhandledErrorDetectedEventArgs eventArgs)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
well, it’s XF issue, that will be fixed in future releases. here is the workaround:
Seems UWP DispatcherProvider causes a crash.