• 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: Why does this keep sending EXC_BAD_ACCESS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does this keep sending EXC_BAD_ACCESS


  • Subject: Re: Why does this keep sending EXC_BAD_ACCESS
  • From: April Gendill <email@hidden>
  • Date: Tue, 30 Mar 2004 12:14:57 -0700

It means that your array is uninitalized.

Make sure that if the array is global it is declared some where in the header or above the implementation line in the class file.
NSMutableArray * serverWindows;

then in your init method:

serverWindows = [[NSMutableArray alloc]init];

If you are transfering data from a static array:

serverWindows = [[NSMutableArray alloc]initWithArray:otherArray];

or

[serverWindows setArray:otherArray];

Either way you have to make sure the array is initialized. Thats why it crashed at the NSLog line when you added it.

April.

On Mar 30, 2004, at 10:33 AM, Angel Caban wrote:

Hello,

Thank you for your suggestion.
I added the line but the program ended up crashing
on the NSLog line instead. But thank you for taking
the time to suggest that to me.

On Mar 30, 2004, at 12:27 PM, April Gendill wrote:

NSLog(@"Server windows count: %i",[serverWindows count]);
--



Angel Caban
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Why does this keep sending EXC_BAD_ACCESS
      • From: "M. Uli Kusterer" <email@hidden>
References: 
 >Why does this keep sending EXC_BAD_ACCESS (From: Angel Caban <email@hidden>)

  • Prev by Date: Re: classic floating window behavior?
  • Next by Date: Re: Distributed Objects pitfalls and strategies
  • Previous by thread: Re: Why does this keep sending EXC_BAD_ACCESS
  • Next by thread: Re: Why does this keep sending EXC_BAD_ACCESS
  • Index(es):
    • Date
    • Thread