5

I am currently getting this crash log in the console:

2011-08-23 19:18:40.064 App[1697:707] -[__NSCFData _isResizable]: unrecognized selector sent to instance 0x11f1c0
2011-08-23 19:18:40.075 App[1697:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFData _isResizable]: unrecognized selector sent to instance 0x11f1c0'

Does anyone know what this means? What could be the cause of it?

Thanks!

Tim Dean
  • 8,253
  • 2
  • 32
  • 59
SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191

2 Answers2

9

More likely than not, you've over-released some random object and, quite coincidentally, an instance of NSData (or CFData) has been allocated at the location of the now-gone object.

Run the Zombie detection instrument and see if that catches anything (search SO for NSZombie).

Alternatively, set a breakpoint on objc_exception_throw and that should show you where the message is being sent. That may not provide enough context, though.

bbum
  • 162,346
  • 23
  • 271
  • 359
1

You seem to be sending an invalid selector (isResizable) to an object, perhaps an NSData object? Do you have a stack trace to provide more information about where the crash is happening?

Tim Dean
  • 8,253
  • 2
  • 32
  • 59
  • I only use NSData in the view controller where the crash is once and that is not called on startup. The crash happens on startup. How would I get the stack trace? – SimplyKiwi Aug 23 '11 at 23:31
  • 1
    See [this older SO post](http://stackoverflow.com/questions/1093999/stack-trace-or-more-info-on-unhandled-exception-in-xcode-iphone/1094096#1094096), including the comments from Brad Larson if you want to do this in Xcode 4 – Tim Dean Aug 23 '11 at 23:43
  • 1
    run it in instruments with zombie detection enabled. instruments can record all the ref counts for objects, which reduces the time it takes to identify zombies/lifetimes/sources to about a minute once reproduced. – justin Aug 23 '11 at 23:46
  • the problem ended up being I was setting an NSData object to a UIImageView, stupid me! – SimplyKiwi Aug 24 '11 at 00:30