Ok. So I had this extremely weird SIGABRT
error on a complex Objective-C iOS program that I'm working on, and after one day of tracking I found the culprit.
Let's say we have the following code:
NSArray *a = [NSArray arrayWithObjects:@"a", @"b", @"c", nil];
NSLog(@"tada: %@", [a objectAtIndex:-1]);
Why the hell will this terminate the program with Program received signal: SIGABRT
and the debugger not even pointing to my code (but rather in some assembly part) instead of a nicer 'index out of bounds' and 'hey, this line of code here be wrong' error?
I thought I messed up the project config, so I reproduced this on a brand new project: same result.
Is there a way to configure XCode to be more nice and indicate this kind of errors in a more human understandable way ?