views:

57

answers:

2

This is sort of a mystery to me. My application does not use very much memory but if I put it in the background and run as many memory-intensive applications as I can, occasionally my application will crash when I try to wake it up.

I've looked at the crash log and this is what I see:

0   libobjc.A.dylib                     0x000027da objc_msgSend + 18

1   UIKit                               0x0008cab4 -[UIViewController unloadViewForced:] + 132

2   UIKit                               0x0008ca22 -[UIViewController unloadViewIfReloadable] + 10

3   UIKit                               0x0008c9f2 -[UIViewController purgeMemoryForReason:] + 34

4   UIKit                               0x0008c896 -[UIViewController didReceiveMemoryWarning] + 10

5   My Application                      0x00023340 -[MailboxViewController didReceiveMemoryWarning] (MailboxViewController.m:359)

6   UIKit                               0x0008c880 -[UIViewController _didReceiveMemoryWarning:] + 8

As you can I see, my view controller "MailboxViewController" gets a "didReceiveMemoryWarning" message. Since that view doesn't have anything memory it can free really, I simply make a call to [super didReceiveMemoryWarning].

The strange thing is that I don't see a call to my view controller's viewDidUnload. It seems to crash with a "EXC_BAD_ACCESS (SIGSEGV)" before it even gets there.

What is going on and how can I fix it?

A: 

I guess it crashed at the time your controller unloading its view, so your viewDidUnload never get called. Is your view just some plain view or complex view? My guess is that it might have something to do with your view.

tia
I don't really have control over the OS unloading my view. It isn't anything unusual. Its a table view and also contains an array, a string, a date formatter, a managed object, a custom container object, a spinner widget and three other view controllers. I can't see why it would have trouble being unloaded.
Mike
A: 

Try debugging with Zombies enabled--it looks like a message is being sent to a deallocated object.

rpetrich