unrecognized selector sent to instance - i have no selector named that

132 Views Asked by At

Yes, one more of these, but this one makes no sense. It claims that: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIRoundedRectButton astroidImage]: unrecognized selector sent to instance 0x15a2a0'

And it happens at the exact start of the application, and the weird thing is, this app worked fine yesterday, but when i tried this morning, it went to shit. Funny thing is though, i have no UIRoundedRect that i have set to call a method named astroidImage, as astroidImage is a property in another class. So what on earth is going on here?

2

There are 2 best solutions below

0
On

You probably have an over-release or dangling observer -- Run with Zombies.

You're likely messaging an instance that has been destroyed (while holding an invalid reference to it), but a separate instance has been allocated at the same address since the previous one at that address was destroyed.

0
On

the object that does have the selector astroidImage has been released, you meant to hold on to it but got it wrong somewhere.