You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android] Crash when displaying large images (Pixel 8 Pro, Android 15) — Canvas: trying to draw too large bitmap #28352
Describe the bug
When trying to send or view a high-resolution image (6144x8160 pixels, taken with Pixel 8 Pro 50MP camera) in a chat, Keybase crashes with the error:
java.lang.RuntimeException: Canvas: trying to draw too large(200540160bytes) bitmap.
The image is around 7.6MB on disk (JPEG), but when Android tries to draw it, it uses ~200MB RAM because of the pixel dimensions.
The crash happens immediately after adding the photo.
To Reproduce
Steps to reproduce the behavior:
Go to any chat
Click on Camera button > Photo from library > pick a Pixel 50MP picture (6144x8160)
Add it to the chat
App crashes on load
Expected behavior
The app should properly downscale large images before rendering them, to prevent Canvas from crashing.
Activity