Re: Why is the latest WebKit interacting with my NSThread?
Re: Why is the latest WebKit interacting with my NSThread?
- Subject: Re: Why is the latest WebKit interacting with my NSThread?
- From: "Michael Dupuis" <email@hidden>
- Date: Fri, 7 Dec 2007 07:57:00 -0500
> Since upgrading to 10.4.11 and Safari 3, I notice now that a thread in my
> application throws the following errors when an NSThread thread runs:
>
> WebKit Threading Violation - +[DOMDocument(WebCoreInternal)
> _wrapDocument:]
> called from secondary thread
>
> WebKit Threading Violation - +[DOMCSSStyleDeclaration(WebCoreInternal)
> _wrapCSSStyleDeclaration:] called from secondary thread
>
> WebKit Threading Violation - -[DOMCSSValue dealloc] called from secondary
> thread
>
> WebKit Threading Violation - -[DOMNode dealloc] called from secondary
> thread
Well after experimenting for a bit longer after posting this, I found the
problem: I was calling
[[[NSAttributedString alloc] initWithHTML:theData documentAttributes:nil]
autorelease]
in a thread, and apparently it's now not thread-safe (or maybe it never
was). Moving this outside of my thread resolved the problem. This call must
be accessing WebKit, which I guess sort of makes sense, but I wouldn't have
expected an NSAttributedString dependancy on WebKit.
_______________________________________________
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