Re: Strange error solved by turning off "Non-contiguous Layout"
Re: Strange error solved by turning off "Non-contiguous Layout"
- Subject: Re: Strange error solved by turning off "Non-contiguous Layout"
- From: Ken Thomases <email@hidden>
- Date: Tue, 21 Dec 2010 23:37:47 -0600
On Dec 21, 2010, at 10:08 PM, Brad Stone wrote:
> I have an NSTextView that has about 1,900 characters in it. Just regular text. If I edit the text and save my app hangs at [[self managedObjectContext] commitEditing]; I found setting nonContinuousLayout to NO in the NSTextView prevents the hang but that's not really solving the problem.
>
> Here's what's strange. If I expand the window so the all the text shows without the scroll bar it doesn't hang. If I edit the same text but scroll down the get it I get a hang. If I set nonContiguousLayout to NO it doesn't hang in either scenario.
>
> What advice can anyone give as to how I can address this problem?
One useful tool is a sample of the process to see where each of its threads is spending its time. This can help identify causes of deadlocks, which is what it seems like you have.
There are several process-sampling tools in Mac OS X: the "sample" command, the Sample Process command in Activity Monitor, the Time Profile (All Thread States) tools of Shark or Instruments. For sharing on a mailing list, the text files produced by the sample command are probably simplest.
Regards,
Ken
_______________________________________________
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