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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:10:51+00:00 2026-05-17T02:10:51+00:00

I got the objc_msgSend() killer error message in my app and thanks to Hamster

  • 0

I got the “objc_msgSend()” killer error message in my app and thanks to Hamster Emporium
i can figure out a little bit what was happening.

Now i found the “problem” and the “solution”, but what i can’t understand why my problem was really a problem.

Here is the scenario:

Object_A –> Object_B –> Object_C

The ‘–>’ symbol represent the “create” action.
Class of Object_C looks like this:

@interface Class_C {
  NSArray *items;
}
@property (nonatomic, retain) NSArray *tems;
@end

The property ‘items’ is set in Object_B through a ‘setItems’ method:

- (void)setItems:(NSArray *)items_ {
 if (object_B) {
  [object_B.taskItems release];
  object_B.taskItems = items_;
 }
 [super setItems:items_];
}

Now, if I use this method as is I got the blasphemous ‘objc_msgSend()’ error BUT if I comment the release line everything goes well.

Note: the retainCount in the release line is 0, but the release execute without problems

  • 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-17T02:10:52+00:00Added an answer on May 17, 2026 at 2:10 am

    You are getting that error because the taskItems member variable is being released twice. There is no need to manually release taskItems because using the dot syntax takes care of it automatically.

    This line:

    object_B.taskItems = items;
    

    Invokes the property accessor for taskItems, in which the old value is automatically released before the new one is retained (or copied, depending on the property definition).

    A very good general rule for Cocoa memory management is that you should only release an object if you created it (either by alloc/init or by copy). Releasing object_B.taskItems would violate that rule.

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

Sidebar

Related Questions

I got the following crash logs after my app crashes: 0 libobjc.A.dylib 0x000034f4 objc_msgSend
Got myself in a bit of a pickle here ... working on a CMS
Got a problem with ADOMD.NET 8.0, SQL2008 and our app. It isn't giving us
Got a bit of a mind freeze at the moment. I have the following
I got this error today when trying to open a Visual Studio 2008 project
I got this iAd crash randomly in my app. What could I do to
Here's the scenario: On my iPhone app (OS 3.1.2), I've got view 1 which
I have a little app that downloads stock prices and was working perfectly (for
Got a bluescreen in windows while cloning a mercurial repository. After reboot, I now
got a new blog at wordpress few days ago ( http://ghads.wordpress.com ) and I

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.