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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:56:30+00:00 2026-06-08T22:56:30+00:00

I am calling a block with a boolean value. According to the debugger, the

  • 0

I am calling a block with a boolean value. According to the debugger, the boolean value is false, but it seems to be treated as true. Is this a compiler/Xcode bug, or am I supposed to mark the parameters being passed to a block in some way similar to __block?

// Hovering over the |finished| parameter displays the value of finished as NO
[self.repDataSynchronizationClient synchronizeWithRepId:rep.id andCompletion:^(NSString * progressMessage, BOOL finished){
    if( finished )
    {
        [self hideLoader];    // Breakpoint set here, which I am hitting
    }
    else
    {
        [self setLoaderTitle:progressMessage];
    }
}];

Here’s a screenshot of the situation, with the breakpoint hit and tooltip displayed.

  • 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-08T22:56:33+00:00Added an answer on June 8, 2026 at 10:56 pm

    If you are in release rather than debug, there is a strong probability that it just the breakpoints that are wrong. This is presumably due to the complier removing some statements in release as in optimises and line numbers no longer lining up with the code they are supposed to.

    Verify which clause your if statement is reaching with NSLog statements instead.


    On a separate note, you mention the use of __block, but don’t actually use it and appear to have a retain cycle there. It should probably read:

    __block id selfReference = self;
    [self.repDataSynchronizationClient synchronizeWithRepId:rep.id andCompletion:^(NSString* message, BOOL finished) {
        if (finished)
        {
            [selfReference hideLoader];
        }
        else 
        {
            [selfReference setLoaderTitle:progressMessage];
        }
    }];
    

    If using ARC, use __unsafe_unretained instead of __block.

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

Sidebar

Related Questions

I'm calling in a PL/SQL-Procedure another procedure. Now i'll put a begin-exception-block around this
Hi Is there any way to block my iPhone from calling/sending text to a
Calling image = Image.open(data) image.thumbnail((36,36), Image.NEAREST) will maintain the aspect ratio. But I need
Calling the ajax called URL works well without ajax eg. http://localhost/ci/controller/method/param_value . But using
Calling getActionBar returns null . This has been frequently reported so I've made sure
This block of code essentially takes a JAXB Object and turns it into a
https://stackoverflow.com/a/180191 Here a method is timed by calling System.nanoTime() in a normal block, while
Hi I am calling ALAssetsLibrary's -enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:block failureBlock:failure; then inside the enumeration block i
I got this error when calling bundle update: Installing curb (0.7.10) with native extensions
I am calling the below command using java This is the java initialization String

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.