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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:06:04+00:00 2026-06-08T12:06:04+00:00

I am getting a EXC_BAD_ACCESS (code=2, address=0x8) error when trying to post a notification.

  • 0

I am getting a EXC_BAD_ACCESS (code=2, address=0x8) error when trying to post a notification.

Occasionally I will see:

-[__NSMallocBlock__ handleMessagesReceived:]: unrecognized selector sent to instance 0x9855cd0

The notification post code looks like this:

NSDictionary *notificationInfo = [NSDictionary dictionaryWithObject:outputArray forKey:@"messages"];
[[NSNotificationCenter defaultCenter] postNotificationName:kMESocialHeatmapMessagesReceivedNotification object:nil userInfo:notificationInfo];

The observer code looks like this (this is the only handler for that notification):

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleMessagesReceived:) name:kMESocialHeatmapMessagesReceivedNotification object:nil];

And the handler code:

- (void)handleMessagesReceived:(NSNotification *)notification {...}

I have cleaned the project (CMD-SHIF-K, CMD-ALT-SHIFT-K and removed derived data from the Organizer), restarted both Xcode and my machine, and even re-written the involved code. Same issue, and I just don’t see that problem.

Any insight GREATLY appreciated.

Cheers,

Chris

========== UPDATE (cannot answer my own question…) ============

Cheers, Phillip and rang, that pointed me in the right direction.

I do understand that EXC_BAD_ACCESS indicates a dealloc’d object, but in this case that just wasn’t possible since the main class of the system was holding onto the object in question (the Heatmap).

The problem turned out to be a race condition between the creation of the Heatmap and the populating of the data model it shares. The populating was happening, occasionally, before the Heatmap was finished being created (both are event-driven).

I ended up re-working the code so that the class holding the Heatmap makes a synchronous call to populate the data after the Heatmap is cleaner.

Thanks for the input, it saved me a headache. 🙂

Chris

  • 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-08T12:06:05+00:00Added an answer on June 8, 2026 at 12:06 pm

    The problem turned out to be a race condition between the creation of the Heatmap and the populating of the data model it shares. The populating was happening, occasionally, before the Heatmap was finished being created (both are event-driven).

    I ended up re-working the code so that the class holding the Heatmap makes a synchronous call to populate the data after the Heatmap is cleaner.

    Thanks for the input, it saved me a headache. 🙂

    Chris

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

Sidebar

Related Questions

I'm using the following code and I'm getting an EXC_BAD_ACCESS when trying to get
In the code below I am getting an EXC_BAD_ACCESS error for no apparent reason
I'm getting an EXC_BAD_ACCESS (or a malloc error) on the following line of code:
I am getting the EXC_BAD_ACCESS error when trying to set a value inside a
I have the following code, from which I am getting an EXC_BAD_ACCESS error: -
My iPhone app is crashing and getting EXC_BAD_ACCESS error when using this code: NSError
I keep getting a -> Program received signal: EXC_BAD_ACCESS. In the following code but
I am getting a Exc_Bad_Access error in main when I try to scroll my
I am getting a Program received signal: EXC_BAD_ACCESS. when using the following code. searchResultFileSize
am getting the following error while scrolling the UITableview . EXC_BAD_ACCESS , -[CFString retain]:

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.