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

java.lang.StringIndexOutOfBoundsException #12

Closed
ape-report opened this Issue Mar 31, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@ape-report

ape-report commented Mar 31, 2018

Affected version: v1.9beta

I am not sure whether this has been fixed in the HEAD or not.
I try to reproduce it in HEAD but I cannot build the app.
This happens when you click Current pdf or text and then click select without actually selecting anything.

Thanks

// java.lang.RuntimeException: An error occurred while executing doInBackground()
//  at android.os.AsyncTask$3.done(AsyncTask.java:309)
//  at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
//  at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
//  at java.util.concurrent.FutureTask.run(FutureTask.java:242)
//  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
//  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
//  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
//  at java.lang.Thread.run(Thread.java:818)
// Caused by: java.lang.StringIndexOutOfBoundsException: length=0; regionStart=0; regionLength=-1
//  at java.lang.String.startEndAndLength(String.java:298)
//  at java.lang.String.substring(String.java:1087)
//  at com.mschlauch.comfortreader.SettingsLoader.loadTextfromFilePath(SettingsLoader.java:621)
//  at com.mschlauch.comfortreader.CRPreferenceActivity$MyPreferenceFragment$7$1.doInBackground(CRPreferenceActivity.java:314)
//  at com.mschlauch.comfortreader.CRPreferenceActivity$MyPreferenceFragment$7$1.doInBackground(CRPreferenceActivity.java:306)
//  at android.os.AsyncTask$2.call(AsyncTask.java:295)
//  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
//  ... 4 more
@mschlauch

This comment has been minimized.

Owner

mschlauch commented Apr 19, 2018

That was actually a bug. I fixed it now on master, should be available with the next fdroid release.
Thank you for posting!

@mschlauch mschlauch closed this Apr 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment