Skip navigation.
 
mlRe: Autoreleasepool problems
FROM : Kay Roepke
DATE : Wed Jul 19 22:02:52 2006

On 19. Jul 2006, at 21:39 Uhr, Jerry Krinock wrote:

> Although it says
> the same thing that Shawn said, maybe this will help engage your 
> brain to
> find this one


Yup. I walked away, had dinner and then looked at it again. It was 
precisely this sort of problem. I was using two instances
of NSCFString which were returned by a substring call to a string. My 
code generator was buggy in that it released those objects (which 
happend to end up at the same address, that's why I had two) and much 
later the EOF token occupied the same address. When the pool was 
released the eof token
got overreleased, obscuring the actual reason. Had me happily run off 
in the wrong direction for a couple of hours.

ObjectAlloc should have some option to automatically perform some 
balance analysis of alloc/dealloc events. That would make it much 
easier.
Unfortunately I couldn't get OmniObjectMeter to run my tool, because 
I have to set DYLD_FRAMEWORK_PATH et al. It might actually have that
function.

At the end of the day I was lucky that I had two overreleased 
instances of those substrings in precisely the right order to provoke 
the crash, or I
wouldn't even have noticed this early on.

Thanks for the input,

-k
--
Kay Röpke <<email_removed>>
classdump Software

Related mailsAuthorDate
mlAutoreleasepool problems Kay Roepke Jul 19, 19:54
mlRe: Autoreleasepool problems Shawn Erickson Jul 19, 20:11
mlRe: Autoreleasepool problems Kay Roepke Jul 19, 20:28
mlRe: Re: Autoreleasepool problems Shawn Erickson Jul 19, 20:41
mlRe: Autoreleasepool problems Kay Roepke Jul 19, 21:16
mlRe: Autoreleasepool problems Jerry Krinock Jul 19, 21:39
mlRe: Autoreleasepool problems Kay Roepke Jul 19, 22:02
mlNew debugging feature request? Was: Autoreleasepool problems Scott Ribe Jul 20, 18:34