Re: looking for a memory problem
Re: looking for a memory problem
- Subject: Re: looking for a memory problem
- From: Martin Hewitson <email@hidden>
- Date: Tue, 17 Jul 2012 16:09:13 +0200
Thanks to all. Due to the various clues and tips I finally tracked down the problem. I was creating a bunch of autoreleased objects within an autorelease pool of an NSOperation then storing them. But of course, when the pool is drained they all get released and boom!
Thanks,
Martin
On 17, Jul, 2012, at 03:29 PM, Charlie Dickman <email@hidden> wrote:
> I've seen this kind of thing before when I have released an object that was allocated in the autorelease pool. Have a go over of the objects you release and make sure that you own them when you release them.
>
> On Jul 17, 2012, at 6:30 AM, Martin Hewitson wrote:
>
>> Dear list,
>>
>> I've been trying to track down a crash that happens sometimes when a document is closed in my NSPersistentDocument based app. This started to appear during the process of going from GC to non-GC. But it only happens after an undetermined number of document closes and reopens. The error message I get in the debugger is
>>
>> * thread #1: tid = 0x2103, 0x00007fff8f614e90 libobjc.A.dylib`objc_msgSend + 16, stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
>> frame #0: 0x00007fff8f614e90 libobjc.A.dylib`objc_msgSend + 16
>> frame #1: 0x00000001098147d0
>> frame #2: 0x00007fff8f61a03c libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 434
>> frame #3: 0x00007fff938c8915 CoreFoundation`_CFAutoreleasePoolPop + 37
>> frame #4: 0x00007fff8b8bb6cf Foundation`-[NSAutoreleasePool drain] + 154
>> frame #5: 0x00007fff90146115 AppKit`-[NSApplication run] + 634
>> frame #6: 0x00007fff903c2244 AppKit`NSApplicationMain + 867
>> frame #7: 0x0000000100001574 TeXnicle`start + 52
>>
>>
>> I've tried disabling various parts of the app trying to isolate where the issue might be.
>>
>> Could anyone offer any advice on how I might better track this down? Perhaps using instruments in some way?
>>
>> Cheers,
>>
>> Martin
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> Charlie Dickman
> email@hidden
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: email@hidden
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden