Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Simulator Blank when trying to run crystal ball animation no errors! Thread 1: signal SIGABRT

Can't seem to figure this out tried breakpoint exception , stepped through all my code but still not working HERE'S MY CODE! // GLViewController.m // Crystalball // // Created by George Locke on 2014-05-16. // Copyright (c) 2014 George. All rights reserved. //

import "GLViewController.h"

import "GLCrystalBall.h"

@interface GLViewController ()

@end

@implementation GLViewController

  • (void)viewDidLoad { [super viewDidLoad];

self.crystalBall = [[GLCrystalBall alloc]init]; self.backgroundImageView.animationImages = [[NSArray alloc] initWithObjects: [UIImage imageNamed: @"CB00001"], [UIImage imageNamed: @"CB00002"], [UIImage imageNamed: @"CB00003"], [UIImage imageNamed: @"CB00004"], [UIImage imageNamed: @"CB00005"], [UIImage imageNamed: @"CB00006"], [UIImage imageNamed: @"CB00007"], [UIImage imageNamed: @"CB00008"], [UIImage imageNamed: @"CB00009"], [UIImage imageNamed: @"CB00010"], [UIImage imageNamed: @"CB00011"], [UIImage imageNamed: @"CB00012"], [UIImage imageNamed: @"CB00013"], [UIImage imageNamed: @"CB00014"], [UIImage imageNamed: @"CB00015"], [UIImage imageNamed: @"CB00016"], [UIImage imageNamed: @"CB00017"], [UIImage imageNamed: @"CB00018"], [UIImage imageNamed: @"CB00019"], [UIImage imageNamed: @"CB00020"], [UIImage imageNamed: @"CB00021"], [UIImage imageNamed: @"CB00022"], [UIImage imageNamed: @"CB00023"], [UIImage imageNamed: @"CB00024"], [UIImage imageNamed: @"CB00025"], [UIImage imageNamed: @"CB00026"], [UIImage imageNamed: @"CB00027"], [UIImage imageNamed: @"CB00028"], [UIImage imageNamed: @"CB00029"], [UIImage imageNamed: @"CB00030"], [UIImage imageNamed: @"CB00031"], [UIImage imageNamed: @"CB00032"], [UIImage imageNamed: @"CB00033"], [UIImage imageNamed: @"CB00034"], [UIImage imageNamed: @"CB00035"], [UIImage imageNamed: @"CB00036"], [UIImage imageNamed: @"CB00037"], [UIImage imageNamed: @"CB00038"], [UIImage imageNamed: @"CB00039"], [UIImage imageNamed: @"CB00040"], [UIImage imageNamed: @"CB00041"], [UIImage imageNamed: @"CB00042"], [UIImage imageNamed: @"CB00043"], [UIImage imageNamed: @"CB00044"], [UIImage imageNamed: @"CB00045"], [UIImage imageNamed: @"CB00046"], [UIImage imageNamed: @"CB00047"], [UIImage imageNamed: @"CB00048"], [UIImage imageNamed: @"CB00049"], [UIImage imageNamed: @"CB00050"], [UIImage imageNamed: @"CB00051"], [UIImage imageNamed: @"CB00052"], [UIImage imageNamed: @"CB00053"], [UIImage imageNamed: @"CB00054"], [UIImage imageNamed: @"CB00055"], [UIImage imageNamed: @"CB00056"], [UIImage imageNamed: @"CB00057"], [UIImage imageNamed: @"CB00058"], [UIImage imageNamed: @"CB00059"], [UIImage imageNamed: @"CB00060"],nil];

self.backgroundImageView.animationDuration = 2.5f;
self.backgroundImageView.animationRepeatCount = 1;

}

  • (void) didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } #pragma mark - Prediction

-(void) makePrediction;{

[self.backgroundImageView startAnimating]; self.predictionLable.text = [self.crystalBall randomPrediction]; }

pragma mark -motion events

-(void) motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event{ self.predictionLable.text = nil; }

-(void) motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event{ if (motion == UIEventSubtypeMotionShake){ [self makePrediction]; } } -(void) motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event{ NSLog (@"motion cancelled"); }

pragma mark - touch events

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ self.predictionLable.text = nil; } -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ [self makePrediction]; } -(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{

NSLog(@"touches cancelled");

} @end

5 Answers

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

Sorry, I can't tell what is wrong with your code and it is possible that there might be something wrong in the Storyboard. You probably have some orphan outlets. Follow the debugging basics video to see if there are any issues with your storyboard. In addition, pay attention to where your exception breakpoint halts execution, which is where the problem might be.

I watched the debugging basics however I had already deleted the breakpoints before watching because I read some previous posts. Is there a way to restore deleted break points? Here is a screenshot of my debugging screen is there anything that can help there Amit Bijlani? http://imgur.com/BRGV2UJ

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

What you need to add is an exception breakpoint which is shown at 4:40 in the video. As I mentioned it might not be your code and could be your storyboard. I'd highly recommend following the steps in that video.

I watched the video again followed all the steps but still a blank screen. The app opens and closes but no images heres the link to my screen shot of main story board http://imgur.com/lGOmfUX . There is no breakpoints in my code so I am at a loss any suggestions would be appreciated.

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

Can you zip up your project and provide a link via Dropbox or something similar?

https://www.dropbox.com/s/71goy8w10vfulr3/Crystalball.zip#

Here is the link to the zip for my project.

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

Looks like something went wrong with your project settings and storyboard selection. Head on over to the project settings and select the storyboard from the dropdown (see image below).

Ok that worked however now some of the words are cut of when predicting should I reposition the font?