Unexplainable segmentation fault on iphone
I'm having this very disturbing problem when running our app in the device. Everything goes fine with the Debug scheme but with the Distribution profile (the one with the AdHoc certificate for code signing) the app crashes and the only error I get in the device's login this one:
Tue Oct 4 10:49:44 unknown com.apple.debugserver-48[670] <Warning>: 21 [029e/0803]: RNBRunLoopLaunchInferior DNBProcessLaunch() returned error: 'DRHT'
Tue Oct 4 10:49:44 unknown com.apple.debugserver-48[670] <Warning>: error: failed to launch process (null): failed to get the task for process 672
Tue Oct 4 10:49:44 unknown com.apple.debugserver-48[670] <Warning>: 22 [029e/1403]: error: ::read ( 4, 0x2fee59f0, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Tue Oct 4 10:49:44 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.oos.kraken[0x3f17]) Bug: launchd_core_logic.c:3252 (24226):3
Tue Oct 4 10:49:44 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.oos.kraken[0x3f17]) Bug: launchd_core_logic.c:2681 (24226):10
Tue Oct 4 10:49:44 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.oos.kraken[0x3f17]) Working around 5020256. Assuming the job crashed.
Tue Oct 4 10:49:44 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.oos.kraken[0x3f17]) Job appears to have crashed: Segmentation fault
Tue Oct 4 10:49:44 unknown SpringBoard[24] <Warning>: Application '11870.com' exited abnormally with signal 11: Segmentation fault
I'm really lost and have no idea of what can be happening. What doe开发者_StackOverflow社区s it mean by " APPEARS to have crashed" doesn't it know when there is a problem with an app?
Anybody came across this problem before? I am using xcode 4 and the device is an iphone 3G although it also happens in an iphone 4.
PD: I've tried Zombies with no luck.
In the end, the solution was to restart the iPhone, since some data got corrupted. After the reboot everything was working normally.
Should have thought of the classic "Have you tried turning it off and on again?"
I had a similar segmentation fault when installing an ad-hoc build onto an iPad 1 running 5.1.1. Turns out you can't install an ad-hoc build on anything before iOS6 that includes Arm64. I removed Arm64 from "Valid Architectures", rebuilt, and the ad-hoc build then installs fine on the iPad 1.
I ran into similar seemingly random crashes, esp. on an 3G test device. The app worked just fine in debug mode, however the crashes started to appear in adhoc builds.
The "solution" in my case was to disable most, if not all, compiler optimizations for the release/adhoc builds.
精彩评论