Swift owned to guaranteed
In my opinion, you are looking at wrong places. When I am looking at the logs, what I see is:
- A click on a button
onButtonTableViewCellClick
- Obj-C to Swift internals (you can learn more in What's Dead & Exploded in Swift's exception stack?)
- Indexing
String
byInt
(seeString.subscript.getter (Swift.Int) -> String
)
We can be sure that the crash happened somewhere here:
return String(Array(self.characters)[i])
I think we can rule out nil
because that would cause an earlier crash. Most likely you have an character index out of bounds problem. That means i
is either negative or higher than length - 1
(maybe you are indexing an empty text?)
Unfortunately, the important code is in onButtonTableViewCellClick
and you haven't posted that.