NSMutableArray removeObject: crash
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