Re: NSMutableArray contract
Re: NSMutableArray contract
- Subject: Re: NSMutableArray contract
- From: "Hank Heijink (Mailinglists)" <email@hidden>
- Date: Fri, 01 Apr 2011 09:56:30 -0400
On Apr 1, 2011, at 9:49 AM, Carlos Eduardo Mello wrote:
> The objects in this array are the main thing in my app. Various parts of the UI direct actions to each one of them, when they are selected (only one at a time). The objects contain a path which is drawn and used for hit detection and dragging. Drag actions incur in changes in the object's associated data. It all works fine most of the time, but every once in a while (can't figure out why...) the object seems to be "pulled from under my feet" and I get BAD ACCESS crashes in apparently random places. I tried to debug it but the BAD ACCESS only happens after my code yelds control to system code. So I figured I mut be somehow misusing some NS classes...
Have you tried running your app in Instruments with the Zombies template? It does sound like you're corrupting the memory somewhere, and that usually causes a crash in a completely unrelated spot.
If you're REALLY lucky, the static analyzer might help you too, although that usually only catches the obvious ones.
Hank
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden