Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Signal crashes on selecting group image from gallery

Open mlsxlist opened this issue 6 years ago • 18 comments

  • [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

mlsxlist avatar Jul 07 '20 20:07 mlsxlist

Crash happens around 22:35:12.

mlsxlist avatar Jul 07 '20 20:07 mlsxlist

Can confirm same issue on:

Google Pixel 3a Android 10 Signal 4.67.1

nine76evil avatar Jul 24 '20 05:07 nine76evil

Same here

Samsung Galaxy S10e Android 10 Signal 4.68.4

0xTom avatar Aug 05 '20 12:08 0xTom

Still happens with 4.69.4

https://debuglogs.org/f7885d6c09fe930f5677e9f139610112c0f900e74b90b3b880ec564bf94b2d97

mlsxlist avatar Aug 23 '20 06:08 mlsxlist

Same

Google Pixel 3a Android 11 Signal 4.70.5

phraemer avatar Sep 09 '20 11:09 phraemer

@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:

  1. Does it always crash?
  2. Does it crash for every image you pick? Can you try small and large images.
  3. Does it crash when taking a picture?

Thanks!

cody-signal avatar Sep 09 '20 13:09 cody-signal

Hi @cody-signal

  1. I think so yes. It may have on some occasions just gone back one screen but I'm not sure.
  2. It crashed when opening the gallery before any image can be selected
  3. Yep. Again, while opening the camera.

https://debuglogs.org/3bd57e7b74ea2783254e7a9e08c0ba5becc87b7163175b13ff1a6aaf4c10a5f7

phraemer avatar Sep 09 '20 14:09 phraemer

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.

shyos avatar Sep 09 '20 19:09 shyos

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 avatar Sep 10 '20 06:09 phraemer

@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

shyos avatar Sep 10 '20 09:09 shyos

I found a 100 % reproducible scenario:

  1. (crucial point) create a group WITH large photo
  2. go to group settings
  3. edit photo
  4. choose from gallery ... crash

PashockACDC avatar Sep 22 '20 11:09 PashockACDC

This is fixed in the upcoming 4.72 release, thanks!

greyson-signal avatar Sep 22 '20 12:09 greyson-signal

I have version 5.0.9 for Android, still crashing every time I select gallery (profile, group and message).

pr0gg3r avatar Jan 12 '21 10:01 pr0gg3r

@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.

grandchild avatar Jan 12 '21 15:01 grandchild

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

pr0gg3r avatar Jan 13 '21 09:01 pr0gg3r

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...

grandchild avatar Jan 13 '21 11:01 grandchild

Here is the new bug report https://github.com/signalapp/Signal-Android/issues/10624

pr0gg3r avatar Jan 14 '21 13:01 pr0gg3r

Lovely bug report! 👏🏾

grandchild avatar Jan 14 '21 14:01 grandchild