Skip to content

NRE in CarouselViewController on iOS 15.5 & 16.4 #28557

@mypp74

Description

@mypp74

Description

2025-03-21 22:38:28.494272+0100 Dopnet.YourDive.Maui[49904:537114] Unhandled managed exception: Value cannot be null. (Parameter 'key') (System.ArgumentNullException)
at System.Collections.Generic.Dictionary2[[System.Object, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Maui.Controls.Handlers.Items.TemplatedCell, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].FindValue(Object key) at System.Collections.Generic.Dictionary2[[System.Object, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Maui.Controls.Handlers.Items.TemplatedCell, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].TryGetValue(Object key, TemplatedCell& value)
at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController1[[Microsoft.Maui.Controls.CarouselView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].UpdateTemplatedCell(TemplatedCell cell, NSIndexPath indexPath) at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController1[[Microsoft.Maui.Controls.CarouselView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].GetCell(UICollectionView collectionView, NSIndexPath indexPath)
at Microsoft.Maui.Controls.Handlers.Items.CarouselViewController.GetCell(UICollectionView collectionView, NSIndexPath indexPath)
at UIKit.UICollectionView.ReloadItems(NSIndexPath[] indexPaths) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/dotnet/ios/generated-sources/UIKit/UICollectionView.g.cs:line 753
at Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.<>c__DisplayClass45_0.b__0(UICollectionView c)
at Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.Update(Action1 update, NotifyCollectionChangedEventArgs args) at Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.Replace(NotifyCollectionChangedEventArgs args) at Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.CollectionChanged(NotifyCollectionChangedEventArgs args) at Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.CollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) at System.Collections.ObjectModel.ObservableCollection1[[Dopnet.YourDive.Services.DiveInfo, Dopnet.YourDive.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection1[[Dopnet.YourDive.Services.DiveInfo, Dopnet.YourDive.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnCollectionChanged(NotifyCollectionChangedAction action, Object oldItem, Object newItem, Int32 index) at System.Collections.ObjectModel.ObservableCollection1[[Dopnet.YourDive.Services.DiveInfo, Dopnet.YourDive.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetItem(Int32 index, DiveInfo item)
at System.Collections.ObjectModel.Collection1[[Dopnet.YourDive.Services.DiveInfo, Dopnet.YourDive.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].set_Item(Int32 index, DiveInfo value) at Dopnet.YourDive.UI.ViewModels.DiveDetailViewModel.UpdateDive(DiveInfo dive) in C:\Users\MarcPERROT\source\repos\YourDive\Dopnet.YourDive.UI.Logic\YourDive.UI.ViewModels\DiveDetailViewModel.cs:line 614 at Dopnet.YourDive.UI.ViewModels.DiveDetailViewModel.OnDiveChanged(Object sender, ChangedEventArgs1 e) in C:\Users\MarcPERROT\source\repos\YourDive\Dopnet.YourDive.UI.Logic\YourDive.UI.ViewModels\DiveDetailViewModel.cs:line 553
at Dopnet.YourDive.UI.ViewModels.ChangedEventSource1[[Dopnet.YourDive.Services.DiveInfo, Dopnet.YourDive.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].Raise(ChangedEventArgs1 e) in C:\Users\MarcPERROT\source\repos\YourDive\Dopnet.YourDive.UI.Logic\YourDive.UI.ViewModels\ChangedEventSource.cs:line 11
at Dopnet.YourDive.UI.ViewModels.IChangedEventSourceExtensions.RaiseUpdate[DiveInfo](IChangedEventSource1 source, String id, DiveInfo value) in C:\Users\MarcPERROT\source\repos\YourDive\Dopnet.YourDive.UI.Logic\YourDive.UI.ViewModels\IChangedEventSourceExtensions.cs:line 62 at Dopnet.YourDive.UI.ViewModels.IChangedEventSourceExtensions.RaiseUpdate(IChangedEventSource1 source, DiveInfo value) in C:\Users\MarcPERROT\source\repos\YourDive\Dopnet.YourDive.UI.Logic\YourDive.UI.ViewModels\IChangedEventSourceExtensions.cs:line 24
at Dopnet.YourDive.UI.ViewModels.StampsRequestViewModel.RequestStampsAsync() in C:\Users\MarcPERROT\source\repos\YourDive\Dopnet.YourDive.UI.Logic\YourDive.UI.ViewModels\StampsRequestViewModel.cs:line 97
at Dopnet.Maui.CommandFactory.<>c__DisplayClass7_0.<b__0>d.MoveNext() in C:\Users\MarcPERROT\source\repos\YourDive\Dopnet.Maui\CommandFactory.cs:line 48
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply() in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSAction.cs:line 179
--- End of stack trace from previous location ---
at ObjCRuntime.Runtime.ThrowException(IntPtr gchandle) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:line 2742
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 64
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 96
at Dopnet.YourDive.Maui.Program.Main(String[] args) in C:\Users\MarcPERROT\source\repos\YourDive\Dopnet.YourDive.Maui\Platforms\iOS\Program.cs:line 13

Steps to Reproduce

CrashCarouselView.zip

Link to public reproduction project repository

No response

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

iOS

Affected platform versions

iOS 15.5

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewCollectionView, CarouselView, IndicatorViewhighIt doesn't work at all, crashes or has a big impact.partner/syncfusionIssues / PR's with Syncfusion collaborationplatform/ioss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions