views:

328

answers:

0

Under iOS 4, when my app installs from xcode it crashes on the first launch but not on subsiquent launches.

After commenting out some addSubView methods the debugger is finally giving me one piece of info

It crashes on [super viewDidLoad]. The debugger states:

Unable to access variable "button1"

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = [UIColor blackColor];

    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];

Breakpoint info from the console:

Pending breakpoint 1 - ""RootViewController.m":20" resolved
Pending breakpoint 2 - ""RootViewController.m":127" resolved
Pending breakpoint 3 - ""RootViewController.m":134" resolved
Pending breakpoint 4 - ""RootViewController.m":140" resolved
Pending breakpoint 5 - ""RootViewController.m":146" resolved
Pending breakpoint 6 - ""RootViewController.m":162" resolved
Pending breakpoint 7 - ""RootViewController.m":157" resolved
Pending breakpoint 8 - ""RootViewController.m":152" resolved
Pending breakpoint 9 - ""RootViewController.m":23" resolved
Pending breakpoint 10 - ""RootViewController.m":26" resolved
Pending breakpoint 11 - ""RootViewController.m":28" resolved
Pending breakpoint 12 - ""RootViewController.m":27" resolved
Pending breakpoint 13 - ""RootViewController.m":29" resolved
Pending breakpoint 14 - ""RootViewController.m":31" resolved
Pending breakpoint 15 - ""RootViewController.m":30" resolved
Pending breakpoint 16 - ""RootViewController.m":32" resolved
Pending breakpoint 17 - ""RootViewController.m":33" resolved
Pending breakpoint 18 - ""RootViewController.m":34" resolved
Pending breakpoint 19 - ""RootViewController.m":35" resolved
Pending breakpoint 20 - ""RootViewController.m":36" resolved
Pending breakpoint 21 - ""RootViewController.m":37" resolved
Pending breakpoint 22 - ""RootViewController.m":21" resolved
Pending breakpoint 23 - "objc_exception_throw" resolved