Swapping UIImages causing 'unrecognized selector sent to instance' ?

Posted by user158103 on Stack Overflow See other posts from Stack Overflow or by user158103
Published on 2009-09-30T14:46:14Z Indexed on 2010/04/13 0:02 UTC
Read the original article Hit count: 285

Filed under:
|

Error: [__NSCFDate drawAtPoint:]: unrecognized selector sent to instance 0xd251e0 Termininating app due to uncaught exception 'NSInvalidArgumentException'

Scenario: for the most part this works. But I notice this error, even on the simulator, when I swapping UIImages, slowly, but consistently.

For example, I have a retained reference to a UIImage that im drawing. By the click of a picker control I am changing the face image (this occurs in another view-controller).

I can consistently recreate this error by continuously changing the faces. It usually crashes at about the 4th swap or more.

My theory: It's not loading the image, therefore the image reference is nil. I know ive read a bit about UIImage being cached, so I wouldnt think im running out of memory.

Any ideas? Thanks!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uiimage