Note that there are some explanatory texts on larger screens.

plurals
  1. POApp crashes on start
    primarykey
    data
    text
    <p>Hi I was doing some testing earlier and my app was running just fine. I wanted to do some more testing so I decided to remove the app from my device and then reinstall it by running.</p> <p>Well now for some reason I get to the stage where my splash screen shows up and then it crashes and I get the error: </p> <pre><code> Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 3 beyond bounds [0 .. 2]' </code></pre> <p>This obviously means theres an array out of bounds correct? But why now and how can I found out where and what view controller this is happening on? How could it run before and now all of a sudden when I try reinstalling the app through running it again I get this error? </p> <p>Thanks</p> <p><strong>EDIT</strong> The error is with the array in the following code</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { exploreViewController *view1 = [[exploreViewController alloc] initWithNibName:@"exploreViewController" bundle:nil]; view1.title= @"Explore"; Upcoming *view2 = [[Upcoming alloc] initWithNibName:@"Upcoming" bundle:nil]; view2.title = @"Upcoming"; calcViewController *view3 = [[calcViewController alloc] initWithNibName:@"calcViewController" bundle:nil]; view3.title = @"Calc"; UINavigationController *nav1 = [[UINavigationController alloc] initWithRootViewController:view1]; UINavigationController *nav2 = [[UINavigationController alloc] initWithRootViewController:view2]; UINavigationController *nav3 = [[UINavigationController alloc] initWithRootViewController:view3]; self.tabBarController = [[[UITabBarController alloc] init] autorelease]; self.tabBarController.viewControllers = [NSArray arrayWithObjects:nav1,nav2,nav3,nil]; self.tabBarItem = [[[UITabBarItem alloc] init] autorelease]; NSArray *tabBarItems = self.tabBarController.tabBar.items; UIImage *tab1 = [UIImage imageNamed:@"85-trophy.png"]; UIImage *tab2 = [UIImage imageNamed:@"12-eye.png"]; UIImage *tab3 = [UIImage imageNamed:@"237-key.png"]; NSArray *tabBarImages = [[[NSArray alloc] initWithObjects:tab1, tab2, tab3,nil]autorelease]; NSInteger tabBarItemCounter; for (tabBarItemCounter = 0; tabBarItemCounter &lt; [tabBarItems count]; tabBarItemCounter++) { tabBarItem = [tabBarItems objectAtIndex:tabBarItemCounter]; tabBarItem.image = [tabBarImages objectAtIndex:tabBarItemCounter]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload