0

The only error I ever get is SIGABRT in main. This is getting incredibly frustrating as I have to guess what line caused the error and why.

This is a far cry from visual studio's informative error messages. It's basically like sending off an entire novel to an editor and the only notes you get back are: "There is a problem somewhere in your book. There may be many or just one and they are either gramatical or to do with spelling."

I just don't know how anyone can work like this. What am I doing wrong? Surely I'm missing something essential.

Dollarslice
  • 9,917
  • 22
  • 59
  • 87

2 Answers2

1

Write some NSLog() into your code and you'll see it in the console. It's a great help to narrow down a crash.

Darren
  • 10,182
  • 20
  • 95
  • 162
0

if you have encountered memory problems (aka – your app crashes for no apparent reason because you attempted to use an object that you deallocated to soon) setting NSZombieEnabled = YES can help you diagnose the problem.

Normally, when your app crashes in this way and you look at the log it tells you nothing (thanks Apple!). However, if you select your executable (under Executables in Xcode), hit the info button (round blue thing at the top), select arguments and put this in the bottom screen NSZombieEnabled = YES the log will give you more information.

Now, if your app crashes the log will have an indication of the object you attempted to access that has already been deallocated. Not forget to turn it off before you deploy it – you don’t want a bunch of nszombies running around your clients phones…

Dollarslice
  • 9,917
  • 22
  • 59
  • 87