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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:07:37+00:00 2026-05-14T06:07:37+00:00

I am trying to get the code found here: http://snipplr.com/view/26643/mbprogresshud-with-an-asynchronous-nsurlconnection-call/ to work in my

  • 0

I am trying to get the code found here:

http://snipplr.com/view/26643/mbprogresshud-with-an-asynchronous-nsurlconnection-call/

to work in my project. It’s using the private MBProgressHUD class however i keep getting exc_bad_access errors on lines 69 or 70 depending if you comment out the log statement:

NSLog(@”float filesize: %f”, [self.searchResultFileSize floatValue]);
HUD.progress = [resourceLength floatValue] / [self.searchResultFileSize floatValue];

The problem is with the conversion of searchResultFileSize to a floatValue although i cant figure out why. A call to the same variable one line up

NSLog(@”filesize: %d”, self.searchResultFileSize);

works fine. Only idea i have come up with is that it might be some threading issue??

Any ideas?? Or does anyone have a working example of how to use MBProgressHUD with asynchronous NSURLConnections?

P.S. I tried using the original MBProgressHUD code which specifies a call like:

[HUD showWhileExecuting:@selector(myProgressTask) onTarget:self withObject:nil animated:YES];

However this didn’t work because myProgressTask uses a NSURLConnection which is uses a delegate so the code above would execute for the method call to myProgressTask and then hide itself before the response came back.

  • 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-14T06:07:37+00:00Added an answer on May 14, 2026 at 6:07 am

    When you do

    NSLog(@"filesize: %d", self.searchResultFileSize);
    

    you are printing out the integer value of a pointer to an NSNumber, I think (line 53 assigns a pointer to an NSNumber to searchResultFileSize). On line 53, the NSNumber that is returned and assigned to searchResultFileSize is autoreleased–it looks to me as though it’s probably getting dealloc’d between there and when you try to access it on line 69. Even if it’s dealloc’d, it will still have an integer value of the pointer, so

    NSLog(@"filesize: %d", self.searchResultFileSize);
    

    will work, but any attempt to call a method of the instance of NSNumber to which it should point will fail with exc_bad_access. However, without seeing the interface definitions, particularly where searchResultFileSize is defined, I cannot tell for sure.

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

Sidebar

Related Questions

When trying to run the sample code here: http://www.nikhilk.net/Live-Search-REST-API.aspx I get: Error 52 The
I am trying to run a small example which i found from here http://docs.oracle.com/javase/7/docs/api/javax/swing/Timer.html
I'm using Ariel Faigon's sort library, found here: http://www.yendor.com/programming/sort/ I was able to get
I'm using the WindowsMedia library found here: http://www.ernzo.com/soundstudio.aspx The sample code had the ability
I am trying to solve the Spotify Puzzle 'Bilateral' found here: http://www.spotify.com/us/jobs/tech/bilateral-projects/ I have
I've been trying to get this code to work for a few hours now
I am trying to get this code to work for me,but It is not
I'm using the backstretch full page plugin found here: http://srobbin.com/jquery-plugins/backstretch/ Basically, I'm tasked with
I'm trying to run the basic starter example for using rspec found here: http://rspec.info/
originally i was using a .net sdk for facebook found here: http://facebooktoolkit.codeplex.com/ but now,

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.