I’m so annoyed at Cocoa.
I’m so annoyed at Cocoa. Despite my best efforts, Message still freezes on a very
small percentage of Jaguar machines. I know where the problem is;
Apple’s text-rendering function decides to freeze (it’s not a deadlock
per se, but rather an unterminating loop).
I spent a couple of hours last night adding a
bunch of code to spawn a separate thread to do the
text drawing so that I could watch that thread from the main
thread and kill it if it wandered off into the weeds.
Well, it turns out (after much experimentation) that almost
all drawing will work in a subthread, but
NSAttributedString drawing has zero effect.
Don’t worry, I’m using [NSApplication
detachNewDrawingThread:::] and all that. I’ve tried all the
tricks. It’s überweird.