• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
crash on altering NSMutableArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

crash on altering NSMutableArray


  • Subject: crash on altering NSMutableArray
  • From: James Maxwell <email@hidden>
  • Date: Sat, 1 May 2010 17:04:34 -0700

I'm having a crash when trying to remove the last item in an NSMutableArray.
The app is a pretty complex system, and runs its two main processes in consecutively executed blocks.
The blocks are run using dispatch_apply, on the global queue. The operation that's trying to
access the NSArray is, I think, within the first block... but honestly, I can't be totally sure, as
I don't know exactly why the app is crashing.
I guess what I'm wondering is whether there's some fool-proof way of protecting that NSArray from being read and changed simultaneously?
I tried making the array nonatomic, but that didn't solve the problem.
Of note is the fact that this is directly related to processing load, so I'm assuming it has to do
with some timing thing -- as the app gets more loaded down, things get sketchy.

I know this isn't a great description of the problem, but hopefully someone has some thoughts to share.

Thanks in advance,

J.



James B Maxwell
Composer/Doctoral Student
School for the Contemporary Arts (SCA)
School for Interactive Arts + Technology (SIAT)
Simon Fraser University
email@hidden
email@hidden

_______________________________________________

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

  • Follow-Ups:
    • Re: crash on altering NSMutableArray
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Matching the style of a HUD?
  • Next by Date: Re: crash on altering NSMutableArray
  • Previous by thread: Re: Matching the style of a HUD?
  • Next by thread: Re: crash on altering NSMutableArray
  • Index(es):
    • Date
    • Thread