thunderbird / thunderbird/thunderbird-android

AttachmentInfoLoader doesn't deal with errors

Open
#5,409 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
14k
Forks
2.8k
Avg merge
3d 3h
Merged PRs (30d)
57

Description

Stack trace from Google Play developer console
App version: 5.739

java.lang.RuntimeException: 
  at androidx.loader.content.ModernAsyncTask$3.done (ModernAsyncTask.java:164)
  at java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:383)
  at java.util.concurrent.FutureTask.setException (FutureTask.java:252)
  at java.util.concurrent.FutureTask.run (FutureTask.java:271)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:764)
Caused by: java.lang.SecurityException: 
  at android.os.Parcel.createException (Parcel.java:1950)
  at android.os.Parcel.readException (Parcel.java:1918)
  at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:183)
  at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:135)
  at android.content.ContentProviderProxy.query (ContentProviderNative.java:418)
  at android.content.ContentResolver.query (ContentResolver.java:804)
  at android.content.ContentResolver.query (ContentResolver.java:753)
  at android.content.ContentResolver.query (ContentResolver.java:711)
  at com.fsck.k9.activity.loader.AttachmentInfoLoader.loadInBackground (AttachmentInfoLoader.java:56)
  at com.fsck.k9.activity.loader.AttachmentInfoLoader.loadInBackground (AttachmentInfoLoader.java:21)
  at androidx.loader.content.AsyncTaskLoader.onLoadInBackground (AsyncTaskLoader.java:307)
  at androidx.loader.content.AsyncTaskLoader$LoadTask.doInBackground (AsyncTaskLoader.java:60)
  at androidx.loader.content.AsyncTaskLoader$LoadTask.doInBackground (AsyncTaskLoader.java:48)
  at androidx.loader.content.ModernAsyncTask$2.call (ModernAsyncTask.java:141)
  at java.util.concurrent.FutureTask.run (FutureTask.java:266)

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.

Research direction

Start with AttachmentInfoLoader.loadInBackground at AttachmentInfoLoader.java:56, identified in the supplied stack trace, and trace how the ContentResolver query failure reaches the loader. The issue does not specify the desired error behavior or a test location, so first establish the expected handling and add coverage showing that this SecurityException no longer crashes the load.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.