Reputation: 1345
I'm still in development with my app and each time I "run" the app it crashes one out of two times. When it crashes the app freezes on the splash page and this is the error I get:
Could it be something to do with the splash page? It's just so odd that the app crashes one out of two times. Anyone got any idea?
Upvotes: 1
Views: 117
Reputation: 4762
My standart debugging workflow - If error origin is unknown - comment out everything in AppDelegate methods - mainly in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
and in these also, if You have anything there:
- (void)applicationWillResignActive:(UIApplication *)application
- (void)applicationDidEnterBackground:(UIApplication *)application
- (void)applicationWillEnterForeground:(UIApplication *)application
- (void)applicationDidBecomeActive:(UIApplication *)application
Then - if You don't encounter crashing anymore, then start uncommenting stuff. Once You find a code line (or code block) that crashes, then look deeper in that.
Good luck!
Upvotes: 1
Reputation: 2226
If you're using slightly older tools it might be related to this:
http://www.tuaw.com/2013/06/05/devjuice-10-8-4-and-the-ios-simulator/
The issue occurs to a process race condition for debugserver. Instead of using GDB, you can alternatively kill your execution, wait a few seconds for the app to wrap up, and then run the next iteration.
The quick fix:
Update your scheme by selecting Product > Scheme > Edit Scheme, and choose the GDB debugger for your debug scheme.
But really you ought to just update your tools.
Upvotes: 1
Reputation: 1528
Add an exceptions breakpoint to see where in your code it is crashing: https://developer.apple.com/library/ios/recipes/xcode_help-breakpoint_navigator/articles/adding_an_exception_breakpoint.html
Upvotes: 0