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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:41:08+00:00 2026-06-06T02:41:08+00:00

I have a strange issue . I am currently working on a mail app

  • 0

I have a strange issue .
I am currently working on a mail app and it used to crash randomly without and error or logs in my console . I checked my Crash Log it showed me Low Memory warning with jettisoned written next to my App. Crash Report

So I suspect it’s an memory issue and went back to trace my memory usage of my application.
I used allocation instrument to detect the overall usage and my application crashed when it’s heap size was just 4.59 MB. Instrument snapshot

Instruments point towards a function where I am using MBProgressHUD indicator.
The culprit is this one line :

[appDelegate showHUDActivityIndicatorOnView:self.parentViewController.view whileExecuting:@selector(refreshInBackground) onTarget:self withObject:nil withText:@"Loading"];

If I replace this with
[self refreshInBackground] everything works fine no issues ..

Here is the code :

    -(void) showHUDActivityIndicatorOnView:(UIView*)view whileExecuting:(SEL)method 
                                   onTarget:(id)target withObject:(id)object withText:(NSString*)label{
    self.HUD = [[MBProgressHUD alloc] initWithView:view] ;
        self.navigationController.navigationItem.hidesBackButton = YES;
        [view addSubview:self.HUD];
    self.HUD.delegate = nil;
    self.HUD.labelText = label;
    [self.HUD showWhileExecuting:method onTarget:target withObject:object animated:YES];    
}

self.HUD is a property which is being retained.

With a slight modification is showWhileExecuting method as follows :

- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated {

    MyAppdelegate *appDelegate = (MyAppdelegate *)[UIApplication sharedApplication].delegate;
    if(!appDelegate.isRequestActive)
    {
    methodForExecution = method;
    targetForExecution = [target retain];
    objectForExecution = [object retain];

    // Launch execution in new thread
    taskInProgress = YES;
    [NSThread detachNewThreadSelector:@selector(launchExecution) toTarget:self withObject:nil];

    // Show HUD view
    [self show:animated];
    }
    else {
        [self done];
    }
}

currently I have removed this from my app and it works fine now and it does not crashes even with the usage of 20 – 30 MB heap Memory .

I am not looking for an specific answer or solution here . What I am looking for ways to debug / techniques to debug the issue so that I can get to know what caused my app to crash .

Is it memory overflow . If that’s the case then how can I use 20-30 MB right now.
If it’s not an memory issue why does my crash reporter shows jettisoned next to my App name .

the culprit line ([appDelegate showHUDActivityIndicatorOnView:self.parentViewController.view whileExecuting:@selector(refreshInBackground) onTarget:self withObject:nil withText:@"Loading"])

Every time when I call this function some memory increases , because of some elements being cached . But when memory reached 4.5 MB …this line cause it to crash

How do I get to the root cause of this issue . How do I figure out why iOS is killing my app the reason for jettisoned written next to my app

Any help or suggestions would be really appreciated .

  • 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-06-06T02:41:10+00:00Added an answer on June 6, 2026 at 2:41 am

    Ok. The problem is I was adding the HUD progress bar on my view using
    [view addSubview:self.HUD];

    I forgot to remove it from the super view in its delegate method:

    - (void)hudWasHidden:(MBProgressHUD *)hud 
    {
        // Remove HUD from screen when the HUD was hidded
        [HUD removeFromSuperview]; //  app crashes at 4.59 MB if you comment this
        [HUD release];
        HUD = nil;
    }
    

    Because of this several views were added every time on one UIView … I guess there is an upper limit for the number of child subviews on top of each UIView …. apple should mention this in their documentation …

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

Sidebar

Related Questions

I have a really strange issue. I am working on a Java SWING application
I have a strange issue. I'm trying to get Apple Push Notifications working with
I have very strange issue. In my WP7 app I have a pivot control
I have a strange issue (at least for me :)) with the MySQL's locking
I have a strange issue that has arisen recently: Whenever I enter text, even
I have a strange issue with jQuery's hover, addClass $(document).ready(function(){ $('#selectable li').hover( function(){ $(this).addClass('selecting',
I have a strange issue with eclipse. When I put a .xls file in
I have a very strange issue on my hands. I have two IIS websites
I, in fact two end users have seen a strange issue in Excel. When
Strange issue. I have SQL Server running on an EC2 box that I can

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.