Re: CGContextSelectFont spinlock

2010-09-16 Thread Stevo Brock
Great suggestion. Here's the full list of backtraces from the iPad (3.2.2)... Spin lock is in Thread 1 at the end... -Stevo Thread 11 (thread 14851): #0 0x33b11968 in select$DARWIN_EXTSN () #1 0x31528d82 in __CFSocketManager () #2 0x33b6678c in _pthread_start () #3 0x33b5c078 in thread_st

Re: CGContextSelectFont spinlock

2010-09-16 Thread Stevo Brock
My original solution is to call: [UIFont familyNames]; in the applicationDidFinishLaunching method to load the font database to avoid the deadlock. -Stevo On Sep 16, 2010, at 3:26 PM, A.M. wrote: > > On Sep 16, 2010, at 5:54 PM, Stevo Brock wrote: > >> Great suggestion. >> >> Her

Re: CGContextSelectFont spinlock

2010-09-16 Thread A.M.
On Sep 16, 2010, at 5:54 PM, Stevo Brock wrote: > Great suggestion. > > Here's the full list of backtraces from the iPad (3.2.2)... Spin lock is in > Thread 1 at the end... > > Thread 1 (thread 12035): > #0 0x33af18a4 in spin_lock () > #1 0x33af21aa in pthread_once () > #2 0x33d795a2 in CG

Re: CGContextSelectFont spinlock

2010-09-15 Thread Stevo Brock
Here goes: Thread 15 (process 98336): #0 0x95a46086 in select$DARWIN_EXTSN () #1 0x02e968ce in __CFSocketManager () #2 0x95a5481d in _pthread_start () #3 0x95a546a2 in thread_start () Thread 13 (process 98336): #0 0x95a270fa in mach_msg_trap () #1 0x95a27867 in mach_msg () #2 0x02e66052 in

Re: CGContextSelectFont spinlock

2010-09-15 Thread Kyle Sluder
On Wed, Sep 15, 2010 at 5:53 PM, Stevo Brock wrote: > Nothing related at all going on. It still might be useful to get a backtrace across all threads ("thread apply all bt"). --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: CGContextSelectFont spinlock

2010-09-15 Thread Stevo Brock
Nothing related at all going on. -Stevo On Sep 15, 2010, at 5:30 PM, Wim Lewis wrote: > > On Sep 15, 2010, at 5:22 PM, Stevo Brock wrote: >> And also unfortunately, when I click Pause in the Debugger, the stack trace >> I gave is all that is shown. If there is a way to get a more complete st

Re: CGContextSelectFont spinlock

2010-09-15 Thread Wim Lewis
On Sep 15, 2010, at 5:22 PM, Stevo Brock wrote: > And also unfortunately, when I click Pause in the Debugger, the stack trace I > gave is all that is shown. If there is a way to get a more complete stack > trace, please let me know. Is there anything releted-looking going on in another thread?

Re: CGContextSelectFont spinlock

2010-09-15 Thread Stevo Brock
Hi Aki, Thanks for your reply. Unfortunately changing the font name to the Postscript name does not change the situation. And also unfortunately, when I click Pause in the Debugger, the stack trace I gave is all that is shown. If there is a way to get a more complete stack trace, please let

Re: CGContextSelectFont spinlock

2010-09-15 Thread Aki Inoue
Since I didn't see the actual backtrace, I cannot comment on what could be causing a spin lock deadlock. One glaring point I'm concerned with this example is that the font name being passed to CGContextSelectFont is incorrect. All of our font APIs, both on Mac OS X and iOS, are expecting the po

Re: CGContextSelectFont spinlock

2010-09-15 Thread Stevo Brock
Hi Vince, The details of the parameters to the function aren't important. The specific example I gave has been reduced down from some other code. In the end I'm not using Comic Sans, but it will come from an NSString. The point is that calling CGContextSelectFont() before doing some other un

Re: CGContextSelectFont spinlock

2010-09-15 Thread Vince DeMarco
On Sep 15, 2010, at 4:11 PM, Stevo Brock wrote: > 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. >

Re: CGContextSelectFont spinlock

2010-09-15 Thread Stevo Brock
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.monke

CGContextSelectFont spinlock

2010-09-15 Thread Stevo Brock
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: CGContextRefcontext = CGBitmapContextCreate(&data, 1, 1, 8, 4, CGCo