• 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: CGContextSelectFont spinlock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGContextSelectFont spinlock


  • Subject: Re: CGContextSelectFont spinlock
  • From: Stevo Brock <email@hidden>
  • Date: Wed, 15 Sep 2010 16:11:52 -0700

Apparently the "font system" was not initialized before this call.  Putting a "[UIFont familyNames]" somewhere previous causes things to roll just fine.

I should mention that this is an OpenGL based app with minimal other system UI.

-Stevo Brock
 Head of Development
 Monkey Tools, LLC
 www.monkey-tools.com




On Sep 15, 2010, at 1:49 PM, Stevo Brock wrote:

> I'm trying to add some custom font support to an iPad app and I keep running into a spinlock from CGContextSelectFont.
>
> Happens on SDK 4.0 Simulator and Device running 3.2.2.  I've narrowed down the code to:
>
> 		CGContextRef	context = CGBitmapContextCreate(&data, 1, 1, 8, 4, CGColorSpaceCreateDeviceRGB(),
> 								kCGImageAlphaPremultipliedLast);
> 		CGContextSelectFont(context, [@"Comic Sans MS Bold" UTF8String], 24.0, kCGEncodingMacRoman);
> 		CGContextRelease(context);
>
> Depending on where I put this code, sometimes it runs through just fine and sometimes it spinlocks.  The stack trace is just:
>
> 0: __spin_lock
> 1: ??
>
> Where is it legal to call this function and why would it spin lock elsewhere?  Help!
>
> -Stevo Brock
> Head of Development
> Monkey Tools, LLC
> www.monkey-tools.com
>
>
>
>
> _______________________________________________
>
> 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

_______________________________________________

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: CGContextSelectFont spinlock
      • From: Vince DeMarco <email@hidden>
References: 
 >CGContextSelectFont spinlock (From: Stevo Brock <email@hidden>)

  • Prev by Date: CGContextSelectFont spinlock
  • Next by Date: Re: CGContextSelectFont spinlock
  • Previous by thread: CGContextSelectFont spinlock
  • Next by thread: Re: CGContextSelectFont spinlock
  • Index(es):
    • Date
    • Thread