Many thanks for the replies, much appreciated. >> The really strange thing is that my program has no control >> over that menu and has nothing to do with it - as I understand >> it, its population is all handled internally by NSDocumentController
> Have you tried with other NSDocument-based apps? Like TextEdit, or > something built from Xcode stationary? I can't repro in mine, but it > might be because I'm using GC. Yes, I've tried it with TextEdit, Pages and various others - it works fine. And I tried it with a test project. It's only my application that crashes; and even the 1.x version of my program worked fine, so presumably it's something I've changed in the past year or so as I've been working on the 2.0 version. >> So I turned on NSDebugEnabled, NSZombieEnabled and MallocStackLogging to find >> out what was getting over-released or accessed after being released. The >result >> was: >> >> *** -[NSMenuItem _bindingAdaptor]: message sent to deallocated instance >> 0x15c28bb0 > You should now run with the Allocations instrument so you can see what > is retaining and releasing the menu. Thanks! I just tried that but the menu item is created and destroyed by the AppKit as far as I can see. The offending object: objc[88279]: FREED(id): message _bindingAdaptor sent to freed object=0x1a4cccd0 Checking that object address in Instruments: #CategoryEvent TypeRefCtTimestampAddressSizeResponsible LibraryResponsible Caller 0NSMenuItemMalloc13059475443200x1a4cccd064AppKit-[NSMenu insertItemWithTitle:action:keyEquivalent:atIndex:] 1NSMenuItemFree03289974881280x1a4cccd0-64AppKit-[NSMenuItem dealloc] (Is there a way to check the specific object that's calling it? The above is the only information I could find running Allocations.) And then the backtrace indicates the AppKit calling on it again… Unless I'm misunderstanding something. And yet I must be doing something somewhere to be confusing the AppKit so that it calls on this menu item after it's gone. Thanks again and all the best, Keith _______________________________________________ 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