The crash was 100% sure related to the e-mail. It disappeared when I remove the e-mail from the IMAP folder (using Thunderbird), and it comes back again when I add the mail again. I made sure to disable this email account in FairEmail (so its crash does not cause a side effect in K9; who knows, I don’t know much about Android system).
In FairEmail, I got this exception in the logs:
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.graphics.ImageDecoder$OnHeaderDecodedListener" on path: […path here…]
Maybe my crash in K-9 has the same cause, and maybe it’s related to my version of Android (Samsung Galaxy A5 2017, Android 8.0.0
).
Please find bellow the full log:
--------- beginning of main
04-14 19:42:32.262 27853 27853 E Zygote : isWhitelistProcess - Process is Whitelisted
--------- beginning of system
04-14 19:42:32.263 27853 27853 E libpersona: scanKnoxPersonas
04-14 19:42:32.263 27853 27853 E libpersona: Couldn't open the File - /data/system/users/0/personalist.xml - No such file or directory
04-14 19:42:32.269 27853 27853 W SELinux : SELinux selinux_android_compute_policy_index : Policy Index[2], Con:u:r:zygote:s0 RAM:SEPF_SM-A520F_8.0.0_0018, [-1 -1 -1 -1 0 1]
04-14 19:42:32.270 27853 27853 I SELinux : SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=com.fsck.k9
04-14 19:42:32.310 27853 27853 D ActivityThread: Added TimaKeyStore provider
04-14 19:42:32.360 27853 27853 I zygote64: find the special shared library, skip check
04-14 19:42:32.682 27853 27853 V TracingPowerManager: Creating TracingPowerManager
04-14 19:42:32.696 27853 27853 D NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: false
04-14 19:42:32.698 27853 27858 I zygote64: Do partial code cache collection, code=24KB, data=26KB
04-14 19:42:32.698 27853 27858 I zygote64: After code cache collection, code=24KB, data=26KB
04-14 19:42:32.698 27853 27858 I zygote64: Increasing code cache capacity to 128KB
04-14 19:42:32.713 27853 27853 V K9JobManager: scheduling all jobs
04-14 19:42:32.714 27853 27853 V K9JobManager: canceling mail sync job
04-14 19:42:32.723 27853 27853 I Core : Registered: unmount receiver
04-14 19:42:32.724 27853 27853 V MessageProvider: Registering content resolver notifier
04-14 19:42:32.765 27853 27876 V PushController: PushController.initInBackground()
04-14 19:42:32.768 27853 27876 V PushController: PushController.updatePushers()
04-14 19:42:32.776 27853 27858 I zygote64: Compiler allocated 5MB to compile void com.fsck.k9.AccountPreferenceSerializer.loadAccount(com.fsck.k9.Account, com.fsck.k9.preferences.Storage)
04-14 19:42:32.794 27853 27858 I zygote64: Do partial code cache collection, code=56KB, data=42KB
04-14 19:42:32.794 27853 27858 I zygote64: After code cache collection, code=56KB, data=42KB
04-14 19:42:32.794 27853 27858 I zygote64: Increasing code cache capacity to 256KB
04-14 19:42:32.806 27853 27876 V PushController: ..Running PushControllers: []
04-14 19:42:32.806 27853 27876 V PushServiceManager: PushServiceManager.start()
04-14 19:42:32.810 27853 27876 V BootCompleteManager: Enable BootCompleteReceiver
04-14 19:42:32.812 27853 27853 D skia : approximate: numPoints=51, lengths[0]=0.000000, totalLength=620.200073, segmentPoints[0]=[-197.600006,0.000000]
04-14 19:42:32.812 27853 27853 D skia : approximate: approximation[0]=0.000000, approximation[1]=-197.600006, approximation[2]=0.000000
04-14 19:42:32.812 27853 27853 D skia : approximate: numPoints=51, lengths[50]=620.200073, totalLength=620.200073, segmentPoints[50]=[422.600037,0.000000]
04-14 19:42:32.812 27853 27853 D skia : approximate: approximation[150]=1.000000, approximation[151]=422.600037, approximation[152]=0.000000
04-14 19:42:32.813 27853 27853 D skia : approximate: numPoints=4, lengths[0]=0.000000, totalLength=3.448155, segmentPoints[0]=[0.000000,0.100000]
04-14 19:42:32.813 27853 27853 D skia : approximate: approximation[0]=0.000000, approximation[1]=0.000000, approximation[2]=0.100000
04-14 19:42:32.813 27853 27853 D skia : approximate: numPoints=4, lengths[3]=3.448155, totalLength=3.448155, segmentPoints[3]=[3.000000,0.100000]
04-14 19:42:32.813 27853 27853 D skia : approximate: approximation[9]=1.000000, approximation[10]=3.000000, approximation[11]=0.100000
04-14 19:42:32.814 27853 27876 D ConnectivityManager: requestNetwork; CallingUid : 10207, CallingPid : 27853
04-14 19:42:32.814 27853 27853 D skia : approximate: numPoints=47, lengths[0]=0.000000, totalLength=722.199951, segmentPoints[0]=[-522.599976,0.000000]
04-14 19:42:32.814 27853 27853 D skia : approximate: approximation[0]=0.000000, approximation[1]=-522.599976, approximation[2]=0.000000
04-14 19:42:32.814 27853 27853 D skia : approximate: numPoints=47, lengths[46]=722.199951, totalLength=722.199951, segmentPoints[46]=[199.600006,0.000000]
04-14 19:42:32.814 27853 27853 D skia : approximate: approximation[138]=1.000000, approximation[139]=199.600006, approximation[140]=0.000000
04-14 19:42:32.815 27853 27853 D skia : approximate: numPoints=3, lengths[0]=0.000000, totalLength=2.472497, segmentPoints[0]=[0.000000,0.100000]
04-14 19:42:32.815 27853 27853 D skia : approximate: approximation[0]=0.000000, approximation[1]=0.000000, approximation[2]=0.100000
04-14 19:42:32.815 27853 27853 D skia : approximate: numPoints=3, lengths[2]=2.472497, totalLength=2.472497, segmentPoints[2]=[2.000000,0.100000]
04-14 19:42:32.815 27853 27853 D skia : approximate: approximation[6]=1.000000, approximation[7]=2.000000, approximation[8]=0.100000
04-14 19:42:32.823 27853 27876 V PushController: PushController.updatePushers()
04-14 19:42:32.824 27853 27876 V PushController: ..Running PushControllers: []
04-14 19:42:32.824 27853 27876 V PushServiceManager: PushServiceManager.start()
04-14 19:42:32.824 27853 27876 V PushServiceManager: ..PushService already running
04-14 19:42:32.824 27853 27876 V BootCompleteManager: Enable BootCompleteReceiver
04-14 19:42:32.824 27853 27879 V ConnectivityManagerApi24$networkCallback: Network available: 507
04-14 19:42:32.827 27853 27876 V PushController: PushController.updatePushers()
04-14 19:42:32.828 27853 27876 V PushController: ..Running PushControllers: []
04-14 19:42:32.828 27853 27876 V PushServiceManager: PushServiceManager.stop()
04-14 19:42:32.830 27853 27876 V BootCompleteManager: Disable BootCompleteReceiver
04-14 19:42:32.831 27853 27876 D ConnectivityManager: unregisterNetworkCallback; CallingUid : 10207, CallingPid : 27853
04-14 19:42:32.832 27853 27876 V PushController: PushController.updatePushers()
04-14 19:42:32.833 27853 27876 V PushController: ..Running PushControllers: []
04-14 19:42:32.833 27853 27876 V PushServiceManager: PushServiceManager.stop()
04-14 19:42:32.833 27853 27876 V PushServiceManager: ..PushService is not running
04-14 19:42:32.833 27853 27876 V BootCompleteManager: Disable BootCompleteReceiver
04-14 19:42:32.834 27853 27876 V PushController: PushController.updatePushers()
04-14 19:42:32.835 27853 27876 V PushController: ..Running PushControllers: []
04-14 19:42:32.835 27853 27876 V PushServiceManager: PushServiceManager.stop()
04-14 19:42:32.835 27853 27876 V PushServiceManager: ..PushService is not running
04-14 19:42:32.835 27853 27876 V BootCompleteManager: Disable BootCompleteReceiver
04-14 19:42:32.836 27853 27876 V PushController: PushController.updatePushers()
04-14 19:42:32.837 27853 27876 V PushController: ..Running PushControllers: []
04-14 19:42:32.837 27853 27876 V PushServiceManager: PushServiceManager.stop()
04-14 19:42:32.837 27853 27876 V PushServiceManager: ..PushService is not running
04-14 19:42:32.837 27853 27876 V BootCompleteManager: Disable BootCompleteReceiver
04-14 19:42:33.063 27853 27883 D OpenGLRenderer: HWUI GL Pipeline
04-14 19:42:33.070 27853 27853 D ViewRootImpl@c7976b1[MessageList]: setView = DecorView@fc7a796[MessageList] TM=true MM=false
04-14 19:42:33.073 27853 27853 V PushService: PushService.onCreate()
04-14 19:42:33.073 27853 27853 V PushService: PushService.onStartCommand()
04-14 19:42:33.079 27853 27853 D Notification: allPendingIntents
04-14 19:42:33.080 27853 27853 V PushService: PushService.onDestroy()
04-14 19:42:33.081 27853 27853 D AndroidRuntime: Shutting down VM
--------- beginning of crash
04-14 19:42:33.081 27853 27853 E AndroidRuntime: FATAL EXCEPTION: main
04-14 19:42:33.081 27853 27853 E AndroidRuntime: Process: com.fsck.k9, PID: 27853
04-14 19:42:33.081 27853 27853 E AndroidRuntime: android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground()
04-14 19:42:33.081 27853 27853 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1881)
04-14 19:42:33.081 27853 27853 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
04-14 19:42:33.081 27853 27853 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
04-14 19:42:33.081 27853 27853 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6944)
04-14 19:42:33.081 27853 27853 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
04-14 19:42:33.081 27853 27853 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
04-14 19:42:33.081 27853 27853 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Unfortunately, I cannot reproduce the problem any more:
- I built and installed a debug version (version 5.807 like my f-droid version) and I could not reproduce the issue. I tried to remove the debug mode and the minification and I still could not get the issue. But on the f-droid installation the issue was still there.
- Then I replaced by mistake the f-droid version by my release build, and I could not reproduce the issue any more. Also now that I switched back to the f-droid version, I still cannot reproduce it. So I guess the investigation stops there