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

  • Home
  • SEARCH
  • 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 6868599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:27:14+00:00 2026-05-27T03:27:14+00:00

I pressed alt + cmd + r and activated NSZombieEnabled in Arguments > Environment

  • 0

I pressed alt+cmd+r and activated NSZombieEnabled in Arguments > Environment Variables. Additionally, I activated it in Diagnostics > Memory Management > Enable Zombie Objects.

However, when I built and run, at some point my app crashes giving me this useless message in the console:

*** -[CALayer retainCount]: message sent to deallocated instance 0x656b260

The stack trace is just as useless. I moved the details-level slider all the way to the right. Thread 1 simply shows me this:

screenshot

Everything is system-owned and there’s not a single line related to my app. So obviously NSZombiesEnabled doesn’t work as it did in Xcode 3, where it halted on the dead object.

Is there any way to figure out which CALayer is deallocated too early?

Update: So after building and running about 100 more times suddenly the problem DISAPPEARED! It’s completely gone! And the best part: I did not modify my code in any way! Inbetween I cleaned the build folder and project with the clean commands several times and deleted the app in the Simulator several times as well.

Update 2: Fortunately the problem re-appeared. And now it seems persistent. Fortunately, because I prefer finding the root cause rather than annoying the users by random.

Update 3: Finally found it by accident:

startButton = newBttn;

should have been:

self.startButton = newBttn;

startButton was a retaining property and in -dealloc I released it. So it got overreleased and in most (but not all) cases after the view faded out it crashed giving that weird CALayer retainCount message.

The Zombies Instrument (CMD + I) finally pointed out that it had to do with a button. Just didn’t know why and where.

Clang Static Analyzer didn’t complain about this obvious glitch.

  • 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-27T03:27:15+00:00Added an answer on May 27, 2026 at 3:27 am

    If this crops up again, you can run a dedicated Zombies instrument. Hit Command+I to profile the app and select the Zombies instrument (you must be running on the simulator). If you get a zombie, you can display the entire memory history (each retain/release) for that object, which is immensely helpful in tracking down errors.

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

Sidebar

Related Questions

By default Windows (XP) shows the underlined hotkeys only, when ALT is pressed. This
I was trying to test whether the Alt key was pressed. I had a
When you pressed CMD F on older versions of Xcode you got the find/replace
How could I identify which Ctrl / Shift / Alt keys are pressed in
I have QTextEdit and i want to detect Alt+Enter key is pressed (both keys
I want the 'Alt' to be pressed by code. It is like firing key-press
I want to capture when the ALT key has been pressed even if my
How do you handle a KeyDown event when the ALT key is pressed simultaneously
I must have pressed on the wrong button at some point, and now when
I need to analyze pressed key if it is alphabet (for all languages) in

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.