NSTreeController woes... NSZombie at doc closed
NSTreeController woes... NSZombie at doc closed
- Subject: NSTreeController woes... NSZombie at doc closed
- From: Ken Victor <email@hidden>
- Date: Sun, 11 Jun 2006 19:20:24 -0700
one of the windows of my core data document app contains an
NSOutlineView bound with a NSTreeController. the basics work fine.
however, if i expand a row and then close the document, i get the
following stack trace:
#0 0x929ffbf8 in -[_NSZombie methodSignatureForSelector:]
#1 0x92925f04 in -[NSObject(NSForwardInvocation) forward::]
#2 0x90a430b0 in _objc_msgForward
#3 0x93c00afc in -[_NSArrayControllerTreeNode
observeValueForKeyPath:ofObject:change:context:]
#4 0x92940acc in -[NSObject(NSKeyValueObserverNotification)
didChangeValueForKey:]
#5 0x940b0760 in -[NSManagedObject didChangeValueForKey:]
#6 0x9409f26c in -[NSFaultHandler turnObject:intoFaultWithContext:]
#7 0x9409ef78 in -[NSManagedObjectContext(_NSInternalAdditions)
_disposeObjects:count:notifyParent:]
#8 0x9409eaf4 in -[NSManagedObjectContext(_NSInternalAdditions) _dispose:]
#9 0x9409e7e4 in -[NSManagedObjectContext dealloc]
#10 0x93c08458 in -[NSPersistentDocument setManagedObjectContext:]
#11 0x93c07fd0 in -[NSPersistentDocument dealloc]
#12 0x000ca5ec in -[KVDocument dealloc] at KVDocument.mm:253
#13 0x00003dc0 in -[KVSubDocDoc dealloc] at KVSubDoc Doc.mm:87
#14 0x93b98824 in -[_NSBindingInfo dealloc]
#15 0x907bf08c in __CFArrayReleaseValues
#16 0x907bedf8 in __CFArrayDeallocate
#17 0x907bbf34 in _CFRelease
#18 0x9390093c in -[NSBinder _dealloc]
#19 0x93b9f5d4 in -[NSObjectParameterBinder _dealloc]
#20 0x9390083c in -[NSBinder dealloc]
#21 0x9290e968 in NSPopAutoreleasePool
#22 0x936d70d4 in -[NSApplication run]
#23 0x937c7bfc in NSApplicationMain
#24 0x00003ac4 in main at main.m:12
and the following on the console log:
2006-06-11 18:50:03.677 Accounts[12130] *** Selector 'leafKeyPath'
sent to dealloced instance 0x1301670 of class NSTreeController.
Break at '-[_NSZombie methodSignatureForSelector:]' to debug.
2006-06-11 18:50:04.809 Accounts[12130] *** -[NSAutoreleasePool
dealloc]: Exception ignored while releasing an object in an
autorelease pool: *** Selector 'leafKeyPath' sent to dealloced
instance 0x1301670 of class NSTreeController.
Break at '-[_NSZombie methodSignatureForSelector:]' to debug.
note that everything close fine if i don't expand any rows while this
window is open.
also, by adding the following line of code to my NSWindowController's
subclass dealloc method, the problems also go away:
[[(KVWindow*)[self window] arrayController] setManagedObjectContext: nil];
(arrayController in my KVWindow class returns the NSTreeController
for the outline view)
this makes no sense to me!!! can anyone explain this or point me to
some documentation that might explain it.
thanx,
ken
ps. note that i set a breakpoint at -[NSManagedObject
didChangeValueForKey:] and in the debugger the NSManagedObject was
all zero for the above stack trace.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden