• 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
Re: Cocoa Text Handling Crashes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Text Handling Crashes


  • Subject: Re: Cocoa Text Handling Crashes
  • From: Andrew Thompson <email@hidden>
  • Date: Tue, 7 Jan 2003 20:43:34 -0500

On Tuesday, Jan 7, 2003, at 15:58 America/New_York, Douglas Davidson wrote:

On Monday, January 6, 2003, at 06:38 PM, Andrew Thompson wrote:

In particular, I find its quite easy to get it to die by accidentally asking an NSCell subclass to render an NSAttributedString with only one character. The key problems occur if the character turns out to be mapped to NSNullGlyph in the current font and for some characters whose bounding box is an empty rectangle.

Sounds like a malformed font. Can you determine which fonts this occurs with, where you obtained them, and what characters the font handles improperly?

Douglas Davidson

Sure, one is Apple's Osaka. The internal version number in the font it 4.2. and its 3,467,336 bytes.

Some of the unichar values for the chars would be

2003-01-07 20:37:29.322 Unicode Font Info[560] 0xF860,
2003-01-07 20:37:29.323 Unicode Font Info[560] 0xF861,
2003-01-07 20:37:29.324 Unicode Font Info[560] 0xF862,
2003-01-07 20:37:29.328 Unicode Font Info[560] 0xF87A,
2003-01-07 20:37:29.329 Unicode Font Info[560] 0xF87E,
2003-01-07 20:37:29.330 Unicode Font Info[560] 0xF87F,

This exhibits glyphs with a zero sized bounding box that cause ugly issues.

You'll first see:

2003-01-07 20:27:50.238 Unicode Font Info[457] *** Assertion failure in -[NSMutableRLEArray objectAtIndex:effectiveRange:], String.subproj/NSAttributedString.m:1002
2003-01-07 20:27:50.277 Unicode Font Info[457] Access invalid attribute location 113 (length 113)

And now things are really broken, so then whenever the screen repaints:

2003-01-07 20:27:57.499 Unicode Font Info[457] -[NSLayoutManager _fillLayoutHoleAtIndex:desiredNumberOfLines:] *** attempted layout while textStorage is editing. It is not valid to cause the layoutManager to do layout while the textStorage is editing (ie the textStorage has been sent a beginEditing message without a matching endEditing.)
2003-01-07 20:28:03.224 Unicode Font Info[457] -[NSLayoutManager _fillLayoutHoleAtIndex:desiredNumberOfLines:] *** attempted layout while textStorage is editing. It is not valid to cause the layoutManager to do layout while the textStorage is editing (ie the textStorage has been sent a beginEditing message without a matching endEditing.)

Which makes sense as the text system raised an NSException, so endEditing won't be called.

Another problomatic font would be Arial (ArialMT), which I assume came with something from Microsoft, if Apple doesn't ship in with OS X. It's version is 2.60 and size is 317,313 bytes.

This font has problems with null glyphs in the combing diacritic marks section, but I can't be more precise than that because I presently can't even display that page in my app without getting a rainbow cursor.

Let me know what you need me to do next.

AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside

(see you later space cowboy ...)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Cocoa Text Handling Crashes (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Aqua Human Interface and Safari
  • Next by Date: Re: Cocoa Text Handling Crashes
  • Previous by thread: Re: Cocoa Text Handling Crashes
  • Next by thread: Re: Cocoa Text Handling Crashes
  • Index(es):
    • Date
    • Thread