I am using NSAttributedString
in my code. I am getting the below crash sometimes.
Crashed: com.apple.main-thread EXC_BAD_ACCESS KER
If you working with HTML strings in NSAttributedString
it also may crash, as it said in docs:
The HTML importer should not be called from a background thread (that is, the options dictionary includes NSDocumentTypeDocumentAttribute with a value of NSHTMLTextDocumentType). It will try to synchronize with the main thread, fail, and time out. Calling it from the main thread works (but can still time out if the HTML contains references to external resources, which should be avoided at all costs). The HTML import mechanism is meant for implementing something like markdown (that is, text styles, colors, and so on), not for general HTML import.
Anyway you should provide more details for your crash to get correct answer.