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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:00:49+00:00 2026-05-26T01:00:49+00:00

My app is crashing and getting an EXC_ARITHMETIC error and I don’t know why.

  • 0

My app is crashing and getting an EXC_ARITHMETIC error and I don’t know why. Here is where the error is happening:

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

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil); //ERROR IS HERE
    [pool release];
    return retVal;
}

The error happens when I click a button in the app, it’s hooked up in my ViewController.m file like this:

- (IBAction)btnPressed:(UIButton *)sender {
    [self btnPressed];
}

Which calls this code from the same file:

- (void)btnPressed {
    NSString *strInfo = [[NSString alloc] initWithString:@"Test Info. \r\n"];
    NSData *dataInfo = [strInfo dataUsingEncoding:NSUTF8StringEncoding];
    [strInfo release];
    [socket writeData:dataInfo withTimeout:-1 tag:1];
}

The btnPressed is also called when the app loads and it DOES NOT produce an error. As well if I add a breakpoint to the [self btnPressed]; line then when I click the button in the app it works, stops at the breakpoint and when I click ‘continue program execution’ it works without error as well.

Note: I’m using CocoaAsyncSocket to communicate with a Cocoa app.

  • 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-26T01:00:50+00:00Added an answer on May 26, 2026 at 1:00 am

    This seems to be only a problem with iOS 5 sim, running fine in iOS 4.3.

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

Sidebar

Related Questions

My iPhone app is crashing and getting EXC_BAD_ACCESS error when using this code: NSError
My app is crashing on 3.1.3 because of this NSConcreteBlock error. I read the
Ok, I'm quite stumped here. I'm getting an error, eclipse/android is saying that my
My Android app is crashing with this error: E/AndroidRuntime( 315): Caused by: android.database.sqlite.SQLiteException: bind
so my app is crashing on launch and i am getting this in the
My app is crashing with the error Terminating app due to uncaught exception 'NSInvalidArgumentException',
An app I'm writing always crashes on a clients computer, but I don't get
I have an odd problem that is crashing my app, that I would like
While adding Nsdate values to NSmutablearray my app gets crashing. - (void)viewDidLoad { markarry=[[NSMutableArray
I've started getting an odd problem with Visual Studio 2010 crashing. I wondered if

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.