• 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
NSMutableArray removeObject: crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMutableArray removeObject: crash


  • Subject: NSMutableArray removeObject: crash
  • From: Kevin Wojniak <email@hidden>
  • Date: Fri, 4 Apr 2008 16:08:18 -0400

I am getting a report of a crash with a stack trace ending like this:

0 libobjc.A.dylib 0x92d066f9 objc_msgSend + 41
1 com.apple.CoreFoundation 0x96d4b720 -[NSMutableArray removeObject:] + 96


Generally, when there are specifics like this I can fix the crash pretty easily. However, with this I'm stumped.

The code where it's crashing is very simple and looks like this:

- (void)handleNotification:(NSNotification *)notification
{
	id obj = [notification object];
	[_array removeObject:obj];
}

And it's being sent via a simple:

[[NSNotificationCenter defaultCenter] postNotificationName:someName object:self];

My guess is the notification object is corrupted (possibly deallocated?).


This is all happening on the main thread by the way.

Any advice would be appreciated.

Thanks,
Kevin
_______________________________________________

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: NSMutableArray removeObject: crash
      • From: Jens Alfke <email@hidden>
    • Re: NSMutableArray removeObject: crash
      • From: Peter Maurer <email@hidden>
    • Re: NSMutableArray removeObject: crash
      • From: "Hamish Allan" <email@hidden>
    • Re: NSMutableArray removeObject: crash
      • From: "Shawn Erickson" <email@hidden>
  • Prev by Date: Re: Apple support incidents
  • Next by Date: [moderator] Re: Apple support incidents
  • Previous by thread: Re: Apple support incidents
  • Next by thread: Re: NSMutableArray removeObject: crash
  • Index(es):
    • Date
    • Thread