osfans / trime

同文安卓輸入法平臺3.x/Android-rime/Rime Input Method Engine for Android
http://osfans.github.io/trime/
GNU General Public License v3.0
3.09k stars 372 forks source link

Random NPE crash in Trime.kt #1243

Closed Bambooin closed 6 months ago

Bambooin commented 8 months ago

Describe the bug A clear and concise description of what the bug is.

Rare random crash.

To Reproduce Steps to reproduce the bug:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See bug

Expected behavior A clear and concise description of what you expected to happen.

Log If applicable, add crash log to quick focus your problem.

--------- Crash stacktrace
java.lang.NullPointerException
    at com.osfans.trime.ime.core.Trime.loadConfig(Trime.kt:166)
    at com.osfans.trime.ime.core.Trime.recreateInputView(Trime.kt:316)
    at com.osfans.trime.ime.core.Trime$onThemeChangeListener$1$1.invokeSuspend(Trime.kt:108)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7924)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@5df48ca, Dispatchers.Main]

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

WhiredPlanck commented 8 months ago

Geez, I will look into it.