Crash with CoreData/bindings when binding across relationship then resetting the controller?
Crash with CoreData/bindings when binding across relationship then resetting the controller?
- Subject: Crash with CoreData/bindings when binding across relationship then resetting the controller?
- From: Jim Correia <email@hidden>
- Date: Thu, 23 Jun 2005 17:15:19 -0400
I have a CoreData/bindings application which has a master - detail -
detail interface. The data set is heterogenous, so the second detail
editor changes based on the selected objects in the first detail editor.
Since the second detail changes, there is an intermediate
NSObjectController (one for each different kind of detail editor)
which acts as a proxy for the selection. When clearing the content on
this controller (which was previously bound to a keypath that
traverses a CoreData relationship) via [controller setContent:
NSNotApplicableMarker] we crash calling CFRetain on NULL with the
following backtrace:
#0 0x9072cf24 in CFRetain
#1 0x929026c0 in _NSKeyValueObservationInfoCreateByRemoving
#2 0x92902498 in -[NSObject(NSKeyValueObserverRegistration)
_removeObserver:forProperty:]
#3 0x92902388 in -[NSObject(NSKeyValueObserverRegistration)
removeObserver:forKeyPath:]
#4 0x929022d8 in -[NSObject(NSKeyValueObserverRegistration)
removeObserver:forKeyPath:]
#5 0x9387f474 in -[_NSModelObservingTracker
_registerOrUnregister:observerNotificationsForModelObject:]
#6 0x93876f30 in -[_NSModelObservingTracker
clearAllModelObjectObserving]
#7 0x93b05954 in -[NSObjectController setContent:]
#8 0x00002950 in -[MyDocument detachController:] at MyDocument.m:38
Sample application:
http://homepage.mac.com/tmp/CoreDataBindingsRelationshipCrash.zip
To reproduce:
* Click Add.
* Click Attach Text Controller.
* Enter some content in the resume.
* Click Add.
* Click Detach Text Controller.
* Crash.
rdar://4159851
Comments? Semi-official workarounds?
Any help appreciated.
Best Regards,
Jim
_______________________________________________
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