Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Fatal Exception: NSInternalInconsistencyException UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={0, 1133}, scale=2.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert.

I have a .Net MAUI App. As soon as i close the app or put in the background the app crashes instantly. It only happens on OS version: iPad OS 17.5.1 Model:iPad mini (6th generation).

Below is the exception logged on firebase crashlytics

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

Any suggestions or ideas ?

I believe that this is the issue that you are having. It was fixed under XF; it was brought over to Maui 9.x here - I'm unsure if has actually made it to an actual SR release yet.

Fatal Exception: NSInternalInconsistencyException UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={0, 1133}, scale=2.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert.
 
 
Q