Talyn Wrote:And does anyone know if a CALayer has a fireDate method or not? I can't find it in the documentation.

fireDate is only available in NSTimer, and CALayer does not inherit from NSTimer, so no. You can hold down the option key and double-click on any method in your code to get a quick search for it in the docs BTW.

OneSadCookie Wrote:Double Free is when you free something that's already been freed, as the name suggests

Xcode has a "Run With -> Guard Malloc" command which may turn out to be handy

Well, that's kind of strange, because when I release something that has already been released to a 0 retain count, it gives me a EXC_BAD_ACCESS error, not a malloc error. Ah! What does Guard Malloc do, out of curiosity?

Oh yeah, and another thing : Anyone know what an exit code 101 is? Happens at random and I have found absolutely nothing about it in any docs, mans, or online.

Mac users swear by their computers, PC users swear at their computers. ~Unknown

Yeah, that's why I'm confused. I keep having my app crash because it says "unrecognized selector sent to instance... [CALayer fireDate:] NSException." Also, the Research Assistant is AMAZING. Open that by Ctrl-Shift-?, it has quick references to what you're typing, links to the docs, and even sample code references. Best feature in XCode yet.

Mac users swear by their computers, PC users swear at their computers. ~Unknown

Don't call methods that don't exist or it will throw an exception! You need to pay close attention to your warnings, and perhaps even treat warnings as errors so that it forces you to deal with them before you get to play.

I think Research Assistant is neat, but is generally not very useful to me and clutters my workspace, so I prefer to option-double-click to quickly jump to documentation when I need it from time to time. command-double-click is equally (if not more) useful because it sends you to the declaration in the appropriate header.

AnotherJake Wrote:Don't call methods that don't exist or it will throw an exception! You need to pay close attention to your warnings, and perhaps even treat warnings as errors so that it forces you to deal with them before you get to play.

I think Research Assistant is neat, but is generally not very useful to me and clutters my workspace, so I prefer to option-double-click to quickly jump to documentation when I need it from time to time. command-double-click is equally (if not more) useful because it sends you to the declaration in the appropriate header.

It's not me! We have not code that calls that method in the CALayer. I have no idea why it's being called. The only thing I can think of is there is some side effect to all the animations we have, but if that is the case, it's Apple's fault. I don't even know where to start debugging this one. I'm probably going to have to follow the stack for the next couple of hours (or days...) to watch where this unrecognized method gets called

Mac users swear by their computers, PC users swear at their computers. ~Unknown

Hmm... Well if you aren't calling the non-existent method then perhaps it is the OS that is calling it, and it is calling it an unrecognized selector because it is calling it on an object which has already been released? Impossible to say for sure what is happening on the system's side of the fence, however:

Neglecting to retain an object or inadvertently releasing one is the root of probably 75% of all the mystery bugs and memory issues I've ever had with Cocoa. One quick way to help confirm this is to add a retain to your suspected object.

You could try enabling zombies (add NSZombieEnabled with YES to your environment variables), set a breakpoint on objc_exception_throw, and then run in the debugger. That should stop you when you try to message the dead object.