Getting irrelevant errors when changing orientation in iOS 7

In my iPad app, I have a table with several 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 am not explicitly using any of the classes that throw exceptions.

EDIT: Using the "Tools", I found that it was here that the accident occurred. I have not 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:] 
+6
source share
1 answer

When you receive unrecognized selector messages sent to class objects that you don’t use directly, usually the answer is that your targets were unexpectedly released and memory was reused for objects that appear in the error message.

It’s best to include zombies in your circuit and see which released objects are being sent messages. Or you can try to track it by finding out which object should receive the message and what happened to it. (Obviously, the first is easier when possible.)

+3
source

Source: https://habr.com/ru/post/971093/


All Articles