iOS 9.x, Xcode 7.1.
I'm sitting in the middle of the debugger, looking at some code I inherited and
in a regular service, BLAM, EXC_BAD_ACCESS.
This code uses ivars that are named the same as the properties :/ and what I
noticed, we have this statement where the bad access is appearing:
if ( [myIVar respondsToSelector:@selector(someMethod)] {
EXC_BAD_ACCESS (code=1, address=0x143545358)
I did a po on myiVar and I get an address or 0x000000014f05ee00
I'd expect that the bad access would be of the iVar, yet the addresses are
different. Is this a red herring?
Also, I'd prefer to use the property not the iVar as I've found these much
safer in the past for accessing internal objects without causing access issues.
Am I correct here?
This is a wonderful race condition that is hard to reproduce. I'd like to get
some professional opinions on my assumptions and approach before I leave the
debugger.
Thanks in advance for any pointers, dereferenced or not (humor intended).
Alex Zavatone
_______________________________________________
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]