iPhone app crashes on device, File not found

后端 未结 3 1553
既然无缘
既然无缘 2021-01-22 03:38

I see this error

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

相关标签:
3条回答
  • 2021-01-22 04:28

    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.

    0 讨论(0)
  • 2021-01-22 04:29

    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 讨论(0)
  • 2021-01-22 04:38

    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.

    0 讨论(0)
提交回复
热议问题