CoreText crashes when run in multiple threads

后端 未结 5 1538
-上瘾入骨i
-上瘾入骨i 2021-02-04 08:32

I have a very weird problem with core text, which sometimes randomly and sometimes reproducibly crashes my application. I use it to lay out and render a couple of pages. I do th

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 08:56

    CoreText takes a while to initialize the font lookup table when you use it for the first time. I imagine you might be able to get rid of your problem by first triggering a loading of this table before going to multiple threads.

    See http://www.cocoanetics.com/2011/04/coretext-loading-performance/ for a method how.

提交回复
热议问题