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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:48:17+00:00 2026-06-02T15:48:17+00:00

In Cocos2D using blocks to create a menu action causes a SIGABRT error in

  • 0

In Cocos2D using blocks to create a menu action causes a SIGABRT error in that scene’s init method:

 CCLabelTTF *label = [CCLabelTTF labelWithString:@"test" fontName:@"Times" fontSize:12];
 CCMenuItemLabel *toCauseCrash = [CCMenuItemLabel itemWithLabel:label block:^(id sender) {
  NSLog(@"Blocks work?");
}];

Tried the newest Cocos2D, nothing. This forum post promises (a) a hotfix soon, and an edit to the “BuildSettings-iOS.xcconfig” file (which doesn’t exist, as far as I can tell).

(1) Does anyone know how to fix Cocos2D to allow blocks in menus?

(2) Does anyone know what xcconfig file the above post is talking about, or how to find it? (That’s a Kobold2d thing)

Edit: here are the code examples I’ve tried after setting “-force_load $(BUILT_PRODUCTS_DIR)/” in OTHER_LINKER_FLAGS:

id blockAction = [CCCallBlock actionWithBlock:^{
  NSLog(@"Blocks action");
}];

void (^reusableBlock)(id sender) = ^(id sender) {
  NSLog(@"Reusable block");
};
// SIGABRT:
CCMenuItemLabel *menuItem = [CCMenuItemLabel itemWithLabel:myLabel block:blockAction];
// SIGABRT:
CCMenuItemLabel *menuItem = [CCMenuItemLabel itemWithLabel:myLabel block:reusableBlock];
  • 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-02T15:48:19+00:00Added an answer on June 2, 2026 at 3:48 pm

    Seems like for right now the answer is: Blocks are problematic, even when you use -force_load on the cocos2d lib. I will be super happy for the day there is a different answer I can accept on this question.

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

Sidebar

Related Questions

I'm using cocos2d with objective C. I have a class called CrystalineBubble that is
I'm using Cocos2D, and I need to access a parent method in a UIView
I'm using cocos2d for the iPhone to create an infinitely scrolling horizontal tile map.
I have to restart a scene created in cocos2d using a defined UIViewController. How
I am using cocos2d but there is a chance its not that which is
im using xcode4 and box2d/cocos2d. Im having some strange difficulties with runtime errors that
I am scaling my sprite object in cocos2d using the CCScaleTo method. It is
i am using cocos2d and i have a for loop to create a bunch
Using cocos2d for iPhone game development, I am confused between Layer and Scene. For
I am trying to develop a iphone app by using cocos2d. I create a

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.