在模拟器中测试时,效果很好,而在设备中测试时,出现以下错误和警告
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”.
请问如何改写
最佳答案
很难说为什么在设备上而不是模拟器上出现错误。至于您没有找到该符号的警告,可以按照以下说明解决:
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找到了)
谢谢楼弗朗哥-我给你投了赞成票:)
https://stackoverflow.com/users/3937/lou-franco
关于objective-c - 来自设备上的测试程序的EXC_BAD_ACCESS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5259348/