How to fix Terminating app due to uncaught exception '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: 0x7fc6808eac00; frame = (0 140; 414 670); clipsToBounds = YES; autoresize = RM+BM; tintColor = UIExtendedSRGBColorSpace 0 0.560318 0 1; gestureRecognizers = <NSArray: 0x6000032df420>; layer = <CALayer: 0x600003c2c720>; contentOffset: {0, 0}; contentSize: {414, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <EspApp.TerminalBLEViewController: 0x7fc68063a150>>' #2
Open
Description
Hi. Hi. I'm trying to get ESP32's Bluetooth connected to the iOS app, but the app crashed after I clicked Terminal BLE. I'm very new to swift and Bluetooth, so I have no clue how to fix this. Can someone please help me to figure this out?
18.269 📙A Debug.debugSetLevel: debug: level setted to 📘V-Verbose
18.270 📘V MainController.initializeApp: Initilializing ...
18.271 📘V MainController.initializeApp: Initialized
18.346 📘V ConnectingViewController.viewDidLoad:
18.412 📘V ConnectingViewController.viewWillDisappear:
18.413 📘V MainMenuViewController.viewWillAppear:
18.427 📘V MainMenuViewController.tableView: code-> INFO
18.432 📘V MainMenuViewController.tableView: code-> TERMINAL
18.436 📘V MainMenuViewController.tableView: code-> SETTINGS
2019-12-05 23:36:18.436265-0500 EspApp[2349:137801] Metal API Validation Enabled
21.099 📘V MainMenuViewController.tableView: code of menu selected: TERMINAL
21.109 📘V MainMenuViewController.viewWillDisappear:
21.109 📘V TerminalBLEViewController.viewWillAppear:
2019-12-05 23:36:21.145989-0500 EspApp[2349:137801] *** Terminating app due to uncaught exception '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: 0x7fc6808eac00; frame = (0 140; 414 670); clipsToBounds = YES; autoresize = RM+BM; tintColor = UIExtendedSRGBColorSpace 0 0.560318 0 1; gestureRecognizers = <NSArray: 0x6000032df420>; layer = <CALayer: 0x600003c2c720>; contentOffset: {0, 0}; contentSize: {414, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <EspApp.TerminalBLEViewController: 0x7fc68063a150>>'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23baa1ee __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50864b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23baa02c +[NSException raise:format:] + 188
3 UIKitCore 0x00007fff47757b04 -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:usingPresentationValues:] + 812
4 UIKitCore 0x00007fff47758697 -[UITableView _scrollToRowAtIndexPath:atScrollPosition:animated:usingPresentationValues:] + 142
5 UIKitCore 0x00007fff47758543 -[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] + 135
6 EspApp 0x00000001016bb1d0 $s6EspApp25TerminalBLEViewControllerC10reloadDatayyFyycfU_ + 704
7 EspApp 0x00000001016bb4bd $sIeg_IeyB_TR + 45
8 libdispatch.dylib 0x00000001025d9df8 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x00000001025dad6c _dispatch_client_callout + 8
10 libdispatch.dylib 0x00000001025e8e24 _dispatch_main_queue_callback_4CF + 1500
11 CoreFoundation 0x00007fff23b0ce49 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
12 CoreFoundation 0x00007fff23b07aa9 __CFRunLoopRun + 2329
13 CoreFoundation 0x00007fff23b06e66 CFRunLoopRunSpecific + 438
14 GraphicsServices 0x00007fff38346bb0 GSEventRunModal + 65
15 UIKitCore 0x00007fff47578dd0 UIApplicationMain + 1621
16 EspApp 0x00000001016e9288 main + 72
17 libdyld.dylib 0x00007fff516ecd29 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Metadata
Assignees
Labels
No labels