In a Core Data-based app that works fine in 10.5.x, I now get an
exception as follows in 10.6 when opening a document.  It targets
10.5, and the same exception occurs when rebuilding on 10.6 (still
targeting 10.5, but also when targeting 10.6).

I don't register or unregister any observers myself, and the exception
occurs without touching any of my code.  What's going on?


NSRangeException: Cannot remove an observer <NSKeyValueObservance
0x15476c0> for the key path "richText" from <TextEntity 0x1546380>
because it is not registered as an observer.
1 +[NSException raise:format:arguments:] (in CoreFoundation) + 136
     2  +[NSException raise:format:] (in CoreFoundation) + 58
     3  -[NSObject(NSKeyValueObserverRegistration)
_removeObserver:forProperty:] (in Foundation) + 765
     4  -[NSObject(NSKeyValueObserverRegistration)
removeObserver:forKeyPath:] (in Foundation) + 176
     5  -[NSKeyValueNestedProperty
object:didRemoveObservance:recurse:] (in Foundation) + 544
     6  -[NSObject(NSKeyValueObserverRegistration)
_removeObserver:forProperty:] (in Foundation) + 453
     7  -[NSObject(NSKeyValueObserverRegistration)
removeObserver:forKeyPath:] (in Foundation) + 176
     8  -[_NSModelObservingTracker
_registerOrUnregister:observerNotificationsForModelObject:] (in
AppKit) + 228
     9  -[_NSModelObservingTracker clearAllModelObjectObserving] (in
AppKit) + 341
    10  -[_NSModelObservingTracker
setIndexReferenceModelObjectArray:clearAllModelObjectObserving:] (in
AppKit) + 51
    11  -[NSArrayController _setObjects:] (in AppKit) + 196
    12  -[NSArrayController
_arrangeObjectsWithSelectedObjects:avoidsEmptySelection:operationsMask:useBasis
:] (in AppKit) + 510
    13  -[NSArrayController rearrangeObjects] (in AppKit) + 133
    14  -[NSArrayController
observeValueForKeyPath:ofObject:change:context:] (in AppKit) + 338
    15  NSKeyValueDidChange (in Foundation) + 377
    16  -[NSObject(NSKeyValueObservingPrivate)
_didChangeValuesForKeys:] (in Foundation) + 565
    17  _PFFaultHandlerFulfillFault (in CoreData) + 1921
    18  _PFFaultHandlerLookupRow (in CoreData) + 1573
    19  -[NSFaultHandler fulfillFault:withContext:] (in CoreData) + 39
    20  _PF_FulfillDeferredFault (in CoreData) + 193
    21  _sharedIMPL_pvfk_core (in CoreData) + 65
    22  -[NSManagedObject(_PFDynamicAccessorsAndPropertySupport)
_genericValueForKey:withIndex:flags:] (in CoreData) + 79
    23  -[NSManagedObject valueForKey:] (in CoreData) + 244
    24  -[NSKeyValueNestedProperty object:didAddObservance:recurse:]
(in Foundation) + 240
    25  -[NSObject(NSKeyValueObserverRegistration)
_addObserver:forProperty:options:context:] (in Foundation) + 812
    26  -[NSObject(NSKeyValueObserverRegistration)
addObserver:forKeyPath:options:context:] (in Foundation) + 565
    27  -[_NSModelObservingTracker
_registerOrUnregister:observerNotificationsForKeyPath:ofModelObject:]
(in AppKit) + 134
    28  -[_NSModelObservingTracker
_registerOrUnregister:observerNotificationsForModelObject:] (in
AppKit) + 228
    29  -[_NSModelObservingTracker _startObservingModelObject:] (in
AppKit) + 418
    30  -[_NSModelObservingTracker
startObservingModelObjectsAtReferenceIndexes:] (in AppKit) + 333
    31  -[NSArrayController
_arrangeObjectsWithSelectedObjects:avoidsEmptySelection:operationsMask:useBasis
:] (in AppKit) + 510
    32  -[NSArrayController setContent:] (in AppKit) + 889
    33  -[NSArrayController(NSManagedController)
_performFetchWithRequest:merge:error:] (in AppKit) + 501
    34  -[NSObjectController(NSManagedController)
fetchWithRequest:merge:error:] (in AppKit) + 209
    35  -[NSObjectController(NSManagedController)
_executeFetch:didCommitSuccessfully:actionSender:] (in AppKit) + 106
    36  _NSSendCommitEditingSelector (in AppKit) + 339
    37  -[NSController _controllerEditor:didCommit:contextInfo:] (in
AppKit) + 216
    38  __invoking___ (in CoreFoundation) + 29
    39  -[NSInvocation invoke] (in CoreFoundation) + 136
    40  -[NSInvocation invokeWithTarget:] (in CoreFoundation) + 72
    41  __NSFireDelayedPerform (in Foundation) + 537
    42  __CFRunLoopRun (in CoreFoundation) + 6846

Hard to say without more details, but it does look like a Cocoa Bindings bug. If you could create a new sample project with your NIB and your model and reproduce this, and then attach it to a bug report, that would be extremely helpful.

Thanks,

- Ben



_______________________________________________

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

Reply via email to