Compiler internal error: bus error

I have the following code (see below), and if I compile it, then I get "internal compiler error: bus error". If I comment on the last ImageOne.transform, everything will be fine. If the file ends with .m, it compiles fine, if I change it to .mm, then it has a problem. Any ideas?

[UIView animateWithDuration:duration1 delay:delay options:UIViewAnimationCurveEaseIn animations:^{ ImageOne.transform = CGAffineTransformMakeScale(scale1, scale1); ImageOne.alpha = 1.0f; } completion:^(BOOL finished){ [UIView animateWithDuration:SecondDuration delay:SecondDelay options:UIViewAnimationCurveEaseOut animations:^{ ImageOne.transform = CGAffineTransformMakeScale(scale2, scale2); } completion:^(BOOL finished){ [UIView animateWithDuration:SecondDuration delay:SecondDelay options:UIViewAnimationCurveEaseOut animations:^{ ImageOne.transform = CGAffineTransformMakeScale(scale1, scale1); //results in bus error, i think its due to nesting } completion:nil]; }]; }]; } 
+1
source share
1 answer

Why are you inserting another block and not just adding

ImageOne.transform = CGAffineTransformMakeScale(scale1, scale1);

in the first block for example

 completion:^(BOOL finished) { [UIView animateWithDuration:SecondDuration delay:SecondDelay options:UIViewAnimationCurveEaseOut animations:^{ ImageOne.transform = CGAffineTransformMakeScale(scale1, scale1); ImageOne.transform = CGAffineTransformMakeScale(scale2, scale2); 

Hope this helps. :)

+1
source

All Articles