You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.
11-01 14:56:58.359 12058 12058 I System.out: LibreNews Debug: Unable to load flashes from storage: No flash storage file exists or is empty.
11-01 14:56:58.360 12058 12058 W System.err: java.io.FileNotFoundException: No flash storage file exists or is empty.
11-01 14:56:58.360 12058 12058 W System.err: at app.librenews.io.librenews.controllers.FlashManager.loadFlashesFromStorage(FlashManager.java:140)
11-01 14:56:58.360 12058 12058 W System.err: at app.librenews.io.librenews.controllers.FlashManager.getLatestPushedFlashes(FlashManager.java:191)
11-01 14:56:58.360 12058 12058 W System.err: at app.librenews.io.librenews.controllers.FlashManager.refresh(FlashManager.java:251)
11-01 14:56:58.360 12058 12058 W System.err: at app.librenews.io.librenews.views.MainFlashActivity$1.onClick(MainFlashActivity.java:67)
11-01 14:56:58.360 12058 12058 W System.err: at android.view.View.performClick(View.java:5204)
11-01 14:56:58.360 12058 12058 W System.err: at android.view.View$PerformClick.run(View.java:21153)
11-01 14:56:58.360 12058 12058 W System.err: at android.os.Handler.handleCallback(Handler.java:739)
11-01 14:56:58.360 12058 12058 W System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
11-01 14:56:58.360 12058 12058 W System.err: at android.os.Looper.loop(Looper.java:148)
11-01 14:56:58.360 12058 12058 W System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
11-01 14:56:58.360 12058 12058 W System.err: at java.lang.reflect.Method.invoke(Native Method)
11-01 14:56:58.360 12058 12058 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-01 14:56:58.360 12058 12058 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
// CRASH: app.librenews.io.librenews (pid 3182) (elapsed nanos: 493838390542)
// Short Msg: java.lang.ArrayIndexOutOfBoundsException
// Long Msg: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
// Build Label: Android/sdk_google_phone_x86/generic_x86:6.0/MASTER/4088240:userdebug/test-keys
// Build Changelist: 4088240
// Build Time: 1497047463000
// java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
// at app.librenews.io.librenews.controllers.FlashManager.convertFlashesToOutputString(FlashManager.java:184)
// at app.librenews.io.librenews.controllers.FlashManager.writeFlashesToStorage(FlashManager.java:152)
// at app.librenews.io.librenews.controllers.FlashManager.clearPushedFlashes(FlashManager.java:200)
// at app.librenews.io.librenews.controllers.FlashManager.refresh(FlashManager.java:256)
// at app.librenews.io.librenews.views.MainFlashActivity$1.onClick(MainFlashActivity.java:67)
// at android.view.View.performClick(View.java:5198)
// at android.view.View$PerformClick.run(View.java:21147)
// at android.os.Handler.handleCallback(Handler.java:739)
// at android.os.Handler.dispatchMessage(Handler.java:95)
// at android.os.Looper.loop(Looper.java:148)
// at android.app.ActivityThread.main(ActivityThread.java:5417)
// at java.lang.reflect.Method.invoke(Native Method)
// at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
// at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
//
The text was updated successfully, but these errors were encountered:
I think one possible solution of this is just deleting the three line, FlashManager.java#L180 to FlashManager.java#L182, that will prevent program running to the following loop in line 183.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Reproduced in Android Studio Emulator and Android Nexus 5 Phone (6.0.1)
Steps:
automatically refresh
xxyyzz
.refresh
.Solution:
At FlashManager.java#L184,
min
may be 0 and the array may be empty.Hence, we need to handle this case explicitly.
FlashManager.java#L184
Stack traces
The text was updated successfully, but these errors were encountered: