ios - ** -[__NSSingleObjectArrayI objectAtIndex:]: index 18446744073709551615 beyond bounds [0 .. 0] -


i'm trying understand reason behind crash.

what __nssingleobjectarrayi ? couldn't find information on this.

the crashlog sent crashlytics is:

 fatal exception: nsrangeexception 0  corefoundation                 0x1836fa1c0 __exceptionpreprocess 1  libobjc.a.dylib                0x18213455c objc_exception_throw 2  corefoundation                 0x1836eb428 +[__nssingleobjectarrayi automaticallynotifiesobserversforkey:] 3  boostapp                       0x100070098 -[locationpromptvc tableview:didselectrowatindexpath:] (locationpromptvc.m:269) 4  uikit                          0x189683078 -[uitableview _selectrowatindexpath:animated:scrollposition:notifydelegate:] 5  uikit                          0x189733b34 -[uitableview _userselectrowatpendingselectionindexpath:] 6  uikit                          0x1897e6d5c _runaftercacommitdeferredblocks 7  uikit                          0x1897d8b10 _cleanupaftercaflushandrundeferredblocks 8  uikit                          0x189547854 _aftercacommithandler 9  corefoundation                 0x1836a77dc __cfrunloop_is_calling_out_to_an_observer_callback_function__ 10 corefoundation                 0x1836a540c __cfrunloopdoobservers 11 corefoundation                 0x1836a589c __cfrunlooprun 12 corefoundation                 0x1835d4048 cfrunlooprunspecific 13 graphicsservices               0x18505a198 gseventrunmodal 14 uikit                          0x1895c02fc -[uiapplication _run] 15 uikit                          0x1895bb034 uiapplicationmain 16 boostapp                       0x1000bbc24 main (main.m:14) 17 libdispatch.dylib              0x1825b85b8 (missing) 

the crash happening in below method:

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath{     //nsarray                //nsarray    both strong,nonatomic     self.selectedlocation = self.filteredlocations[indexpath.row];     [self.tableview reloaddata];     [self.searchfield resignfirstresponder]; } 

//datasource method

- (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section{     return self.filteredlocations.count; } 

74% of crashes happening on ios10. have 31 crashes in past 90 days.

why didselectrow method pointing wrong index 18446744073709551615 ?

this crash rare, , i'm not able reproduce it. ideas on debugging ?

the table view simple.it has search field on nav bar, , based on searchfield text,i filter locations , populate tableview.once user select row, show location data on different vc.

try code.. may code help. in application getting same crash collectionview , rare. purely indexoutofbounds issue. dont know how come collectionview showing more items datasource count. conditional check helps me , app not crashing

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath{     //nsarray                //nsarray    both strong,nonatomic     if (self.filteredlocations.count > indexpath.row && indexpath.row >= 0) {       self.selectedlocation = self.filteredlocations[indexpath.row];       [self.tableview reloaddata];       [self.searchfield resignfirstresponder];   } } 

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -