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

[Bug] Go backwards crash the app while CollectionView scrolling #15637

Closed
petthreer opened this issue Dec 21, 2022 · 0 comments · Fixed by #15638
Closed

[Bug] Go backwards crash the app while CollectionView scrolling #15637

petthreer opened this issue Dec 21, 2022 · 0 comments · Fixed by #15638
Labels
p/iOS 🍎 s/unverified New report that has yet to be verified t/bug 🐛

Comments

@petthreer
Copy link

Description

Button which trigger shell backwards navigation causes the app to crash while CollectionView performs a scrolling animation.
Happens on iOS >= 15.0

Steps to Reproduce

  1. Create ContentPage with the possibility go back
  2. Set Shell.NavBarIsVisible="False"
  3. Create StackLayout with Button which on click does Shell.Current.GoToAsync("..") and CollectionView with multiple Items.
  4. Create enough items so when you swipe you can see scroll animation
  5. Swipe to scroll items and while items are scrolling click the button (do this multiple times and app will crash)

Expected Behavior

App does not crash

Actual Behavior

On iOS app crashes

Basic Information

  • Version with issue: Xamarin.Forms Version="5.0.0.2545"
  • Last known good version: ?
  • Platform Target Frameworks:
    • iOS: 15.0, 16.1
    • Android:
    • UWP:
  • Android Support Library / AndroidX Version:
  • NuGet Packages:
  • Affected Devices:

StackTrace

System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.Forms.Platform.iOS.ItemsViewController1[TItemsView].UpdateTemplatedCell (Xamarin.Forms.Platform.iOS.TemplatedCell cell, Foundation.NSIndexPath indexPath) [0x00031] in D:\a\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ItemsViewController.cs:278 at Xamarin.Forms.Platform.iOS.ItemsViewController1[TItemsView].GetCell (UIKit.UICollectionView collectionView, Foundation.NSIndexPath indexPath) [0x00033] in D:\a\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ItemsViewController.cs:94
at (wrapper managed-to-native) UIKit.UIApplication.xamarin_UIApplicationMain(int,string[],intptr,intptr,intptr&)
at UIKit.UIApplication.UIApplicationMain (System.Int32 argc, System.String[] argv, System.IntPtr principalClassName, System.IntPtr delegateClassName) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/16.0.0.72/src/Xamarin.iOS/UIKit/UIApplication.cs:57
at UIKit.UIApplication.Main (System.String[] args, System.Type principalClass, System.Type delegateClass) [0x0003b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/16.0.0.72/src/Xamarin.iOS/UIKit/UIApplication.cs:92
at collectionviewtest.iOS.Application.Main (System.String[] args) [0x00001] in Desktop/collectionviewtest/collectionviewtest/collectionviewtest.iOS/Main.cs:17

Screen.Recording.2022-12-21.at.10.22.35.mov

Reproduction Link

collectionviewtest.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p/iOS 🍎 s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants