Crash when making a backup

Open
#11,277 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, java
Domain
mobile

Research direction

Start with SaveAttachmentTask.java, especially the doInBackground and saveAttachment calls at lines 81 and 132 shown in the debug log. Reproduce the backup flow on Android 11 and trace the reported file-creation failure. Done means Signal completes the backup without crashing and creates the backup file.

Written by the indexing model from the issue text.

Description

acknowledged

Bug description

Signal Crashes when at the end of taking a Backup. No Backup File is created.

Steps to reproduce
  • Create a Backup

Actual result: Signal crashes
Expected result: Backup File should be created

Device info

Device: Motorola Moto G Pro
Android version: 11
Signal version: 5.9.7

Link to debug log

https://debuglogs.org/d69de3cd3ee5e48f3b4d6750e1e9d11a3a1bb580d0e94a3a71c6d46ff162463c

Relevant Part I think:

[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: java.lang.RuntimeException: An error occurred while executing doInBackground()
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at android.os.AsyncTask$4.done(AsyncTask.java:415)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at java.util.concurrent.FutureTask.run(FutureTask.java:271)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at java.lang.Thread.run(Thread.java:923)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: Caused by: java.lang.IllegalStateException: Failed to build unique file: /storage/emulated/0/Pictures/image.png bucket_display_name=Pictures volume_name=external_primary date_modified=null date_expires=null _display_name=image.png mime_type=image/png _data=/storage/emulated/0/Pictures/image.png _size=null is_trashed=0 is_pending=0 bucket_id=-1617409521 relative_path=Pictures/
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:2381)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at android.os.Parcel.createException(Parcel.java:2357)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at android.os.Parcel.readException(Parcel.java:2340)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at android.content.ContentProviderProxy.update(ContentProviderNative.java:649)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at android.content.ContentResolver.update(ContentResolver.java:2356)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at android.content.ContentResolver.update(ContentResolver.java:2318)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at org.thoughtcrime.securesms.util.SaveAttachmentTask.saveAttachment(SaveAttachmentTask.java:132)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at org.thoughtcrime.securesms.util.SaveAttachmentTask.doInBackground(SaveAttachmentTask.java:81)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at org.thoughtcrime.securesms.util.SaveAttachmentTask.doInBackground(SaveAttachmentTask.java:38)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at android.os.AsyncTask$3.call(AsyncTask.java:394)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[5.9.7] [263444] 2021-05-10 12:17:14.621 GMT+02:00 E SignalUncaughtException: 	... 3 more
Dominant language
Kotlin
Stars
29.4k
Forks
6.9k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from signalapp/Signal-Android

All issues in signalapp/Signal-Android

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.