billthefarmer / editor

Android simple text editor
https://billthefarmer.github.io/editor
GNU General Public License v3.0
474 stars 85 forks source link

[Bug] Cannot Launch App #212

Closed BaruaAtish closed 11 months ago

BaruaAtish commented 11 months ago

I can't seem to launch the app at all. This is what I got when I selected details:

type: crash
osVersion: google/cheetah/cheetah:14/UP1A.231005.007/2023101100:user/release-keys
package: org.billthefarmer.editor:188
process: org.billthefarmer.editor
processUptime: 82 + 228 ms
installer: com.android.packageinstaller

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.billthefarmer.editor/org.billthefarmer.editor.Editor}: java.util.ConcurrentModificationException
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3793)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3933)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2450)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:205)
    at android.os.Looper.loop(Looper.java:294)
    at android.app.ActivityThread.main(ActivityThread.java:8199)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ExecInit.main(ExecInit.java:49)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Caused by: java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextNode(HashMap.java:1574)
    at java.util.HashMap$KeyIterator.next(HashMap.java:1597)
    at org.billthefarmer.editor.Editor.savePath(Editor.java:1462)
    at org.billthefarmer.editor.Editor.readFile(Editor.java:2333)
    at org.billthefarmer.editor.Editor.defaultFile(Editor.java:1373)
    at org.billthefarmer.editor.Editor.onCreate(Editor.java:604)
    at android.app.Activity.performCreate(Activity.java:8650)
    at android.app.Activity.performCreate(Activity.java:8628)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1461)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3775)
    ... 14 more
billthefarmer commented 11 months ago

The bug is in the code that removes entries from the recent list if the file has been deleted. If you delete the app's data and don't delete any files you have edited it should be OK until the fix is published – see #211.

BaruaAtish commented 11 months ago

Thank you! The issue seems fixed with the latest update so I will be closing this.