简体   繁体   English

应用程序在模拟器上崩溃,但升级到狮子后在设备上运行正常

[英]App crashes on simulator but works fine in device after upgrading to lion

My app is working fine on simulator all the while until i upgraded to OS Lion & xcode Version 4.1. 在升级到OS Lion&xcode版本4.1之前,我的应用一直在模拟器上运行良好。

Now I got the error below. 现在我得到下面的错误。

EXC_BAD_ACCESS warning: Unable to restore previously selected frame. EXC_BAD_ACCESS警告:无法恢复先前选择的帧。

But It's working fine on iPhone. 但它在iPhone上运行良好。 Appreciate for any suggestion ... 感谢任何建议...

If you're getting an EXC_BAD_ACCESS error that means you're doing something wrong and dealing with either released or uninitialized objects. 如果收到EXC_BAD_ACCESS错误,则表示您做错了什么,正在处理已发布或未初始化的对象。 These errors don't always show up, and when they do, they show up well after the actual infraction. 这些错误并不总是会显示出来,当它们出现时,它们会在实际违规之后很好地显示出来。 My point is this, just because its working fine on the iPhone doesn't mean the error does not exist. 我的意思是,仅因为它在iPhone上正常工作并不意味着该错误不存在。

Try enabling NSZombieEnabled 尝试启用NSZombieEnabled

  1. You can do by clicking on 'Product' in the Xcode top bar. 您可以通过点击Xcode顶部栏中的“产品”来进行操作。
  2. Press the option key and click on run. 按选项键,然后单击运行。
  3. Under environment variables click + 在环境变量下,单击+
  4. Added NSZombieEnabled and set its value to YES 添加了NSZombieEnabled并将其值设置为YES

This should give you more details about the object you're trying to access and help you debug the issue. 这应该为您提供有关您尝试访问的对象的更多详细信息,并帮助您调试问题。

尝试进入模拟器上的键盘设置,然后关闭所有功能。

Did you uninstall Xcode via the command line before you installed the new version? 在安装新版本之前,是否通过命令行卸载了Xcode? This is a crucial step that many seem to be missing. 这是许多人似乎缺少的关键步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 应用程式在装置上当机,但在Simulator上运作正常 - App crashes on device, however works fine on Simulator Xamarin应用程序在设备启动时崩溃,在模拟器中运行良好 - Xamarin app crashes on startup on device, works fine in simulator 应用程序在模拟器上正常运行,但在设备上崩溃 - Application works fine on the simulator but crashes on the device MPMoviePlayer在设备中崩溃,但在模拟器中工作正常 - MPMoviePlayer crashes in device but works fine in simulator 应用程序在模拟器上工作正常但在设备上崩溃 - application works fine on simulator but crashes on device 使用XCode进行调试时,应用可以正常运行,在设备或模拟器上运行时,应用会崩溃 - When debugging with XCode, app works fine, when running it on device or simulator, app crashes 在设备上启动app的例外,在模拟器中工作正常 - Exception on app startup in device,works fine in simulator UIScrollView分页在模拟器中工作正常,但是15-20页后应用程序在设备中崩溃 - UIScrollView paging works fine in simulator but application crashes in device after 15-20 pages 应用在模拟器上崩溃。 适用于iPhone设备 - App crashes on simulator. Works on iphone device iPhone应用程序由于内存不足而崩溃,但在模拟器中可以正常使用 - iPhone App Crashes due to Low Memory but works fine in simulator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM