> On May 10, 2016, at 4:55 PM, Carl Hoefs <newsli...@autonomy.caltech.edu> 
> wrote:
> 
> 
>> On May 10, 2016, at 4:39 PM, Quincey Morris 
>> <quinceymor...@rivergatesoftware.com> wrote:
>> 
>> On May 10, 2016, at 16:22 , Carl Hoefs <newsli...@autonomy.caltech.edu 
>> <mailto:newsli...@autonomy.caltech.edu>> 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) 

2016-05-10 16:58:36.066 iApp[2549:2131821] *** Terminating app due to uncaught 
exception 'NSInternalInconsistencyException', reason: '(
    "<UITextTapRecognizer: 0x175bb470; state = Possible; delaysTouchesEnded = 
NO; view = <UITextField 0x175b3410>; target= <(action=oneFingerDoubleTap:, 
target=<UITextInteractionAssistant 0x175bb3f0>)>; numberOfTapsRequired = 2>",
    "<UITapAndAHalfRecognizer: 0x175bb810; state = Possible; view = 
<UITextField 0x175b3410>; target= <(action=tapAndAHalf:, 
target=<UITextInteractionAssistant 0x175bb3f0>)>>",
    "<UITextTapRecognizer: 0x176c9d90; state = Possible; delaysTouchesEnded = 
NO; view = <UITextField 0x175b3410>; target= <(action=oneFingerTap:, 
target=<UITextInteractionAssistant 0x175bb3f0>)>>",
    "<UIVariableDelayLoupeGesture: 0x175bbce0; state = Possible; 
delaysTouchesEnded = NO; view = <UITextField 0x175b3410>; target= 
<(action=loupeGesture:, target=<UITextInteractionAssistant 0x175bb3f0>)>>"
): An -observeValueForKeyPath:ofObject:change:context: message was received but 
not handled.
Key path: operations
Observed object: <NSOperationQueue: 0x175464f0>{name = 'Upload Queue'}
Change: {
    kind = 1;
}
Context: 0x1c7bb0'
*** First throw call stack:
(0x20d19b8b 0x204d6dff 0x20d19ad1 0x2151cd7d 0x214a3d81 0x21482fe3 0x21482c3b 
0x2151e311 0x214822d1 0x2152f761 0xf89b5 0x25322521 0x253224b1 0x2530a3eb 
0x25321dd1 0x25321a3f 0x2531a3c7 0x252eac85 0x252e9229 0x20cdba67 0x20cdb657 
0x20cd99bf 0x20c28289 0x20c2807d 0x22244af9 0x253532c5 0x1146c7 0x208d4873)
libc++abi.dylib: terminating with uncaught exception of type NSException

BTW, if I remove the addObserver code, this doesn't happen.
-Carl


_______________________________________________

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

This email sent to arch...@mail-archive.com

Reply via email to