1

My app crashes on launch with the following SIGBART :

@autoreleasepool {
    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

The code is pulled from a git repository and works on other computers.

I tried reinstalling xcode 4.2 to no avail.
This is for ios 5.0

user1082013
  • 63
  • 2
  • 7

1 Answers1

1

That line isn't throwing the exceprion. To find out which line causes the crash you should look at Exception Breakpoints. Usually you want to add an exception throw Breakpoint to see which line threw the exception. More details in this answer: Xcode doesn't show the line that causes a crash

You should also always scan your code for errors and post some code! If you don't post code, most of the times nobody will be able to help you, especially when the problem is a code related crash.

Community
  • 1
  • 1
JonasG
  • 9,274
  • 12
  • 59
  • 88
  • but this isn't a code related crash. the code works fine on two other computers. There is no code i can post. I have thrown in some exception breakpoints. They dont help, unless i am using them incorrectly – user1082013 Jan 26 '12 at 20:24
  • GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin".Attaching to process 2206. – user1082013 Jan 26 '12 at 20:26
  • Pending breakpoint 1 - "objc_exception_throw" resolved sharedlibrary apply-load-rules all Error in re-setting breakpoint 1: Catchpoint 2 (throw)Error in re-setting breakpoint 1: Error in re-setting breakpoint 1: Current language: auto; currently objective-c Single stepping until exit from function objc_exception_throw, which has no line number information. Catchpoint 2 (exception thrown).(gdb) – user1082013 Jan 26 '12 at 20:26
  • The above is all i get in the debugger – user1082013 Jan 26 '12 at 20:26
  • there is definitely an exception thrown from the code. With the exception breakpoint enabled there should be a line highlighted green, post that code! – JonasG Jan 26 '12 at 20:51
  • ok so now the problem is different. It gets passed the appdelegate but doesnt recognize the root view controller. " Applications are expected to have a root view controller at the end of application launch" – user1082013 Jan 27 '12 at 00:35
  • here is the code in the appDelegate that clearly sets up the rootViewController, which again works on other computers – user1082013 Jan 27 '12 at 00:36
  • - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. MainViewController *controller = [[MainViewController alloc] init]; controller.title = @"Enfomo?"; self.navigationController = [[UINavigationController alloc] initWithRootViewController:controller]; – user1082013 Jan 27 '12 at 00:37
  • #if EXPERIEMENTAL_ORIENTATION_SUPPORT UINavigationController *container = [[UINavigationController alloc] init]; [container setNavigationBarHidden:YES animated:NO]; [container setViewControllers:[NSArray arrayWithObject:navController] animated:NO]; self.window.rootViewController = container; #else self.window.rootViewController = self.navigationController; #endif RestKitBaseURL = @"http://--.--.--.---.--"; RKClient* client = [RKClient clientWithBaseURL:RestKitBaseURL]; return YES; } – user1082013 Jan 27 '12 at 00:38
  • i also noticed that the assembly code which on my other computer is responsible for loading the rootviewcontroller inexplicably does not highlight green when stepping thru in the debugger, as if it is not being executed – user1082013 Jan 27 '12 at 00:40