• 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
KVO problems popping up in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KVO problems popping up in Leopard


  • Subject: KVO problems popping up in Leopard
  • From: "Doug Knowles" <email@hidden>
  • Date: Wed, 14 Nov 2007 22:01:53 -0500

Hi, all,

The app I've been working on is suddenly very broken under Leopard.  The
most severe problem right now occurs when I edit a column cell in an
NSOutlineView: on committing the changes, I get an EXC_BAD_ACCESS,
apparently related to a notification to the object whose value is being
edited.

The NSTreeController is in class mode, binding to "proxy" objects that I set
up between the controller and the underlying Core Data objects.  The error
occurs when I try to commit a change in a column bound to a property on the
proxy object; specifically, according to the stack trace, when attempting to
invoke "willChangeValueForKey:" for the modified property.  I've made
several changes to the code to try to clean it up and/or instrument it;
here's a current stack trace (annotated):

#0 0x92f646e8 in objc_msgSend
#1 0x94fac880 in NSKVOPendingNotificationCreate
#2 0x94f2958d in -[NSObject(NSKeyValueObserverNotification)
willChangeValueForKey:]
#3 0x000315e4 in -[ListViewItemProxy willChangeValueForKey:] at
ListViewItemProxy.m:487
   (this is an instrumentation method I added to figure out which property
is involved...)
#4 0x94fac2ed in _NSSetObjectValueAndNotify
#5 0x94f4e52e in -[NSObject(NSKeyValueCoding) setValue:forKey:]
#6 0x94fd23f1 in -[NSObject(NSKeyValueCoding) setValue:forKeyPath:]
#7 0x93d98b1c in -[NSTreeController
_setMultipleValue:forKeyPath:atIndexPath:]
#8 0x93a2da5b in -[NSBinder
_setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error:]
#9 0x93b407f9 in -[NSBinder setValue:forBinding:atIndexPath:error:]
#10 0x93a2d377 in -[_NSValueBinderPlugin
applyObjectValue:forBinding:operation:needToRunAlert:error:]
#11 0x93a2d1aa in -[NSValueBinder
_applyObjectValue:forBinding:canRecoverFromErrors:handleErrors:typeOfAlert:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:]
#12 0x93a2cea9 in -[NSValueBinder
applyDisplayedValueHandleErrors:typeOfAlert:canRecoverFromErrors:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:]
#13 0x93a2fbfd in -[NSValueBinder
_applyDisplayedValueIfHasUncommittedChangesWithHandleErrors:typeOfAlert:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:]
#14 0x93a2c78a in -[NSValueBinder
validateAndCommitValueInEditor:editingIsEnding:errorUserInterfaceHandled:]
#15 0x93a2c547 in -[_NSBindingAdaptor
_validateAndCommitValueInEditor:editingIsEnding:errorUserInterfaceHandled:bindingAdaptor:]
#16 0x93a2c436 in -[_NSBindingAdaptor
validateAndCommitValueInEditor:editingIsEnding:errorUserInterfaceHandled:]
#17 0x93d1279b in -[NSTableView textShouldEndEditing:]

I'm really stuck here; this is code that worked fine under Tiger.  Any
advice on how to debug this is more than welcome.
TIA,
Doug K;
_______________________________________________

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: KVO problems popping up in Leopard
      • From: David Spooner <email@hidden>
  • Prev by Date: Re: File system visiblilty
  • Next by Date: Re: How to get absolute x?
  • Previous by thread: Re: How to get x-coordinate?
  • Next by thread: Re: KVO problems popping up in Leopard
  • Index(es):
    • Date
    • Thread