iOS Question Crash - Add/Remove item from TableView (iUI8)

MikeH

Well-Known Member
Licensed User
Longtime User
I am getting this error:

B4X:
Error occurred on line: 499 (Main)
*** -[__NSArrayM objectAtIndex:]: index 4294967295 beyond bounds [0 .. 0]
Stack Trace: (
   CoreFoundation       <redacted> + 150
   libobjc.A.dylib      objc_exception_throw + 38
   CoreFoundation       <redacted> + 226
   Tyre Pressure        -[B4ITableViewDelgate getSection:] + 50
   Tyre Pressure        -[B4ITableViewDelgate
tableView:editActionsForRowAtIndexPath:] + 68
   UIKit                <redacted> + 102
   UIKit                <redacted> + 90
   UIKit                <redacted> + 178
   UIKit                <redacted> + 72
   UIKit                <redacted> + 94
  UIKit                <redacted> + 248
  UIKit                <redacted> + 352
  UIKit                <redacted> + 170
  UIKit                <redacted> + 578
  UIKit                <redacted> + 62
  UIKit                <redacted> + 298
  UIKit                <redacted> + 2920
  CoreFoundation       <redacted> + 20
  CoreFoundation       <redacted> + 282
  CoreFoundation       <redacted> + 972
  CoreFoundation       CFRunLoopRunSpecific + 516
  CoreFoundation       CFRunLoopRunInMode + 108
  GraphicsServices     GSEventRunModal + 160
  UIKit                UIApplicationMain + 144
  Tyre Pressure        main + 106
  libdyld.dylib        <redacted> + 2
)

This happens when I add or a remove an item to the tableview using iUI8 actionbuttons. The app exits but if I restart, I see the item has been added/removed.
Line 499 is "End Sub" and is the last line of my code. The error has never pointed to a line with wrong code, I`m sure I would have worked this out myself if that was the case.

Anyone else had this? Any idea what may be causing the crash?

Odd thing is, it doesn`t always happen. It happens more on my iPad than my iPhone and so far, not at all in the simulator and not at all if I step through each line in debugger.
 

MikeH

Well-Known Member
Licensed User
Longtime User
Erel, I`d prefer not to post code, I have emailed you the whole project though.
 
Upvote 0
Top