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

  • Home
  • SEARCH
  • 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

Related Questions

I want to create a C++ application that is to run on some Linux
I am working on an application that works like this: It fetches data from
I have a core project that does not run as an application, its only
I have an application that is made up of the following: A central database
I have an application where it was requested that a friendly url be made
I have to use a class/assembly made in C# .NET from native C++ application.
I am collecting logs from several custom made applications. Each application has it's own
I'm making some changes to a legacy classic ASP application. I've made the changes
I have an asp.net 2.0 web application that will run on the same web
I have made the decision to use monotouch to develop an application that browses

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.