On Aug 8, 2011, at 2:34 AM, Sanyam Jain wrote: > Thread 0 Crashed: Dispatch queue: com.apple.main-thread > 0 libobjc.A.dylib 0x92dd3eec objc_msgSend + 44
A crash in objc_msgsend means a message was sent to a bad object pointer. Usually this means the object has already been dealloced and so its memory is garbage. (You can read up on NSZombieEnabled in the docs, for a general technique to debug this.) > 2 com.apple.CoreFoundation 0x93c4e793 > __CFXNotificationPost + 947 > 3 com.apple.CoreFoundation 0x93c4e19a > _CFXNotificationPostNotification + 186 From this you can deduce that a notification is being delivered. So what’s going on is that one of your objects registered for NSNotifications, but forgot to remove itself as an observer in its -dealloc method, so the NSNotificationCenter still has a dangling pointer to it. > 11 com.apple.Foundation 0x918ad669 -[NSNotificationCenter > postNotificationName:object:] + 56 > 12 com.apple.AppKit 0x93ea151a -[NSTableView > _enableSelectionPostingAndPost] + 509 > 13 com.apple.AppKit 0x93eacc17 -[NSTableView > selectRowIndexes:byExtendingSelection:] + 168 …And from this, it looks like the notification is posted because a table view’s selection changed. From this you ought to be able to figure out what class the bug is in and fix it. The rule of thumb is that in ANY class where you register self as an observer with an NSNotificationCenter, you MUST remove self as an observer in the -dealloc method. —Jens
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com