In my iPad app, I have a table with multiple sections and rows. When I change the orientation from landscape to portrait or from portrait to landscape, I get one of the following errors:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[WebScriptObjectPrivate countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x124a15a0'
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DOMHTMLHeadElement rotatingClient]: unrecognized selector sent to instance 0x8c60a20'
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x8f7c380'
I'm not explicitly using any of the classes from which the exceptions are thrown.
EDIT: Using Instruments, I found that this is where the crash happens. I haven't used it before so I'm not sure what to do with it.
# Event Type ∆ RefCt RefCt Timestamp Responsible Library Responsible Caller
2 Zombie -1 00:38.935.631 UIKit -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:]
When you get unrecognized selector messages sent to objects of classes you don't use directly, the answer is usually that your target objects have been released unexpectedly and the memory re-used for the objects that appear in the error message.
Your best bet is to turn on zombies in your scheme and see which released objects are being sent messages. Or, you can try to track it down by figuring out what object should be receiving the message and what has happened to it. (Obviously, the first is easier when it's possible.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With