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 this error from XCode: objc[8422]: FREED(id): message release sent to freed object=0x3b120c0
Got this error message while trying to load view: The model item passed into
I got the following crash logs after my app crashes: 0 libobjc.A.dylib 0x000034f4 objc_msgSend
I got this error message below: Ld /Users/kIT98K/Library/Developer/Xcode/DerivedData/iFly-cijrdcwdnrwowmgcazhvczqzkctd/Build/Products/Debug-iphonesimulator/iFly.app/iFly normal i386 cd /Users/kIT98K/proooo2/VPN38/iFly setenv MACOSX_DEPLOYMENT_TARGET
I'm trying to implement WebSocket handshake (76) in ObjC and can't figure out (as
I've got an app that throws out the GKSession and makes a new one
Got a seg fault from my memcpy that gdb can't give me anything else
got a problem, can't get my head around this jquery and would appreciate your
I got this iAd crash randomly in my app. What could I do to
I've got a core data-based app for iPhone and I'm getting the following warning:

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.