开发者

iPhone app crashes on device, File not found

I see this error

Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.2 (8H7)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).

I've tried this solu开发者_如何学Pythontion but it didn't work. Can someone help me how to fix this issue.


Since you're using a different SDK than the solution you pointed at, you do need to tweak the commands to make it right. It should fix itself if you do

cd "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.2 (8H7)/Symbols/"
sudo ln -s ../../Latest/Symbols/Developer
(enter your password at prompt)

Might not help your actual crash, but it should get rid of the file not found message.


I had a case where an app ran fine in the simulator but crashed unceremoniously on the device. After much head scratching I found that a coding error that seemed not to bother the simulator was the culprit. This is what the code looked like:

tile.frame = [[location objectAtIndex:i] CGPointValue];

Looks innocent, right? However, "location" is an NSMutableArray and, in this particular case, I was stuffing CGRect values into it, not CGPoint! For some reason this worked fine on the simulator. The app ran exactly as expected. However, as I mentioned, the device did not like it. After editing the above line of code to:

tile.frame = [[location objectAtIndex:i] CGRectValue];

...everyone was happy.

What happened was that I was originally using CGPoint values in that array but later changed my approach and switched to CGRect. As I made the changes I missed one line. The simulator did not throw up at this, which still surprises me.

If you recently made changes comb through the code and see if you forgot to update something like this. Also, if you are using version control, roll back until you find a version that worked. That's how I discovered it. Then pepper your code with NSLog statements (or use breakpoints) to find out where it is crashing. Hopefully it will be obvious once you get close to the area causing the crash.


I just tried this after installing the latest 4.3 beta2 and apparently Apple now includes the symbols folders

CliffMac:DeviceSupport cliff$ cd 4.3.2\ \(8H8\)/Symbols/
CliffMac:Symbols cliff$ ls
Developer   System      usr
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜