• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
textStorage readFromURL does not like blanks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

textStorage readFromURL does not like blanks


  • Subject: textStorage readFromURL does not like blanks
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 18 Aug 2007 20:24:26 +0200

In a document based app I do:
[ textView setString: @"" ];
NSTextStorage *textStorage = [ textView textStorage ];
NSDictionary *dict;
[ textStorage readFromURL: fu options: nil documentAttributes: &dict error: outError ]


"fu" is a file url pointing to:

<html>
<body>
<ul>
	<li><a href="#a"> aaa </a> 	</li>
	<li><a href="#b"> bbb </a> 	</li>
</ul>
</body>
</html>

This creates a crash. But if I remove the blank after "bbb" then all will be fine.
Is this document really bad? Why is there no blank allowed at this place?



The crash writes into console.log:
...myApp: objc: FREED(id): message isKindOfClass: sent to freed object=0x3f5e20


OS Version:     10.4.10 (Build 8R218)

Thread 0 Crashed:
0 libobjc.A.dylib 0x90a49ca0 _objc_trap + 0
1 libobjc.A.dylib 0x90a49c14 _objc_error + 76
2 libobjc.A.dylib 0x90a49ba4 __objc_error + 64
3 com.apple.AppKit 0x937e7804 attributeDictionaryHash + 84
4 com.apple.CoreFoundation 0x907dbcd8 __CFSetFindBuckets1b + 140
5 com.apple.CoreFoundation 0x907db3f8 CFSetGetValue + 212
6 com.apple.AppKit 0x937e754c + [NSAttributeDictionary newWithDictionary:] + 168
7 com.apple.Foundation 0x92bfb630 - [NSConcreteMutableAttributedString setAttributes:range:] + 64
8 com.apple.AppKit 0x938753ec - [NSConcreteTextStorage setAttributes:range:] + 80
9 com.apple.AppKit 0x93c980e0 -[NSHTMLReader _addMarkersToList:range:] + 700
10 com.apple.AppKit 0x939b37c8 -[NSHTMLReader _exitElement:tag:display:startIndex:] + 1516
11 com.apple.AppKit 0x93c98770 -[NSHTMLReader _traverseNode:depth:embedded:] + 1036
12 com.apple.AppKit 0x93c9871c -[NSHTMLReader _traverseNode:depth:embedded:] + 952
13 com.apple.AppKit 0x93c9871c -[NSHTMLReader _traverseNode:depth:embedded:] + 952
14 com.apple.AppKit 0x93c984d0 -[NSHTMLReader _traverseNode:depth:embedded:] + 364
15 com.apple.AppKit 0x939aab4c -[NSHTMLReader _loadUsingWebKit] + 1728
16 com.apple.AppKit 0x939aa258 -[NSHTMLReader attributedString] + 36
17 com.apple.AppKit 0x939a97c0 _NSReadAttributedStringFromURLOrData + 6132
18 com.apple.AppKit 0x939da3ec - [NSMutableAttributedString(NSMutableAttributedStringKitAdditions) readFromURL:options:documentAttributes:error:] + 24


Gerriet.

_______________________________________________

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


  • Follow-Ups:
    • Re: textStorage readFromURL does not like blanks
      • From: Martin Wierschin <email@hidden>
  • Prev by Date: Re: Another Core Data + table view question
  • Next by Date: Re: Strange _originalSnapshot error
  • Previous by thread: Re: Responder chain messed up after window close...
  • Next by thread: Re: textStorage readFromURL does not like blanks
  • Index(es):
    • Date
    • Thread