You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running sample app and navigating to converters then to IndexToArrayItemConverter Page and clicking on increasing item it will go out of bounds with the following stacktrace.
at CommunityToolkit.Maui.Converters.IndexToArrayItemConverter.ConvertFrom(Int32 value, Array parameter, CultureInfo culture) in C:\Users\james\source\repos\MauiOld\src\CommunityToolkit.Maui\Converters\IndexToArrayItemConverter.shared.cs:line 31
at CommunityToolkit.Maui.Converters.BaseConverter`3.CommunityToolkit.Maui.Converters.ICommunityToolkitValueConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture) in C:\Users\james\source\repos\MauiOld\src\CommunityToolkit.Maui\Converters\BaseConverter.shared.cs:line 96
at CommunityToolkit.Maui.Converters.ICommunityToolkitValueConverter.Microsoft.Maui.Controls.IValueConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture) in C:\Users\james\source\repos\MauiOld\src\CommunityToolkit.Maui\Converters\ICommunityToolkitValueConverter.shared.cs:line 57
at Microsoft.Maui.Controls.BindingExpression.ApplyCore(Object sourceObject, BindableObject target, BindableProperty property, Boolean fromTarget, SetterSpecificity specificity)
at Microsoft.Maui.Controls.BindingExpression.Apply(Boolean fromTarget)
at Microsoft.Maui.Controls.BindingExpression.BindingExpressionPart.<PropertyChanged>b__50_0()
at Microsoft.Maui.Controls.DispatcherExtensions.DispatchIfRequired(IDispatcher dispatcher, Action action)
at Microsoft.Maui.Controls.BindingExpression.BindingExpressionPart.PropertyChanged(Object sender, PropertyChangedEventArgs args)
at Microsoft.Maui.Controls.BindingExpression.WeakPropertyChangedProxy.OnPropertyChanged(Object sender, PropertyChangedEventArgs e)
at CommunityToolkit.Mvvm.ComponentModel.ObservableObject.OnPropertyChanged(PropertyChangedEventArgs e)
at CommunityToolkit.Maui.Sample.ViewModels.Converters.IndexToArrayItemConverterViewModel.set_SelectedIndex(Int32 value) in C:\Users\james\source\repos\MauiOld\samples\CommunityToolkit.Maui.Sample\obj\Debug\net9.0-windows10.0.19041.0\win10-x64\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\CommunityToolkit.Maui.Sample.ViewModels.Converters.IndexToArrayItemConverterViewModel.g.cs:line 25
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
The video below shows what happens.
2024-12-19.16-45-24.mp4
Expected Behavior
The sample app should not crash and not allow you to go out of range.
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
When running sample app and navigating to converters then to
IndexToArrayItemConverter
Page and clicking on increasing item it will go out of bounds with the following stacktrace.The video below shows what happens.
2024-12-19.16-45-24.mp4
Expected Behavior
The sample app should not crash and not allow you to go out of range.
Steps To Reproduce
IndexToArrayItemConverterPage
Link to public reproduction project repository
https://github.com/CommunityToolkit/Maui/tree/main/samples
Environment
Anything else?
The crash is an index out of bounds error in the converter that is not handled correctly.
The text was updated successfully, but these errors were encountered: