getsentry / sentry-unity

Development of Sentry SDK for Unity
https://docs.sentry.io/platforms/unity/
MIT License
206 stars 51 forks source link

Screenshot attachments have artifacts on mobile devices #1357

Open MarekMrowiec opened 1 year ago

MarekMrowiec commented 1 year ago

Environment

How do you use Sentry? sentry.io

Which version of the SDK? 1.4.0

How did you install the package? (Git-URL, Assetstore) Git-URL

Which version of Unity? 2021.3.17f1 IL2CPP scripting backend

Is this happening in Unity (editor) or on a player like Android, iOS, Windows? Android, iOS

Steps to Reproduce

  1. Make sure "Attach Screenshot" is enable (my settings Quality: Medium, Compression: 75)
  2. Trigger exception on device (iphone or android)
  3. See screenshot attachments on Sentry dashboard

Expected Result

Screenshots have no artifacts

Actual Result

Screenshots sometimes have artifacts: iOS: smaller, mirrored duplicate in the corner Android: stretched top and right edge

Any logs or screenshots

Reproduced on: iPhone 14 Pro (iOS 16.1.1) iPhone XR (iOS 14.4) iPad 5th gen (iOS 14.3)

Xiaomi M2007J17G (Android 11)

Example screenshot iOS: screenshot

bitsandfoxes commented 1 year ago

Thanks for raising this. The SDK makes use of Unity's ScreenCapture.CaptureScreenshotIntoRenderTexture. Do you make use of a particular camera setup?

MarekMrowiec commented 1 year ago

Here is my camera setup image