views:

257

answers:

4

In some working code, I had a call to PushViewController, which loaded (successfully) a new view from an xib.

I went into the XIB and added a couple of buttons. Retried the code, and the view continued to be displayed at the appropriate point in the code.

I then deleted those buttons, and since that point, the code no longer works. It now crashes with an unhandled exception error. I can't track it through the debugger - it takes a few steps into the code and crashes.

I've probably disconnected something in IB, but I don't know what.

Can anyone offer any suggestions as to what I've broken, and how to fix it?

Thanks in advance for your assistance.

A: 

Most crashes are to be found in too early released memory.

  • Have you checked your memory management?
  • Whats the crash code?
  • Is it untraceable even if you run the program in a debugger?
Georg
A: 

If you think you've screwed up in IB, look at the Connections Inspector (cmnd + 2) for each element.

bpapa
A: 

It now crashes with an unhandled exception error

What's the exception?

The output in your Debugger Console will explain what the problem is.

Darren
A: 

make sure you didn't disconnect that XIBs view from File's Owner by mistake. Could've been either an outlet or not, but the view still needs a connection.

  • Connections inspector and make sure that it's there.
  • Or check for any other missing connections.

No knowing the details of your XIB is hard to tell, but that's usually a common case.

yandy