• 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: Crash on iOS when encoding an NSAttributedString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash on iOS when encoding an NSAttributedString


  • Subject: Re: Crash on iOS when encoding an NSAttributedString
  • From: Graham Cox <email@hidden>
  • Date: Mon, 20 Jan 2014 10:35:22 +1100

Hi Marcus,

I've had a crash while dearchiving core text objects, though not this particular case with archiving.

Obviously the object that's crashing is a UIFont used by the NSAttributedString. One of its properties - by the look of it the font ascent - triggers the underlying C++ code to calculate the metrics of the font. It's possible that the font is corrupt and the code just isn't ready to handle the possibility. Can you try with a different font and see if the problem goes away?

It's probably worth filing a radar because I would say that archiving arbitrary fonts either needs to work robustly or fail cleanly. When I filed a radar on a similar kind of fault recently it got notified as a dupe, so some of these issues are known.

--Graham


On 20 Jan 2014, at 5:54 am, Markus Spoettl <email@hidden> wrote:

> I got a crash log from a user that's mildly puzzling. It happens somewhere deep down CoreText it seems, while encoding an NSAttributedString (whose content I don't know). Any ideas how it can some to this?

> []

> Thread 0 Crashed:
> 0   ???               0x7300786966657250 0 + 8286755708446536272
> 1   CoreText          0x000000018c689bd8 TBaseFont::CalculateFontMetrics(bool) const + 100
> 2   CoreText          0x000000018c699930 TComponentFont::CalculateFontMetrics(bool) const + 52
> 3   CoreText          0x000000018c689a2c TBaseFont::InitFontMetrics() const + 64
> 4   CoreText          0x000000018c70bec8 TBaseFont::GetStrikeMetrics(double, CGAffineTransform const*, bool) const + 96
> 5   CoreText          0x000000018c689774 TFont::InitStrikeMetrics() const + 64
> 6   CoreText          0x000000018c689704 CTFontGetAscent + 120
> 7   GraphicsServices  0x00000001917ffc14 GSFontEnsureExtraData + 256
> 8   GraphicsServices  0x0000000191802940 GSFontGetExtraData + 52
> 9   UIFoundation      0x0000000194c3ee00 -[UIFont isIBTextStyleFont] + 12
> 10  UIFoundation      0x0000000194c3e904 -[UIFont encodeWithCoder:] + 112


_______________________________________________

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: Crash on iOS when encoding an NSAttributedString
      • From: Markus Spoettl <email@hidden>
References: 
 >Crash on iOS when encoding an NSAttributedString (From: Markus Spoettl <email@hidden>)

  • Prev by Date: capturing the content of a SpriteKit SKView (or SKScene, SKNode) to an NSImage ?
  • Next by Date: Re: UIButton over sliding UIImageView disappears until slide complete
  • Previous by thread: Re: Crash on iOS when encoding an NSAttributedString
  • Next by thread: Re: Crash on iOS when encoding an NSAttributedString
  • Index(es):
    • Date
    • Thread