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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:51:23+00:00 2026-05-11T06:51:23+00:00

I made an application that should run constant until I stop it. What it

  • 0

I made an application that should run constant until I stop it. What it basically does is getting some data from connected another device and send that data to the server periodically using NSURLConnection, and read data from the server periodically and visualize that data as a graph using NSXMLParser.

I ran the instrument to check allocs and leaks. No leak at all. memory monitor shows consistent 5.2 MB. Objectalloc graph is stable, Net bytes of objectallo is arouend 480000 and #net is around 6400.

It crashed about 10 ~ 15 hours later. So I added breakpoint in malloc_error_break. Now I gets ‘EXC_BAD_ACCESS‘ error on Debugger console about 12 hours later.

Any idea?

One suspicious part is SENDING data.

 - (void) sendDataToServerWithX:(float)x Y:(float)y{  NSAutoreleasePool *uiUpdatePool = [[NSAutoreleasePool alloc] init];  NSString *urlString = [[NSString alloc] initWithFormat:@'http://www.url.com/save_data.php?user=user1&x=%f&y=%f', x, y]; NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) { NSLog(@'sending success'); } //else { }

NSLog( @'data sent.');
[urlString release];
[theConnection release]; [uiUpdatePool drain]; }

Another suspicious part is READING data:

 - (void) readCurrentDataFromServer: (NSTimer *) timer {
NSAutoreleasePool *uiUpdatePool = [[NSAutoreleasePool alloc] init]; XMLParser *parser = [[XMLParser alloc] initXMLParser];
NSURL *url = [[NSURL alloc] initWithString:aString]; NSXMLParser *readXmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
[readXmlParser setDelegate:parser]; [readXmlParser parse];

(...)

[parser release];
[url release];
[readXmlParser release]; [uiUpdatePool drain]; }

  • 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. 2026-05-11T06:51:24+00:00Added an answer on May 11, 2026 at 6:51 am

    Try running it in the iPhone Simulator with ‘Guard Malloc’ (in Xcode’s Run menu) enabled. That’s a special setting designed to make hidden memory-access bugs cause immediate crashes rather than hiding for a while. (It will also make your app very slow and consume much more memory than normal, which is why it isn’t always on.) It’s not certain that it will help, but it might.

    UPDATE: The instructions above are for Xcode 3. In Xcode 4, turn on Guard Malloc by clicking your scheme name in the toolbar, selecting ‘Edit Scheme’, clicking ‘Run’ in the sheet’s source list, choosing the ‘Diagnostics’ tab, and checking ‘Enable Guard Malloc’.

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

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You're observing something known as "anemic domain model". Yes, it's… May 11, 2026 at 11:51 pm
  • Editorial Team
    Editorial Team added an answer Known type attributes are passed to the DataContractSerializer constructor. You… May 11, 2026 at 11:51 pm
  • Editorial Team
    Editorial Team added an answer I don't think getParameter("refreshCount") is an automatic function of servlets.… May 11, 2026 at 11:51 pm

Related Questions

I made a WPF app that uses Web Services. It is failing on all
Problem description: In my application, I have to present the contents of data packets
How to create a WPF application that can be deployed as either a XBAP
I have a visual studio setup and deployment project. I've added a .cmd script

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.