I use core text to draw sth and it receives EXC_BAD_ACCESS problem in case of
CTFramesetterCreateWithAttributedString((CFAttributedStringRef)immutableContent);
I also print immutableContent which is a NSAttributedString:

The problem here is when this happens, I don’t know how to debug it.
I guess there is sth wrong with the NSAttributedString, but I don’t know how to fix it. Besides, the method used to create the NSAttributedString works in another project. So why I am confused~~
thanks!
my code and works fine
self.attributedText – NSAttributedString