• 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
Re: Receiver type for instance message is a forward declaration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Receiver type for instance message is a forward declaration


  • Subject: Re: Receiver type for instance message is a forward declaration
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 10 May 2016 15:52:28 -0700
  • Feedback-id: 167118m:167118agrif8a:167118sbz7l15ghZ:SMTPCORP

On May 10, 2016, at 13:38 , Carl Hoefs <email@hidden> wrote:
>
> At last, it blew again!

Well, here’s the exception message:

> An -observeValueForKeyPath:ofObject:change:context: message was received but not handled.
> Key path: operations
> Observed object: <NSOperationQueue: 0x14eae190>{name = 'Upload Queue'}
> Change: {
>    kind = 1;
> }
> Context: 0x0


So, some object has established itself as an observer of changes to the “operations” property of the NSOperationQueue named “Upload Queue”, but has failed to act on the observed change. Since the message says “received but not handled”, the likelihood is that the observer object *has* a method named 'observeValueForKeyPath:ofObject:change:context:’ (or one of its superclasses does), and is invoking the ‘super’ method to pass the change upwards to an ancestor class, but nothing actually handles it.

The most likely cause is that the observer registered itself using ‘addObserver:forKeyPath:options:context:’ specifying a nil context, but is checking for a different context in 'observeValueForKeyPath:ofObject:change:context:’.

It’s also possible that the exception message means something more obscure, in which case the cause may be more complicated, but you should search your code for ‘addObserver’ and ‘observeValueForKeyPath’, and make sure that the context is set and checked consistently. (Your code should *never* use a nil context explicitly.)

_______________________________________________

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: Receiver type for instance message is a forward declaration
      • From: Carl Hoefs <email@hidden>
References: 
 >Receiver type for instance message is a forward declaration (From: Carl Hoefs <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Quincey Morris <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Carl Hoefs <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Carl Hoefs <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Quincey Morris <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: Receiver type for instance message is a forward declaration
  • Next by Date: presentationControllerForPresentedViewController(…) is called multiple times
  • Previous by thread: Re: Receiver type for instance message is a forward declaration
  • Next by thread: Re: Receiver type for instance message is a forward declaration
  • Index(es):
    • Date
    • Thread