• 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: NSArray EXEC_BAD_ACCESS when initalized with strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArray EXEC_BAD_ACCESS when initalized with strings


  • Subject: Re: NSArray EXEC_BAD_ACCESS when initalized with strings
  • From: Devraj Mukherjee <email@hidden>
  • Date: Wed, 9 Sep 2009 15:28:10 +1000

Thanks all.

Turns out that another Array initalization didn't have a ,nil at the
end and it was causing the issues.


On Wed, Sep 9, 2009 at 1:45 PM, Steven Degutis<email@hidden> wrote:
> For some reason, I really doubt that the creation of the NSArray is causing
> this exception. Have you run this through the debugger and verified this is
> the exact line that throws the exception? And is that the exact line of
> code?
> --
> Steven Degutis
> http://www.thoughtfultree.com/
> http://www.degutis.org/
>
> On Tue, Sep 8, 2009 at 10:13 PM, Devraj Mukherjee <email@hidden> wrote:
>>
>> Hi all,
>>
>> I have two arrays initalized as follows, the first works fine and I
>> can work with elements in the Array
>>
>> NSArray *majorScaleQuestions = [[NSArray alloc] initWithObjects:@"1",
>> @"2", @"b3", @"3", @"4", @"5", @"b6", @"6", @"7", nil];
>>
>> the second throws up an EXEC_BAD_ACCESS and the application obviously
>> stops
>>
>> NSArray *newToneNotes = [[NSArray alloc] initWithObjects:@"C", @"C#",
>> @"D", @"D#", @"E", @"F", @"F#", @"G", @"G#", @"A", @"A#", @"B", nil];
>>
>> if the same array is initalized as
>>
>> NSArray *newToneNotes = [[NSArray alloc] initWithObjects:@"C", @"C#",
>> @"D", nil];
>>
>> the applications starts up, but if I add @"D#" and initalize it as follows
>>
>> NSArray *newToneNotes = [[NSArray alloc] initWithObjects:@"C", @"C#",
>> @"D", @"D#", nil];
>>
>> it fails. Can anyone see what I might be doing wrong?
>>
>> Thanks.
>>
>> --
>> "The secret impresses no-one, the trick you use it for is everything"
>> - Alfred Borden (The Prestiege)
>> _______________________________________________
>>
>> 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
>
>
>
>



--
"The secret impresses no-one, the trick you use it for is everything"
- Alfred Borden (The Prestiege)
_______________________________________________

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: NSArray EXEC_BAD_ACCESS when initalized with strings
      • From: Dave Keck <email@hidden>
References: 
 >NSArray EXEC_BAD_ACCESS when initalized with strings (From: Devraj Mukherjee <email@hidden>)
 >Re: NSArray EXEC_BAD_ACCESS when initalized with strings (From: Steven Degutis <email@hidden>)

  • Prev by Date: Snow Leopard Documentation in Spotlight
  • Next by Date: Re: [[NSHost currentHost] name] blocking on 10.6 ?
  • Previous by thread: Re: NSArray EXEC_BAD_ACCESS when initalized with strings
  • Next by thread: Re: NSArray EXEC_BAD_ACCESS when initalized with strings
  • Index(es):
    • Date
    • Thread