> On Sep 19, 2015, at 8:09 PM, Alex Hall <[email protected]> wrote: > > Hey list, > A binding is driving my app (my actual one, not the test one) and has been > for days now--awesome! Amid more refactoring of my code, and adding a second > binding which didn't take because of uninitialized properties, I've now > started seeing this error in my debug log: > > [_NSControllerObjectProxy copyWithZone:]: unrecognized selector sent to > instance 0x608000000ae0 > > failed to set (contentViewController) user defined inspected property on > (NSWindow): -[_NSControllerObjectProxy copyWithZone:]: unrecognized selector > sent to instance 0x608000000ae0 > > From what I've been reading, this is due to something trying to copy an > object that doesn't conform to the NSCopy protocol. Most likely, I have a > proxy object somewhere Cocoa expects an instance, and since the proxy can't > be copied, this is happening. The problem is, I can't see *where* this is > going on. My debug log is showing me this, but my debug navigator is empty. > There's no runtime error showing in a source file like there is when the line > causing the problem is clear, and since I only have an address for the > instance and not a name, I'm at a bit of a loss. What is a good strategy for > discovering the source of this problem so I can fix it?
This is probably failing to crash because "unrecognized selector" throws an exception and the exception is being caught and ignored somewhere. If you can reproduce this yourself, try running with an Exceptions breakpoint set. That should stop in the debugger with the call site in the stack trace. (Breakpoints navigator > "+" button at the bottom > Add Exception Breakpoint) Another dumb alternative: implement -[_NSControllerObjectProxy copyWithZone:] to call abort() or otherwise halt the process. Then it will stop in the debugger or generate a crash log with a stack trace pointing to the call site. -- Greg Parker [email protected] Runtime Wrangler _______________________________________________ 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]
