Thanks for your help. The problem is now solved - although I'm still none the 
wiser as to why the problem only manifested when the file was opened and then 
the document closed before the file was closed.  I'm kind of curious to 
understand what was going on under the hood that might explain this oddity - 
but I suppose I'll never know.

The solution to the problem was to empty the array populating the table and 
then reload the table before closing the document.  It feels like an oddly 
unnecessary extra step.

Thanks again though.

On 26 Feb 2014, at 16:11, Fritz Anderson <fri...@manoverboard.org> wrote:

> On 25 Feb 2014, at 2:39 PM, Pax <45rpmli...@googlemail.com> wrote:
> 
>> This is a really weird problem (in my view, anyway), because it only occurs 
>> in a very particular set of circumstances.  My application is NSDocument 
>> based (just in case it makes a difference), and my application uses ARC.
> 
> [Detailed description of various does-work execution paths]
> 
>> If I open the document and then double click on a file in the list, but then 
>> close my document **before** closing the newly opened file my application 
>> crashes with "message sent to deallocated instance".
> 
> You don’t say whether you have profiled the app with Instruments, using the 
> Zombies template, which is the first-resort method for handling this 
> situation. Product > Scheme > Edit Scheme… (cmd-<), and make sure the target 
> you want to investigate is selected at the top-left popup. Select the Profile 
> action, and then Zombies in the Instrument popup. Run the Profile action 
> (various ways, including Product > Profile, cmd-I).
> 
> Reproduce your bug, and examine the Allocations trace to see the 
> retain/release history of the object in question. At least you’ll know more, 
> and can refine your question.
> 
>       — F
> 


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to