Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

track "message sent to deallocated instance" via instruments

In XCode 4.2, I need some help with Instruments to track down cause of EXC_BAD_ACCESS error. After enabling the NSZombie flag, I see the following on console when the app crashes on the device.

*** -[__NSArrayM removeObject:]: message sent to deallocated instance 0x8674e30

I used Instruments, but don't see the profile for Zombie. I used Allocations profile, but quickly got lost. I enabled ARC (in a hope to get rid of alloc/retain/release) for the app - but still have the same problem.

How do I use Instruments to track this down?

like image 472
Sam Avatar asked Dec 16 '22 07:12

Sam


1 Answers

Do you have any *UIScrollView*s in your view hierarchy and are you sending them messages like scrollToVisibleRect:animated:?

If so, try to pass NO for the animated parameter. It appears that iOS5 may have some issues with scroll views and embedded animations. The same exact crash you are seeing had been driving me crazy for a few days (with no call stack available) and I finally narrowed it down to the scroll view call. Hope it helps.

like image 102
Raffaello Colasante Avatar answered Dec 28 '22 08:12

Raffaello Colasante