Crash When Run app On Xcode15 Simulator

When UICollectionViewFlowLayoutAlertForInvalidItemSize Occured Some Log Like These Occurred, and then app crash

*** Assertion failure in void _UIGraphicsBeginImageContextWithOptions(CGSize, BOOL, CGFloat, BOOL)(), UIGraphics.m:410

crash Output

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={0, 16}, scale=3.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert.'

The fact is that if you build the project with XCode15 and run the app on iOS17, it will crash. But if you build the project with XCode14 or earlier version, it will not crash on iOS17. I don't understand how the difference is caused since UIKit is a system dynamic library, it is built-in in the iphone's iOS17. If anyone can explain the cause of the difference, I'm all your ears.

Crash When Run app On Xcode15 Simulator
 
 
Q