Re: tableView - message sent to deallocated instance
Re: tableView - message sent to deallocated instance
- Subject: Re: tableView - message sent to deallocated instance
- From: Pax <email@hidden>
- Date: Wed, 26 Feb 2014 20:42:40 +0000
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 <email@hidden> wrote:
> On 25 Feb 2014, at 2:39 PM, Pax <email@hidden> 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 (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