Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Thread 1: EXC_BREAKPOINT (code=EXC_i386_BPT, subcode=0x0) error

I have an iPad app I am making, but it crashes on startup even though there are no errors or warnings, the output doesn't output anything besides "(lldb)", and it marks a pointer.

This is the image of the post build crash.

Image Of Crash

And here is the code:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   /* UIImage *myImage = [UIImage imageNamed:@"de_dust2.png"];
    myImageView = [[UIImageView alloc] initWithImage:myImage];

    myScrollView.contentSize = CGSizeMake(myImageView.frame.size.width, myImageView.frame.size.height);
    myScrollView.maximumZoomScale = 4.0;
    myScrollView.minimumZoomScale = 0.75;
    myScrollView.clipsToBounds = YES;
    myScrollView.delegate = self;
   // [myScrollView addSubview:myImageView];*/

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    [self.viewController setRed:1];
     [self.viewController setGreen:0];
    [self.viewController setBlue:0];
    [self.viewController setAlpha:1];
    [self.viewController checkRotation];
    return YES;
}

I now also noticed that the error was given at the [self.window makeKeyAndVisible]; line.

like image 214
Xe3d Avatar asked Nov 23 '12 08:11

Xe3d


1 Answers

Your code looks ok, the crash could be caused by some exception thrown parsing the XIB file of the window ...

Take a look at the Window in Interface Builder and try to temporary remove all reference to any IBOutlet present in the View Controller ...

like image 71
aleroot Avatar answered Nov 20 '22 06:11

aleroot