Signal crashes on selecting group image from gallery
- [X] I have searched open and closed issues for duplicates
- [X] I am submitting a bug report for existing functionality that does not work as intended
- [X] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
- [X] This isn't a feature request or a discussion topic
Bug description
Signal crashes on setting a photo for a group
Steps to reproduce
- go to group setting
- edit group
- edit photo
- choose from gallery
Boom
Actual result: Signal crashes Expected result: Signal should not crash
Screenshots
Device info
Device: Huawei P30 Pro, VOG-L29 Android version: 10.1.0.123 Signal version: 4.65.2
Link to debug log
https://debuglogs.org/61484b394562b7a1bc6b5bf65e15f67df856fd2aef0dfc7521b89104b03a7132
Crash happens around 22:35:12.
Can confirm same issue on:
Google Pixel 3a Android 10 Signal 4.67.1
Same here
Samsung Galaxy S10e Android 10 Signal 4.68.4
Still happens with 4.69.4
https://debuglogs.org/f7885d6c09fe930f5677e9f139610112c0f900e74b90b3b880ec564bf94b2d97
Same
Google Pixel 3a Android 11 Signal 4.70.5
@phraemer could you provide a debug log with the crash?
Looking for some help in reproducing this issue, as I'm unable to, so I'm guessing there's something unique/different y'all are doing that I'm not. Some quick questions:
- Does it always crash?
- Does it crash for every image you pick? Can you try small and large images.
- Does it crash when taking a picture?
Thanks!
Hi @cody-signal
- I think so yes. It may have on some occasions just gone back one screen but I'm not sure.
- It crashed when opening the gallery before any image can be selected
- Yep. Again, while opening the camera.
https://debuglogs.org/3bd57e7b74ea2783254e7a9e08c0ba5becc87b7163175b13ff1a6aaf4c10a5f7
This is caused by onSaveInstanceState method of EditProfileFragment. If image size exceeds 1MB it throws TransactionTooLargeException and causes crash. Comment outing this method solves the problem.
If image size exceeds 1MB it throws
It crashes before an image is even selected from the gallery or a photo taken. Is it using the current image and that is > 1MB?
@phraemer It is not about the gallery or photo taken. It is about existing avatar.
Following converts existing avatar to byte array, and buffer has 1Mb limit, so it throws an exception.
outState.putByteArray(AVATAR_STATE, viewModel.getAvatarSnapshot());
To find root cause, I used TooLarge tool mentioned on https://stackoverflow.com/a/50162810/1648708
I found a 100 % reproducible scenario:
- (crucial point) create a group WITH large photo
- go to group settings
- edit photo
- choose from gallery ... crash
This is fixed in the upcoming 4.72 release, thanks!
I have version 5.0.9 for Android, still crashing every time I select gallery (profile, group and message).
@pr0gg3r Can you open a new issue with a debuglog? After the crash happens, open Signal again and go to Settings > Advanced > Submit debug log.
Without a debug log it's almost impossible to fix.
I just reinstalled Signal and have now version 5.0.10 - problem still exists. Every time I tap on from gallery the gallery opens for a second and than it crashs. Here is my log: https://debuglogs.org/778731890a5514c316beff2a4055ce05b8160b200110ee76305e13fe9b53be00
Okay, so it seems to crash doing this: https://github.com/signalapp/Signal-Android/blob/v5.0.10/app/src/main/java/org/thoughtcrime/securesms/recipients/LiveRecipient.java#L127-L131
Still, @pr0gg3r, a separate issue will get this more attention, since I don't know if the devs look into closed issues...
Here is the new bug report https://github.com/signalapp/Signal-Android/issues/10624
Lovely bug report! 👏🏾