NSMutableAttributedString initWithHTML / initWithData trouble
NSMutableAttributedString initWithHTML / initWithData trouble
- Subject: NSMutableAttributedString initWithHTML / initWithData trouble
- From: Greg Hoover <email@hidden>
- Date: Fri, 13 Jul 2007 23:08:55 -0700
I have been using the initWithHTML function to convert from an
already loaded HTML string, but some of the time run into this
crash. I tried to take the initWithHTML function out and went
straight for initWithData (document type specified as HTML -- as
shown) and still get the following backtrace. Anyone encountered
this? Here's how I'm calling it:
NSString *title = [newsItem objectForKey: @"title"];
if (!title)
continue;
NSData *titleData = [title dataUsingEncoding: [title fastestEncoding]];
if (!titleData)
continue;
NSMutableAttributedString *attrStr = [[NSMutableAttributedString
alloc] initWithData: titleData
options: [NSDictionary dictionaryWithObject:
NSHTMLTextDocumentType
forKey: NSDocumentTypeDocumentOption]
documentAttributes: nil
error: NULL];
#0 0x900028ba in malloc
#1 0x00002420 in <function called from gdb>
#2 0x9537f8c6 in KHTMLPart::settings
#3 0x9537f862 in -[WebCoreSettings _updateAllViews]
#4 0x9537f3ca in -[WebCoreSettings setCursiveFontFamily:]
#5 0x951d9650 in -[WebView(WebPrivate)
_updateWebCoreSettingsFromPreferences:]
#6 0x951d7530 in -[WebView
_commonInitializationWithFrameName:groupName:]
#7 0x951d713e in -[WebView initWithFrame:frameName:groupName:]
#8 0x9520a406 in -[WebView initWithFrame:]
#9 0x934f44d6 in -[NSHTMLReader _loadUsingWebKit]
#10 0x934f40d5 in -[NSHTMLReader attributedString]
#11 0x934f3269 in _NSReadAttributedStringFromURLOrData
#12 0x934f0ec7 in -[NSAttributedString
(NSAttributedStringKitAdditions)
initWithData:options:documentAttributes:error:]
#13 0x002dffb0 in +[MSNewsServices
attributedStringForNews:withDescriptions:maxEntries:] at
MSNewsServices.m:420
Any insight would be much appreciated.
Greg
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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