EXC_BAD_ACCESS来自设备上的测试程序

时间:2011-03-10 12:04:06

标签: objective-c ios ipad

在模拟器中进行测试时效果非常好,而在设备中它会引发以下错误并发出警告

Current language:  auto; currently objective-c++
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
Program received signal:  “EXC_BAD_ACCESS”.

如何覆盖它

2 个答案:

答案 0 :(得分:2)

很难说为什么你在设备上得到错误而不是模拟器。至于您没有找到符号的警告,如果您按照此处的说明操作,则可以解决此问题:

libXcodeDebuggerSupport.dylib is missing in iOS 4.2.1 development SDK

具体地

cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols

ln -s ../../4.2\ \(8C134\)/Symbols/Developer/ Developer

Trinca(https://stackoverflow.com/users/529803/trinca)值得称赞。

回到您的问题,您可以阅读有关如何调试EXC_BAD_ACCESS的信息 http://www.codza.com/how-to-debug-exc_bad_access-on-iphone

您还应该启用Guard Malloc http://developer.apple.com/library/ios/#documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html (在EXC_BAD_ACCESS on device, but fine on Simulator发现)

谢谢Lou Franco - 我投了你的男人:) https://stackoverflow.com/users/3937/lou-franco

答案 1 :(得分:1)

这可能与已发布的对象或具有内存的内容有关。 检查你的程序iVars,其中一个在你使用它之前没有被保留或释放。