• 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: James Maxwell <email@hidden>
  • Date: Tue, 24 Mar 2009 09:51:30 -0700

okay, thanks for the tip, Sean. I'll double-check my use of ints in these cases.

On 24-Mar-09, at 9:39 AM, Sean McBride wrote:

On 3/24/09 8:22 AM, James Maxwell said:

	NSArray *pitchSlices = [[self MIDITrainingData] objectAtIndex:0];
	NSArray *rhythmSlices = [[self MIDITrainingData] objectAtIndex:1];
	int sliceCount = [pitchSlices count];

	float midiEventsToHTM[sliceCount][20];
	float rhythmEventsToHTM[sliceCount][20];
	int i,j,k;
	for(i=0;i < sliceCount;i++)
	{
		for(j=0;j < 10;j++)
		{

Another minor comment: you should probably use 'unsigned int' (or NSUInteger) not 'int' for values like that that are never negative. Note for example that 'count' returns an unsigned value, and 'objectAtIndex:' expects an unsigned value.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

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


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: "Sean McBride" <email@hidden>)

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