• 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
How to debug over-release of private Cocoa object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to debug over-release of private Cocoa object?
      • From: Graham Cox <email@hidden>
    • Re: How to debug over-release of private Cocoa object?
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: [SOLVED]Re: Overcoming crappiness of NSSplitView - what's the magic?
  • Next by Date: Re: How to debug over-release of private Cocoa object?
  • Previous by thread: Making a control with multiple cells
  • Next by thread: Re: How to debug over-release of private Cocoa object?
  • Index(es):
    • Date
    • Thread