Harin
Harin

Reputation: 867

crash due to "Could not load NIB in bundle"

In my app there is a PointMode button. When I click on it 10 to 11 time there is no problem and the view will appear. But then after, it produces this error:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle < Simulator/4.1/Applications/04DF6214-383F-43DA-B2D2-C5B538B0095B/PW.app> (loaded)' with name 'PWPointMode''

I call that view like this.

PWPointMode *pointController = [[PWPointMode alloc]initWithNibName:@"PWPointMode" bundle:nil];
    self.objPointMode = pointController;
    [self.navigationController pushViewController:objPointMode animated:YES];
    [pointController release];

my application is universal app

Upvotes: 5

Views: 1366

Answers (3)

AJPatel
AJPatel

Reputation: 2291

Harin

I show you code it`s by this you can load new view or nib and but u explain there as after 10-15 time of loading view your application going to show this message so for that you run your application in Performance Tool and check due to leak your resource memory not going to full. due to this problem also you get this Error message while application crash.

May be this one is useful to you...

Upvotes: 2

max_
max_

Reputation: 24481

@Vince is right. The best way to prevent a misspell is by using

NSStringFromClass([myVCIvar class]);

Try autoreleasing the viewController before you push it, as when I have recieved that problem, I autorelease the instance and then push it and it works.

Upvotes: -2

user756245
user756245

Reputation:

You probably mistyped the NIB Name, check it. Also verify this file in included into the app bundle. In the 'Copy bundle ressources' build phase.

Upvotes: 0

Related Questions