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

The Archive Base Latest Questions

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

Yeah, so this one through me or a loop for a while until I

  • 0

Yeah, so this one through me or a loop for a while until I figured out what was going on. With Apple releasing the final version of Xcode today, and iOS 4 coming out yesterday, I finally started to look into porting my apps to iOS 4.

So I downloaded the new SDK, and got to work. After working on my app a bit, imagine my surprise when I got a bad access error, (trying to talk to a deallocated object). I hate those errors, so hard to figure out what to do. So, I spent the last 45 minutes trying to find what object I had deallocated. I couldn’t recall what I had changed, and the error messages weren’t helping. I enabled NSZombies (Zombies!!!) and got this error:

2010-06-22 15:38:28.655 ProjectPidgey[17783:207] *** -[CCTargetedTouchHandler claimedTouches]: message sent to deallocated instance 0xd834b30

Which is about as useful as it seems. I’m in Cocos2D, so I think something is being touched that no longer exists? But I couldn’t find anything like that in my code. So, on a whim, I used my older version of Xcode. Compiled and installed it on the Simulator running iOS 3.0. Worked fine. Like a charm, just as I had made it.

So now, my question is, what’s happening here. What is the difference between SDK 4 and 3 that would cause a Bad Exc Error? Any ideas? Or perhaps it’s an issue with cocos2d and that needs to be updated?

Edit: I did some messing around and found that by removing this line of code:

- (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event
{
    CGPoint touchPoint = [touch locationInView:[touch view]];
    touchPoint = [[CCDirector sharedDirector] convertToGL:touchPoint];
    if ( ![super containsTouchLocation:touch] ) return NO;
    [self.engine playerHitRedDot:self];
    //[self.parent removeChild:self cleanup:YES]; //REMOVED THIS LINE
    return YES;
}

Then it works. So it looks like the CCTargedTouch Handler is linked to my sprite (which is then removed when I touch it) and someone everything doesn’t work out… However, I need the sprites to get removed (or at least disappear, but I want to be memory conscientious), so how can I do this?

Thanks!

  • 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:02:07+00:00Added an answer on May 15, 2026 at 10:02 am
    2010-06-22 15:38:28.655 ProjectPidgey[17783:207] *** -[CCTargetedTouchHandler claimedTouches]: message sent to deallocated instance 0xd834b30
    

    That is very useful. It is telling you exactly what went wrong; an over-released instance of CCTargetedTouchHandler had a method invoked upon it.

    Every Cocos2d based project has the full source embedded and if you are using Instruments to track the Zombies, you can see the exact backtrace of where the object was created, retained and/or released.

    It might be a bug in Cocos2d, but I doubt it reading the code. This looks more like it is an over-release in your application that happened to not trigger a crash before, but does now. Either something isn’t retained that should be, something isn’t nild out that should be and/or you are passing stuff between threads in an unsafe fashion.

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

Sidebar

Ask A Question

Stats

  • Questions 434k
  • Answers 434k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The issue is mainly with aspect ratio. Let's say my… May 15, 2026 at 3:13 pm
  • Editorial Team
    Editorial Team added an answer Comments have great value on APIs that others are going… May 15, 2026 at 3:13 pm
  • Editorial Team
    Editorial Team added an answer The system will not try to collect this->m_managedClass->DictProp too because… May 15, 2026 at 3:13 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.