views:

106

answers:

2

Hello everyone!

I am preparing an iphone application in which I am using many transition among view controllers. This means that there is one main menu view controller and after i press the necessary box, a modal view controller is being pushed. After this, I press an exit button and come again to the main menu and I can reenter.

The problem is that when I enter and exit my viewcontrollers many times, the application crashes and I have many object allocations in my instruments (but no leaks).

I also use many UIImageViews. Any suggestions on what may be wrong?

Thank you very very much! (using iphone OS 3.1.2)

A: 

You may be trying to access a member variable that has already been released. One way to find out where the application crashes is to click on the "Checkpoints" button in the toolbar and run the application.

When it crashes, open the Debugger window (Cmd-Shift-Y) and look for one of your methods in the stack trace. This location is usually where you're doing something wrong.

Alex Reynolds
+1  A: 

Off the top of my head, there are a couple of things that might be going wrong:

  • You have either an over-released instance variable (EXC_BAD_ACCESS crash), or
  • You are using too much memory (i.e. you are not releasing any of your allocated objects) and you get a LowMemory crash.

Can you post a crash log? (If you're testing on a device, you can find out by checking the crash log in Xcode: Window->Organizer->iPhone Development(sidebar)->Crash logs.

Nick Toumpelis