-
-
Notifications
You must be signed in to change notification settings - Fork 229
Description
Package
Sentry.Maui
.NET Flavor
Other
.NET Version
8.0.403
OS
iOS
SDK Version
4.13.-
Self-Hosted Sentry Version
No response
Steps to Reproduce
We have error report in Sentry that saying Application Specific Information: UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={810, 1080}, scale=2.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert. when we look at the thread that cause it also contain stack trace saying Sentry_Maui_Sentry_Maui_Internal_ScreenshotAttachmentContent__c__GetStreamb__2_1. I am not really sure actually if this is caused by Sentry or not but we do attach the attachment on sentry so it might be the cause. Here I also attach the crash report dbc983a62a9a4fb7bdef3f940462a18d-symbolicated.crash.zip
Expected Result
App should not crash or throwing exception
Actual Result
App throwing exception
Solution
The root cause is a problem with the MAUI ScreenshotImplementation class. Ideally this would be addressed in the MAUI repo then:
For the time being, we've wrapped our usage of this API in a try..catch/log block. In these instances, no screenshot will be captured but at least the application won't crash.
Metadata
Metadata
Assignees
Labels
Projects
Status
Status