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 6697563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:28:28+00:00 2026-05-26T06:28:28+00:00

im new to programming in Objective C and really even to programming kind of.

  • 0

im new to programming in Objective C and really even to programming kind of.
I am making a little and simple pong game and while i was trying to make an AI for the computer player the program always “shuts down” showing me SIGABRT error in Thread 1.

I already asked this question here, but didn’t really got the answer, just been asked for providing more code.

The error really came out of nowhere a was editing code and suddenly it showed up and even after deleting the code o have written since the last successful building it still shows me the error. Even if i start a backup which i know worked.

So here is all the code i have.

PongViewController.m – the code i was editing before the error showed up

#import "pongViewController.h"

#define kGameStateRunning 1 
#define kGameStatePaused 2

#define kMicSpeedX 3 
#define kMicSpeedY 4

#define ObtiznostPocitace 15

@implementation pongViewController

@synthesize mic,plosina_a,plosina_b,hrac_score,pocitac_score,gameState,micVelocity,TapToBegin;


- (void)viewDidLoad {
    [super viewDidLoad];
    self.gameState = kGameStatePaused;
    micVelocity = CGPointMake(kMicSpeedX, kMicSpeedY);
    [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(gameLoop) userInfo:nil repeats:YES];
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    if(gameState == kGameStatePaused) {
        TapToBegin.hidden = YES;
        gameState = kGameStateRunning;
    } else if (gameState == kGameStateRunning) {
        [self touchesMoved:touches withEvent:event];
    }
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
    UITouch *touch = [[event allTouches] anyObject];
    CGPoint location = [touch locationInView:touch.view];
    CGPoint xLocation = CGPointMake(location.x,plosina_a.center.y);
    plosina_a.center = xLocation;
}

- (void) gameLoop {
    if(gameState == kGameStateRunning) {

        mic.center = CGPointMake(mic.center.x + micVelocity.x, mic.center.y + micVelocity.y);

        if(mic.center.x > self.view.bounds.size.width || mic.center.x < 0) {
            micVelocity.x = -micVelocity.x;
        }

        if(mic.center.y > self.view.bounds.size.height || mic.center.y < 0) {
            micVelocity.y = -micVelocity.y;
        }
    } else {
        if (TapToBegin.hidden) {
            TapToBegin.hidden = NO;
        }
    }

    //Collision Detection

    if (CGRectIntersectsRect(mic.frame,plosina_a.frame)) {
        if (mic.center.y < plosina_a.center.y) {
            micVelocity.y = -micVelocity.y;
            //NSLog(@"%f %f", mic.center,plosina_b.center);
        }
    }

    if (CGRectIntersectsRect(mic.frame,plosina_b.frame)) {
        if (mic.center.y > plosina_b.center.y) {
            micVelocity.y = -micVelocity.y;
        }
    }

    if(mic.center.y <= self.view.center.y) {
        if(mic.center.x < plosina_b.center.x) {
            CGPoint compLocation = CGPointMake(plosina_b.center.x - ObtiznostPocitace, plosina_b.center.y);
            plosina_b.center = compLocation;
        }

        if(mic.center.x > plosina_b.center.x) {
            CGPoint compLocation = CGPointMake(plosina_b.center.x + ObtiznostPocitace, plosina_b.center.y);
            plosina_b.center = compLocation;
        }
    }
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

//jakovždy nakonec uvolníme co sme si obsadili

- (void)dealloc {
    [super dealloc];
    [mic release];
    [plosina_a release];
    [plosina_b release];
    [hrac_score release];
    [pocitac_score release];
    [TapToBegin release];

}

@end

main.m – the code where the error is pointing at

#import <UIKit/UIKit.h>

int main(int argc, char *argv[]) {

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil);

    [pool release];
    return retVal;
}

What the Debugger is spitting out:

argc    int 1
argv    char ** 0xbffff6f4
*argv   char *  0xbffff800
pool    NSAutoreleasePool * 0x4b29340
NSObject    NSObject    {...}
_token  void *  0x521a200
_reserved3  void *  0x0
_reserved2  void *  0x0
_reserved   void *  0x0
retVal  int -1073744132

And this (from the Debugger console) but i think this isn’t the part of the problem, but what the hell do i know.

This GDB was configured as "x86_64-apple-darwin".Attaching to process 11032.
Couldn't register com.yourcompany.pong with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.sharedlibrary apply-load-rules all
Current language:  auto; currently objective-c
(gdb) 

Please help, i tried fixing all the warnings i had in the application, i successed, but still nothing.

  • 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-26T06:28:29+00:00Added an answer on May 26, 2026 at 6:28 am

    Make a new project, make it a view based application, and call the project iTennis.
    on the website that you mentioned, http://www.icodeblog.com/2009/01/15/iphone-game-programming-tutorial-part-1/ download all the image files that it wants you to download, and place them in the resources folder of the project.

    • Open up iTennisViewController.h and put this in http://staging.icodeblog.com/wp-content/uploads/2009/01/screenshot_051.jpg

    after this, open up the file iTennisViewController.xib and link pictures to the IBOutlets that you declared in the header file. Also if you don’t know how to do this, I think there is a link for a video on the website on how to do it. If you don’t see a link, go to youtube and watch TheNewBoston’s videos on xcode. He teaches you the basics about this stuff, and you should watch his videos anyway.

    • Now open up the iTennisViewController.m file, and put the following code in, in the exact order its posted.

    • http://staging.icodeblog.com/wp-content/uploads/2009/01/screenshot_061.jpg

    • http://staging.icodeblog.com/wp-content/uploads/2009/01/screenshot_071.jpg

    • http://staging.icodeblog.com/wp-content/uploads/2009/01/screenshot_081.jpg

    • http://staging.icodeblog.com/wp-content/uploads/2009/01/screenshot_091.jpg

    • http://staging.icodeblog.com/wp-content/uploads/2009/01/screenshot_101.jpg

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to objective-C programming for iOS. I'm struggling with a really simple task,
I`m really new in Objective-C and Mac OSX programming. Can someone give me simple
Hey there, I'm a designer thats really new to programming with xcode or Objective-C
I'm really new to programming with objective c and so I hope that you
I'm quite new to objective c but have been programming for a while. I
I'm really new to programming in Objective-C, my background is in labview which is
I'm new to Objective-C programming so sorry for the lame question. I'm trying to
I'm fairly new to programming in Objective-C. While I have been able to find
I'm new to iPhone and Objective C programming but I'm able to make my
I am very new to programming and Objective-C and I am trying to work

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.