Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7188293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:02:49+00:00 2026-05-28T19:02:49+00:00

I have written code for an animation that shakes a UIImageView on the screen,

  • 0

I have written code for an animation that shakes a UIImageView on the screen, but although the syntax seems to be correct, I am getting an obscure “internal compiler error: Bus error: 10” when building. Any idea why?

-(IBAction)shakeCircle{
    int d = 3;
    [UIView animateWithDuration:0.05
    animations:^{myCircle.center = CGPointMake(myCircle.center.x+d, myCircle.center.y-d);}
    completion:^(BOOL finished){
    [UIView animateWithDuration:0.05
    animations:^{myCircle.center = CGPointMake(myCircle.center.x-d, myCircle.center.y+d);}
    completion:^(BOOL finished)
    {
        //but if I comment from here..
        [UIView animateWithDuration:0.05
        animations:^{myCircle.center = CGPointMake(myCircle.center.x+d, myCircle.center.y-d);}
        completion:^(BOOL finished){
        [UIView animateWithDuration:0.05
        animations:^{myCircle.center = CGPointMake(myCircle.center.x-d, myCircle.center.y+d);}
        ];
        }
        ];
        //... to here the code will build.

    }
    ];
    }
    ];
}

Note that if I comment out the last five lines of animation code, everything compiles fine…. What is going on?

I have tried switching to different compilers, that didn’t work. I made sure that there’s just one myCircle and that the only time it ever gets referred to is when it gets declared, and in that method!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:02:51+00:00Added an answer on May 28, 2026 at 7:02 pm

    Here’s a little workaround that solves the problem through recursive calls to the function. Assign to int d the amount by which to shake, then

    int d = 3;
    -(IBAction)shakeMyCircle{
        [UIView animateWithDuration:0.05
        animations:^{myCircle.center = CGPointMake(myCircle.center.x+3, myCircle.center.y-3);}
        completion:^(BOOL finished){
            [UIView animateWithDuration:0.05
            animations:^{myCircle.center = CGPointMake(myCircle.center.x-3, myCircle.center.y+3);}
            completion:^(BOOL finished) 
            {   
                d--;
                if(d>0) [self shakemyCircle];
                if(d == 0) d = 3;
            }
            ];
        }
        ];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written code to perform click event on JMenuItem but that is not
I have written code that automatically creates CSS sprites based on the IMG tags
I have written code that opens 16 figures at once. Currently, they all open
I have written some code to ensure that items on an order are all
I have written some jQuery code to use the slideUp animation when deleting rows
I have written code ORM::factory('cds')->find_all(1, 2); It is returning all row . But according
I have written code for javascript but it is not called any how. I
I have written code within Python that doesn't release memory the way it should.
I have written code to perform a function that could take a while to
I have written code in Java to access web cam,and to save image... I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.