Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when downloading attachment #1583

Closed
cketti opened this issue Aug 30, 2016 · 5 comments
Closed

Crash when downloading attachment #1583

cketti opened this issue Aug 30, 2016 · 5 comments
Labels
type: bug Something is causing incorrect behavior or errors

Comments

@cketti
Copy link
Member

cketti commented Aug 30, 2016

Reported via Google Play:

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
    at android.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1328)
    at android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1346)
    at android.app.BackStackRecord.commitInternal(BackStackRecord.java:729)
    at android.app.BackStackRecord.commit(BackStackRecord.java:705)
    at android.app.DialogFragment.dismissInternal(DialogFragment.java:292)
    at android.app.DialogFragment.dismiss(DialogFragment.java:258)
    at com.fsck.k9.ui.messageview.MessageViewFragment.removeDialog(MessageViewFragment.java:546)
    at com.fsck.k9.ui.messageview.MessageViewFragment.access$200(MessageViewFragment.java:55)
    at com.fsck.k9.ui.messageview.MessageViewFragment$3.run(MessageViewFragment.java:643)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5254)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

User messages:

  • Was loading an attachment in the background.
  • saving Attachments
  • downloading complete versions of several photo heavy messages on a weak WiFi link
  • crashed trying to get attachment
  • keeps hanging then crashing when downliading images attached to emails!
  • tried opening a jpeg attachment
  • tried to open attatchment
  • didn't like a calendar invitation
@cketti cketti added the type: bug Something is causing incorrect behavior or errors label Aug 30, 2016
@Valodim
Copy link
Contributor

Valodim commented Aug 30, 2016

Is this on current alpha?

@cketti
Copy link
Member Author

cketti commented Aug 30, 2016

This crash has been reported for older versions, too. I tried to grab a stacktrace from the current alpha, but the display in the developer console is weird and I can't tell if I succeeded.

@Valodim
Copy link
Contributor

Valodim commented Aug 30, 2016

This is a problem which follows from the basic architecture of AttachmentController, which receives an instance of MessageViewFragment and then calls methods on it at some later point in time, possibly triggered by results of network operations in MessagingController.

@philipwhiuk
Copy link
Contributor

philipwhiuk commented Sep 24, 2016

I got a crash from my device in similar circumstances:

Same cause?

09-24 20:07:46.587 27201-18354/com.fsck.k9.debug E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #19
    Process: com.fsck.k9.debug, PID: 27201
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:318)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)
     Caused by: java.lang.IllegalStateException: No attachment data available
        at com.fsck.k9.mailstore.LocalStore.getRawAttachmentInputStream(LocalStore.java:725)
        at com.fsck.k9.mailstore.LocalStore.access$100(LocalStore.java:66)
        at com.fsck.k9.mailstore.LocalStore$15.doDbWork(LocalStore.java:700)
        at com.fsck.k9.mailstore.LocalStore$15.doDbWork(LocalStore.java:684)
        at com.fsck.k9.mailstore.LockableDatabase.execute(LockableDatabase.java:275)
        at com.fsck.k9.mailstore.LocalStore.getAttachmentInputStream(LocalStore.java:684)
        at com.fsck.k9.provider.AttachmentProvider.getAttachmentInputStream(AttachmentProvider.java:186)
        at com.fsck.k9.provider.AttachmentProvider.openAttachment(AttachmentProvider.java:167)
        at com.fsck.k9.provider.AttachmentProvider.openFile(AttachmentProvider.java:78)
        at android.content.ContentProvider.openAssetFile(ContentProvider.java:1377)
        at android.content.ContentProvider.openTypedAssetFile(ContentProvider.java:1557)
        at android.content.ContentProvider.openTypedAssetFile(ContentProvider.java:1623)
        at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:422)
        at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1145)
        at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:982)
        at android.content.ContentResolver.openInputStream(ContentResolver.java:702)
        at com.fsck.k9.ui.messageview.AttachmentController.writeAttachmentToStorage(AttachmentController.java:147)
        at com.fsck.k9.ui.messageview.AttachmentController.saveAttachmentWithUniqueFileName(AttachmentController.java:139)
        at com.fsck.k9.ui.messageview.AttachmentController.access$900(AttachmentController.java:40)
        at com.fsck.k9.ui.messageview.AttachmentController$SaveAttachmentAsyncTask.doInBackground(AttachmentController.java:346)
        at com.fsck.k9.ui.messageview.AttachmentController$SaveAttachmentAsyncTask.doInBackground(AttachmentController.java:335)
        at android.os.AsyncTask$2.call(AsyncTask.java:304)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
        at java.lang.Thread.run(Thread.java:761)

@wmontwe
Copy link
Member

wmontwe commented Feb 17, 2025

Not seen in crash report for quite a while.

@wmontwe wmontwe closed this as completed Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is causing incorrect behavior or errors
Projects
None yet
Development

No branches or pull requests

4 participants