How to debug over-release of private Cocoa object?
How to debug over-release of private Cocoa object?
- Subject: How to debug over-release of private Cocoa object?
- From: Graham Cox <email@hidden>
- Date: Wed, 16 Sep 2009 11:54:14 +1000
I'm getting a crash when my undo manager starts to discard tasks once
the undo levels are exceeded. It's an over-release of an object called
a _NSUndoBeginMark which is private to Cocoa. I'm not sure how I
should go looking for the source of the problem - it occurs after
repeatedly performing some text editing using a NSTextView.
#0 0x95eebd27 in ___forwarding___
#1 0x95eebbf2 in __forwarding_prep_0___
#2 0x96182052 in -[_NSUndoStack _removeBottom]
#3 0x9605adde in -[_NSUndoStack markEnd]
#4 0x9605acf9 in -[NSUndoManager _endUndoGroupRemovingIfEmpty:]
#5 0x9605ab39 in -[NSUndoManager endUndoGrouping]
#6 0x004077b8 in -[DKUndoManager endUndoGrouping] at DKUndoManager.m:150
#7 0x9601d01b in +[NSUndoManager(NSPrivate) _endTopLevelGroupings]
#8 0x902f7725 in -[NSApplication run]
#9 0x902ef735 in NSApplicationMain
#10 0x0010048c in main at main.m:14
2009-09-16 11:44:29.904 Ortelius[20842:90b] *** -[_NSUndoBeginMark
isBeginMark]: message sent to deallocated instance 0x15031db0
While I am subclassing NSUndoManager in this case it's not doing
anything special - endUndoGrouping just calls super. However I would
be prepared to believe that something in the creation of the undo task
is wrong where a bit more work is being done in my subclass, like
coalescing identical consecutive tasks into one.
Any pointers on how I might debug this?
--Graham
_______________________________________________
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