App Center Crashes : SIGABRT: Objective-C exception thrown. Name: NSRangeException Reason: Attempted to scroll the table view to an out-of-bounds row (0) when there are only 0 rows in section 0

Mane, PRASHANT GORAKH 96 Reputation points
2022-11-30T13:56:33.627+00:00

I'm getting below issue frequently. Not sure why it causing and how to fix. I've been trying to replicate this bug but it's hard to pin point which page/view this occurred also checked AppCenter logs but couldn't make much sense.

This is the log I found in app center:

Runtime.ThrowNSException (System.IntPtr ns_exception)
SIGABRT: Objective-C exception thrown. Name: NSRangeException Reason: Attempted to scroll the table view to an out-of-bounds row (0) when there are only 0 rows in section 0. Table view: <UITableView: 0x12b443000; frame = (0 0; 392 558); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x28016ed00>; backgroundColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x280bd2780>; contentOffset: {0, 426.5}; contentSize: {392.00000000000006, 47.5}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <Xamarin_Forms_Platform_iOS_ListViewRenderer_UnevenListViewDataSource: 0x280bc8880>> Native stack trace: 0 CoreFoundation 0x00000001da276254 42C5C917-0447-3995-B50F-DE4D132C2435 + 41556 1 libobjc.A.dylib 0x00000001d3643a68 objc_exception_throw + 60 2 CoreFoundation 0x00000001da365e04 42C5C917-0447-3995-B50F-DE4D132C2435 + 1023492 3 UIKitCore 0x00000001dc88cb0c 7B942FA4-CB76-3375-9972-F58C14492FB4 + 4795148 4 UIKitCore 0x00000001dc886aa0 7B942FA4-CB76-3375-9972-F58C14492FB4 + 4770464 5 UIKitCore 0x00000001dc895210 7B942FA4-CB76-3375-9972-F58C14492FB4 + 4829712 6 KayProtect.iOS 0x00000001055c0078 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 17745244 7 KayProtect.iOS 0x0000000105524a94 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 17108856 8 KayProtect.iOS 0x0000000105773e90 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 19530612 9 KayProtect.iOS 0x00000001054d72f4 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 16791512 10 KayProtect.iOS 0x0000000104916b90 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 4468852 11 KayProtect.iOS 0x00000001073e5754 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 49355832 12 KayProtect.iOS 0x000000010749f384 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 50116712 13 KayProtect.iOS 0x00000001074a2bc4 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 50131112 14 KayProtect.iOS 0x0000000104503c28 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 196876 15 KayProtect.iOS 0x000000010450a644 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 224040 16 Foundation 0x00000001d46f7000 AA92CD58-561A-3414-92F4-B4120298B39A + 241664 17 CoreFoundation 0x00000001da34222c 42C5C917-0447-3995-B50F-DE4D132C2435 + 877100 18 CoreFoundation 0x00000001da34e614 42C5C917-0447-3995-B50F-DE4D132C2435 + 927252 19 CoreFoundation 0x00000001da2d257c 42C5C917-0447-3995-B50F-DE4D132C2435 + 419196 20 CoreFoundation 0x00000001da2e7eb8 42C5C917-0447-3995-B50F-DE4D132C2435 + 507576 21 CoreFoundation 0x00000001da2ed1e4 CFRunLoopRunSpecific + 612 22 GraphicsServices 0x000000021310d368 GSEventRunModal + 164 23 UIKitCore 0x00000001dc79cd88 7B942FA4-CB76-3375-9972-F58C14492FB4 + 3812744 24 UIKitCore 0x00000001dc79c9ec UIApplicationMain + 340 25 KayProtect.iOS 0x00000001055b3698 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 17693564 26 KayProtect.iOS 0x000000010550f2e0 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 17020868 27 KayProtect.iOS 0x0000000104547f54 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 476216 28 KayProtect.iOS 0x0000000104916b90 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 4468852 29 KayProtect.iOS 0x00000001073e5754 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 49355832 30 KayProtect.iOS 0x000000010749f384 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 50116712 31 KayProtect.iOS 0x00000001074a568c _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 50142064 32 KayProtect.iOS 0x00000001073c3b40 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 49217572 33 KayProtect.iOS 0x000000010758029c xamarin_log + 6000 34 KayProtect.iOS 0x000000010453f118 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 439804 35 dyld 0x00000001f8611948 341BBF64-6034-357E-8AA6-E1E4B988E03C + 88392

Stack traces:

Runtime.ThrowNSException (System.IntPtr ns_exception)
Runtime.throw_ns_exception (System.IntPtr exc)
(wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr)
(wrapper managed-to-native) ObjCRuntime.Messaging.objc_msgSend(intptr,intptr,intptr,intptr,bool)
UITableView.ScrollToRow (Foundation.NSIndexPath indexPath, UIKit.UITableViewScrollPosition atScrollPosition, System.Boolean animated)
ListViewRenderer+<>c__DisplayClass49_0.<OnScrollToRequested>b__0 ()
NSAsyncActionDispatcher.Apply ()
(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName)
Application.Main (System.String[] args)
(wrapper managed-to-native) ObjCRuntime.Messaging.objc_msgSend(intptr,intptr,intptr,intptr,bool)
UITableView.ScrollToRow (Foundation.NSIndexPath indexPath, UIKit.UITableViewScrollPosition atScrollPosition, System.Boolean animated)
ListViewRenderer+<>c__DisplayClass49_0.<OnScrollToRequested>b__0 ()
NSAsyncActionDispatcher.Apply ()
(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName)
Application.Main (System.String[] args)

Basic Information
* Version with issue: Xamarin Forms 5.0.0.2012
* IDE: Visual Studio Community 2022 for Mac(Version 17.4)
* Xamarin.iOS : Version: 16.0.0.72 (Visual Studio Community)
*Affected Devices: iPad mini 5 (Wi-Fi)- iOS 15.5 / iPad7,5 - iPadOS 15.4.1 / iPad11,6 - iPadOS 15.6.1

KINDLY REQUEST PLEASE HELP ME WITH THIS. Thanks in advance.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,292 questions
{count} votes