• 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
Re: Class gets EXC_BAD_ACCESS only as NSOperation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class gets EXC_BAD_ACCESS only as NSOperation


  • Subject: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • From: Bill Bumgarner <email@hidden>
  • Date: Tue, 24 Mar 2009 10:29:17 -0700

On Mar 24, 2009, at 9:49 AM, James Maxwell wrote:
Ah, thanks. That makes sense, and it seems to be correct - I am processing ***lots*** of data.

I just tried making the float arrays into instance variables, wrapped in NSData objects, and it still crashes, only a little later than before.
What's the best way of getting these arrays off the stack? I've got several thousand of them to get through!


thanks for your help.

There really isn't a need to use an NSData for the arrays of stuff.

If they are just temporary to the local scope, then declare a float * and malloc. You can still use your double-indexing to retrieve / set values.

Something like:

float *x = (float *) malloc(sizeof(float) * columns * rows);

Or you could stick the same as an instance variable.

If it is still crashing, it is now for a different reason. Most likely, memory corruption -- overrun a buffer somewhere?

b.bum

_______________________________________________

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: Class gets EXC_BAD_ACCESS only as NSOperation
      • From: Alexander Spohr <email@hidden>
References: 
 >Class gets EXC_BAD_ACCESS only as NSOperation (From: James Maxwell <email@hidden>)
 >Re: Class gets EXC_BAD_ACCESS only as NSOperation (From: Bill Bumgarner <email@hidden>)
 >Re: Class gets EXC_BAD_ACCESS only as NSOperation (From: James Maxwell <email@hidden>)
 >Re: Class gets EXC_BAD_ACCESS only as NSOperation (From: Bill Bumgarner <email@hidden>)
 >Re: Class gets EXC_BAD_ACCESS only as NSOperation (From: James Maxwell <email@hidden>)

  • Prev by Date: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • Next by Date: Re: Cocoa + XBee
  • Previous by thread: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • Next by thread: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • Index(es):
    • Date
    • Thread