[英]Getting irrelevant errors when orientation changes in iOS 7
在我的iPad應用程序中,我有一個包含多個部分和行的表。 當我將方向從橫向更改為縱向或從縱向更改為橫向時,我會收到以下錯誤之一:
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'
我沒有明確地使用任何拋出異常的類。
編輯:使用儀器,我發現這是發生崩潰的地方。 我之前沒有用過,所以我不知道該怎么做。
# Event Type ∆ RefCt RefCt Timestamp Responsible Library Responsible Caller
2 Zombie -1 00:38.935.631 UIKit -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:]
當您發現無法識別的選擇器消息發送到您不直接使用的類的對象時,答案通常是您的目標對象已意外釋放,並且內存重新用於出現在錯誤消息中的對象。
你最好的辦法是打開你的方案中的僵屍,看看哪些已發布的對象正在發送消息。 或者,您可以通過確定應該接收消息的對象以及發生了什么來嘗試跟蹤它。 (顯然,當可能時,第一個更容易。)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.