Calling CALayer’s setNeedsDisplay() methodology on iOS 17 can result in a crash. Although i’ve known as the tactic from the primary thread, internally it triggers the layoutSubviews methodology of the views from a background thread, inflicting the beneath crash.
Terminating app because of uncaught exception ‘NSInternalInconsistencyException’, purpose: ‘Modifications to the structure engine should not be carried out from a background thread after it has been accessed from the primary thread. Unsupported structure off the primary thread for UITextEffectsWindow with no related or ancestor view controller
We’ve got a grid view drawn utilizing CALayer. Each time there are adjustments within the grid information, we redraw the grid utilizing the layer.setNeedsDisplay() methodology. Nevertheless, after we submit information shortly within the grid, it calls this methodology regularly, which ends up in crashes. This difficulty began occurring after iOS 17. Have hooked up the crash logs please test the backtrace of the crash.