What's the magic breakpoint for *** attempt to pop an unknown autorelease pool?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What's the magic breakpoint for *** attempt to pop an unknown autorelease pool?

Eliot Miranda-2
 
Hi All,

    on Mac OS X Snow Leopard anyone know the magic breakpoint to find out when the program emits "*** attempt to pop an unknown autorelease pool".  I've put breakpoints in __NSAutoreleaseNoPool, write, write$NOCANCEL$UNIX2003 (sp?) vrious ctime & ctime_r routines and still I can't get gdb to break on producing the error.  Any hints?

TIA

best
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: What's the magic breakpoint for *** attempt to pop an unknown autorelease pool?

johnmci
 
Ummm the magic eight ball says: 
"You should always drain an autorelease pool in the same context (invocation of a method or function, or body of a loop) that it was created."

"You can debug it by setting a breakpoint in the _CFAutoreleasePoolPop function. To find out exactly where, disassemble the _CFAutoreleasePoolPop function, and look for the first call to CFLog. On the i386 architecture it’s at _CFAutoreleasePoolPop+84."

Also consider just a breakpoint on NSLog CFLog   


On 2010-11-04, at 9:10 PM, Eliot Miranda wrote:

Hi All,

    on Mac OS X Snow Leopard anyone know the magic breakpoint to find out when the program emits "*** attempt to pop an unknown autorelease pool".  I've put breakpoints in __NSAutoreleaseNoPool, write, write$NOCANCEL$UNIX2003 (sp?) vrious ctime & ctime_r routines and still I can't get gdb to break on producing the error.  Any hints?

TIA

best
Eliot

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: What's the magic breakpoint for *** attempt to pop an unknown autorelease pool?

Eliot Miranda-2
 
John,

    bingo! Thanks so much!!

best,
Eliot

On Thu, Nov 4, 2010 at 9:19 PM, John M McIntosh <[hidden email]> wrote:
 
Ummm the magic eight ball says: 
"You should always drain an autorelease pool in the same context (invocation of a method or function, or body of a loop) that it was created."

"You can debug it by setting a breakpoint in the _CFAutoreleasePoolPop function. To find out exactly where, disassemble the _CFAutoreleasePoolPop function, and look for the first call to CFLog. On the i386 architecture it’s at _CFAutoreleasePoolPop+84."

Also consider just a breakpoint on NSLog CFLog   


On 2010-11-04, at 9:10 PM, Eliot Miranda wrote:

Hi All,

    on Mac OS X Snow Leopard anyone know the magic breakpoint to find out when the program emits "*** attempt to pop an unknown autorelease pool".  I've put breakpoints in __NSAutoreleaseNoPool, write, write$NOCANCEL$UNIX2003 (sp?) vrious ctime & ctime_r routines and still I can't get gdb to break on producing the error.  Any hints?

TIA

best
Eliot

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================