Re: Triggering an NSTextStorage Bug
Re: Triggering an NSTextStorage Bug
- Subject: Re: Triggering an NSTextStorage Bug
- From: Andy Lee <email@hidden>
- Date: Tue, 19 Mar 2013 20:31:10 -0400
I wonder if init is too early to be setting the default paragraph style. When I changed that line in your setup method to the following, it no longer crashed on launch.
[self performSelector:@selector(setDefaultParagraphStyle:)
withObject:[NSParagraphStyle defaultParagraphStyle]
afterDelay:0];
--Andy
On Mar 19, 2013, at 7:54 PM, Seth Willits <email@hidden> wrote:
>
> This has taken me a *very long time* to narrow down to its simplest bits and it's very puzzling to me.
>
>
> The short story is I have an NSTextStorage subclass as I'm doing many different things, syntax coloring among them. I would swear that everything I'm doing is a legitimate implementation, but there is obviously something causing internal behavior in the text system to go haywire. The result is that the text system itself (not me!) is over-releasing the NSParagraphStyle. The memory management in my code is solid, so the problem has to be in the text system itself.
>
> The example project:
> http://www.sethwillits.com/temp/PGSOverRelease.zip
>
> There are a number of factors involved in reliably reproducing this behavior and this project has one set of circumstances that will reproduce it, but there are others. If you slightly change any of these factors (all changes which should have no effect), then the over-release crash does not occur.
>
> I have read and re-read all of the text storage documentation multiple times and I am thusly confident that either some critical elusive behavior is undocumented or I've found a legitimate bug in the text system.
>
>
> Any help would be greatly appreciated. This is severely impacting my work at the moment.
>
>
> --
> Seth Willits
>
>
>
>
> _______________________________________________
>
> 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
_______________________________________________
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