开发者

Recieveing "EXC_BAD_ACCESS" before any UI elements load (on device only)

Everything works fine on开发者_如何学Python the simulator, but I gete EXC_BAD_ACCESS when I try to load my app on the device. I've put in a bunch of NSLogs to try and catch where it happens, but the log statements are never reached. Also, the UI doesn't load. So, seems the problem is happening before any of my code is reached. I tried a clean build, no luck. Also tried building and installing a different app, which works fine. So, looks like there's something wrong with my app, but it's something that happens before any of my code gets called. So, any ideas?


A couple of other things you might try:

  • ensure you are building for the device and then clean and rebuild (Build -> Clean All Targets)

  • quit Xcode, using the Finder delete the build directory from your application directory. Restart Xcode and rebuild for the device.


Maybe something is not connected properly in IB for the main window or view you first load upon launch.


If something runs on the simulator and not the device (or vice versa) the most common cause is library or other source that is complied for the wrong hardware. Since you crash is happening as the app loads, it's probably a library.

I've also seen this happen with corrupted resources such as images although that doesn't usually produce the simulator/device failure pattern.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜