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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:00:29+00:00 2026-05-15T10:00:29+00:00

I am using cocos2d 0.99.4 and Xcode 4.0. so, I changed my AppDelegate in

  • 0

I am using cocos2d 0.99.4 and Xcode 4.0. so, I changed my AppDelegate in this way according to the documentation and example given in 0.99.4 version.

- (void) applicationDidFinishLaunching:(UIApplication*)application
{
    window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    [CCDirector setDirectorType:kCCDirectorTypeDisplayLink];
    CCDirector *director = [CCDirector sharedDirector];
    [director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft];
    [director setAnimationInterval:1.0/60];
    [director setDisplayFPS:NO];
    EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
                               pixelFormat:kEAGLColorFormatRGBA8            
                               depthFormat:GL_DEPTH_COMPONENT24_OES   
                    preserveBackbuffer:NO];

    [[CCDirector sharedDirector] setOpenGLView:glView];

    [window addSubview:glView];
    [window makeKeyAndVisible]; 

    [CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA8888];
    gameLevel = [[NSUserDefaults standardUserDefaults] integerForKey:@"gameLevel"] ;
    gameLevel = 1;

    CCScene *scene = [CCScene node];
    CCLayer *layer = [GamewinScreen node];  
    [scene addChild :layer];

    [[CCDirector sharedDirector] runWithScene: scene];  

}  

//The method test1 is also in the app Delegate class.

 -(void)test1
{

    [[CCDirector sharedDirector] end];
    [[CCDirector sharedDirector] setOpenGLView:[[window subviews] objectAtIndex:0]];    

    CCScene *Scene = [CCScene node];
    CCLayer *Layer = [OpeningScreen node];

    [Scene addChild:Layer]; 

    [[CCDirector sharedDirector] runWithScene: Scene];
}

In GameWinScreen I have a selector @selector(goToFirstScreen),

-(void)goToFirstScreen:(id)sender
{
    [MY_DELEGATE performSelector:@selector(test1) withObject:nil afterDelay:1.0];
 }   

After playing the game for 50 minutes and more I am getting

Received memory warning. Level=1  

for more than 10 times and then
Received memory warning. Level=2

and the application is crashing. giving the following message

Program received signal:  “0”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")

alt text http://www.freeimagehosting.net/uploads/52ac11fe93.png

alt text http://www.freeimagehosting.net/uploads/619333a82f.png

  • 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-15T10:00:30+00:00Added an answer on May 15, 2026 at 10:00 am

    This is cocos2d telling you that you are doing something wrong. You are calling setDirectorType on the director in goToFirstScreen, but the second time you call it there is already a director. I’m not sure why you are restarting the director. Why not just replace the scene:

    -(void)goToFirstScreen:(id)sender
    {
        CCScene *Scene = [CCScene node];
        CCLayer *Layer = [OpeningScreen node];
        [Scene addChild:Layer];
        [[CCDirector sharedDirector] replaceScene:Scene];
    }   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using cocos2d-iphone, latest non-beta version. Recently I found this: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:effects , and
Currently I am using xCode 3.2.5 and I have already installed cocos2d template cocos2d
I have a very simple game using Xcode v4.2.1, Cocos2d v5.0.1. I've tried both
I am using the cocos2d library. when xcode builds, it builds twice as many
I am building a game using cocos2d-iphone 0.99.4 and Xcode 3.2.4. When I try
I'm using Cocos2D and the system particles and I hope I wrote this correctly
I downloaded Cocos2d-iphone 0.99.5 and installed it using ./install-script I then opened xcode and
I'm using Cocos2D 0.99.5 for iPhone in Xcode 3.2.5. There doesn't seem to be
I am on Mac OS X 10.6.8 using Xcode 4 with Cocos2D. The other
I don't know if this sounds crazy. I have 2 xcode projects, 1 using

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.