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

Draft email crashes K-9 #8603

Open
2 tasks done
ByteHamster opened this issue Nov 24, 2024 · 3 comments
Open
2 tasks done

Draft email crashes K-9 #8603

ByteHamster opened this issue Nov 24, 2024 · 3 comments
Labels
type: bug Something is causing incorrect behavior or errors type: crash Issues that involve fixing a crash or ANR unconfirmed Newly reported issues awaiting triage or confirmation

Comments

@ByteHamster
Copy link
Collaborator

Checklist

  • I have used the search function to see if someone else has already submitted the same bug report.
  • I will describe the problem with as much detail as possible.

App

K-9 Mail

App version

8.1

Where did you get the app from?

Other

Android version

probably doesn't matter in this case

Device model

?

Steps to reproduce

  1. Click a draft email

See forum: https://forum.k9mail.app/t/draft-email-crashes-k9/11042

Expected behavior

Draft is shown

Actual behavior

App crashes

Logs

Shutting down VM
FATAL EXCEPTION: main
Process: com.fsck.k9, PID: 3487
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.substring(int, int)' on a null object reference
	at com.fsck.k9.ui.compose.QuotedMessagePresenter.processDraftMessage(QuotedMessagePresenter.java:287)
	at com.fsck.k9.activity.MessageCompose.processDraftMessage(MessageCompose.java:1451)
	at com.fsck.k9.activity.MessageCompose.processSourceMessage(MessageCompose.java:1262)
	at com.fsck.k9.activity.MessageCompose.loadLocalMessageForDisplay(MessageCompose.java:1659)
	at com.fsck.k9.activity.MessageCompose$11.onMessageViewInfoLoadFinished(MessageCompose.java:1679)
	at com.fsck.k9.activity.MessageLoaderHelper.onDecodeMessageFinished(MessageLoaderHelper.java:405)
	at com.fsck.k9.activity.MessageLoaderHelper.-$$Nest$monDecodeMessageFinished(MessageLoaderHelper.java:0)
	at com.fsck.k9.activity.MessageLoaderHelper$3.onLoadFinished(MessageLoaderHelper.java:441)
	at com.fsck.k9.activity.MessageLoaderHelper$3.onLoadFinished(MessageLoaderHelper.java:418)
	at androidx.loader.app.LoaderManagerImpl$LoaderObserver.onChanged(LoaderManagerImpl.java:250)
	at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
	at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
	at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
	at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
	at androidx.loader.app.LoaderManagerImpl$LoaderInfo.setValue(LoaderManagerImpl.java:189)
	at androidx.loader.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManagerImpl.java:174)
	at androidx.loader.content.Loader.deliverResult(Loader.java:132)
	at com.fsck.k9.ui.message.LocalMessageExtractorLoader.deliverResult(LocalMessageExtractorLoader.java:47)
	at com.fsck.k9.ui.message.LocalMessageExtractorLoader.deliverResult(LocalMessageExtractorLoader.java:16)
	at androidx.loader.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:258)
	at androidx.loader.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:83)
	at androidx.loader.content.ModernAsyncTask.finish(ModernAsyncTask.java:490)
	at androidx.loader.content.ModernAsyncTask$InternalHandler.handleMessage(ModernAsyncTask.java:507)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:230)
	at android.os.Looper.loop(Looper.java:319)
	at android.app.ActivityThread.main(ActivityThread.java:9063)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

Full log: https://www.kingqueen.org.uk/wp-content/uploads/2024/11/k9mail-logs.txt

@ByteHamster ByteHamster added type: bug Something is causing incorrect behavior or errors unconfirmed Newly reported issues awaiting triage or confirmation labels Nov 24, 2024
@kingqueen3065
Copy link

Thank you

In case it helps:
Android 14, kernel version 5.15.123-android13-8-29539737-abS918BXXS6CXI4 #1 Mon Sep 30 10:18:14 UTC 2024
K9 from Google Play Store
on a Galaxy S23 Ultra SM-S918B/DS.

I wrote a long draft email; the preview in the drafts folder shows fine, clicking on it results in crash.
Wondered if it was the keyboard, changed that, no different.
Other than when clicking on that draft email, everything works fine.
I also tried deleting K9's cache to see if that helped. It has 1.42Gb in cache. But I'm unable to clear it. "Clear cache" in Android app settings only reduces the cache to 1.38Gb.

I would dearly love the contents of that draft email if it is at all possible to access it; would save substantial time and re-traumatising (it is a detailed account of a significant disability access refusal.)

Thank you

@kewisch kewisch added the type: crash Issues that involve fixing a crash or ANR label Nov 25, 2024
@kewisch
Copy link
Member

kewisch commented Nov 25, 2024

The only option I'm aware of is to recover the draft from a different app (e.g. Thunderbird Desktop) if you use imap, or us potentially finding the root cause of this issue and then fixing it. Was there anything unusual about the draft, or was it mainly text?

@kingqueen3065
Copy link

Thank you - ah okay.
It isn't a synced folder, it is a POP3 / SMTP account.
It was quite a long text. Written by me using the keyboard; nothing pasted so no weird encoded characters or anything.
There may have been a couple of photos attached.

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 type: crash Issues that involve fixing a crash or ANR unconfirmed Newly reported issues awaiting triage or confirmation
Projects
None yet
Development

No branches or pull requests

3 participants