Re: Debugging memory smashers with GC

2008-12-23 Thread Clark Cox
On Tue, Dec 23, 2008 at 2:25 PM, Bill Bumgarner wrote: > Obviously, knowing what array is crashing will help. You might be able to > set a breakpoint on NSCFArray's finalize and then add a script to the > breakpoint that po's the object. > > Something like (you'll have to paste then in one line

Re: Debugging memory smashers with GC

2008-12-23 Thread Bill Bumgarner
On Dec 23, 2008, at 12:23 AM, Rob Keniger wrote: #0 0x96928cd0 in __CFTypeCollectionRelease () #1 0x968b5ad6 in CFArrayApplyFunction () #2 0x968b93fc in __CFArrayDeallocate () #3 0x90798f31 in -[NSCFArray finalize] () #4 0x92ba86b6 in finalizeOneObject () First, a question: is it always a

Re: Debugging memory smashers with GC

2008-12-23 Thread Rob Keniger
On 23/12/2008, at 10:32 AM, Rob Keniger wrote: I've tried using the MallocStackLoggingNoCompact environment variable with malloc_history but my results have been inconclusive at best. What is the best way to go about looking for this type of bug with Garbage Collection enabled? Do you

Re: Debugging memory smashers with GC

2008-12-22 Thread Rob Keniger
On 23/12/2008, at 10:24 AM, Bill Bumgarner wrote: Not necessarily. Any number of things can cause crashes like this: - trashing memory - thread mis-synchronization - something goes awry in the malloc zone That it never happens under Instruments indicates that it might be a threading issue

Re: Debugging memory smashers with GC

2008-12-22 Thread Bill Bumgarner
On Dec 22, 2008, at 4:19 PM, Rob Keniger wrote: My app is using garbage collection and I'm running into a memory smasher bug where the app will crash at seemingly random times, with an EXE_BAD_ACCESS. Obviously there is some reference to an object that is being released when I don't want i