> On May 10, 2016, at 4:39 PM, Quincey Morris 
> <[email protected]> wrote:
> 
> On May 10, 2016, at 16:22 , Carl Hoefs <[email protected] 
> <mailto:[email protected]>> wrote:
>> 
>> I will set 'context' and use it in my check instead.
> 
> Yup, use the context to decide whether to call super *and return* but nothing 
> else. Once you get past that check, don’t call super.
> 
>>  It appears that for some odd reason, once in a blue moon, 'object' and 
>> 'keyPath' aren't what they're supposed to be,
> 
> It’s not odd, if they’re the object and keyPath of a different observation 
> registered by a superclass of your class. You’ve proved it happens!
> 

Now that I've changed things over to use the context value, I get this at the 
moment I add an NSOperation to the NSOperationQueue:

    [uploadQueue addOperation:opn]; <-- Thread 1, EXC_BAD_ADDRESS (code=1, 
address=0xc)

(lldb) po uploadQueue
<NSOperationQueue: 0x17e76d20>{name = 'Upload Queue'}

(lldb) po opn
<NSInvocationOperation: 0x17de5890>

(lldb) bt
* thread #1: tid = 0x207807, 0x204e3a86 libobjc.A.dylib`objc_msgSend + 6, stop 
reason = EXC_BAD_ACCESS (code=1, address=0xc)
    frame #0: 0x204e3a86 libobjc.A.dylib`objc_msgSend + 6
    frame #1: 0x2151e27e Foundation`-[NSObject(NSKeyValueObservingPrivate) 
_changeValueForKeys:count:maybeOldValuesDict:usingBlock:] + 278
    frame #2: 0x214822d0 Foundation`-[NSObject(NSKeyValueObservingPrivate) 
_changeValueForKey:key:key:usingBlock:] + 68
    frame #3: 0x2152f760 Foundation`__addOperations + 1528
  * frame #4: 0x000ac9b4 iApp`-[AppSetupConfigViewController 
saveAppSettings:](self=0x17ed4e20, _cmd="saveAppSettings:", sender=0x17ed2200) 
+ 5776 at AppSetupConfigViewController.m:275
    frame #5: 0x25322520 UIKit`-[UIApplication sendAction:to:from:forEvent:] + 
80
    frame #6: 0x253224b0 UIKit`-[UIControl sendAction:to:forEvent:] + 64
    frame #7: 0x2530a3ea UIKit`-[UIControl _sendActionsForEvents:withEvent:] + 
466
    frame #8: 0x25321dd0 UIKit`-[UIControl touchesEnded:withEvent:] + 616
    frame #9: 0x25321a3e UIKit`-[UIWindow _sendTouchesForEvent:] + 646
    frame #10: 0x2531a3c6 UIKit`-[UIWindow sendEvent:] + 642
    frame #11: 0x252eac84 UIKit`-[UIApplication sendEvent:] + 204
    frame #12: 0x252e9228 UIKit`_UIApplicationHandleEventQueue + 5016
    frame #13: 0x20cdba66 
CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
    frame #14: 0x20cdb656 CoreFoundation`__CFRunLoopDoSources0 + 454
    frame #15: 0x20cd99be CoreFoundation`__CFRunLoopRun + 806
    frame #16: 0x20c28288 CoreFoundation`CFRunLoopRunSpecific + 516
    frame #17: 0x20c2807c CoreFoundation`CFRunLoopRunInMode + 108
    frame #18: 0x22244af8 GraphicsServices`GSEventRunModal + 160
    frame #19: 0x253532c4 UIKit`UIApplicationMain + 144
    frame #20: 0x000c86c6 iApp`main(argc=1, argv=0x00327bd4) + 122 at main.m:14
(lldb) 

-Carl

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to