Crash caused by StringIndexOutOfBoundsException
sekdariusz opened this issue · comments
java.lang.StringIndexOutOfBoundsException: length=0; index=19
at java.lang.String.indexAndLength(String.java:500)
at java.lang.String.charAt(String.java:494)
at com.github.pedrovgs.lynx.model.Lynx.hasTraceLevelEqualOrHigher(Lynx.java:150)
at com.github.pedrovgs.lynx.model.Lynx.containsTraceLevel(Lynx.java:145)
at com.github.pedrovgs.lynx.model.Lynx.traceMatchesFilter(Lynx.java:141)
at com.github.pedrovgs.lynx.model.Lynx.shouldAddTrace(Lynx.java:134)
at com.github.pedrovgs.lynx.model.Lynx.addTraceToTheBuffer(Lynx.java:126)
at com.github.pedrovgs.lynx.model.Lynx.access$000(Lynx.java:35)
at com.github.pedrovgs.lynx.model.Lynx$1.onTraceRead(Lynx.java:75)
at com.github.pedrovgs.lynx.model.Logcat.notifyListener(Logcat.java:95)
at com.github.pedrovgs.lynx.model.Logcat.readLogcat(Logcat.java:85)
at com.github.pedrovgs.lynx.model.Logcat.run(Logcat.java:70)
After few seconds from shaking phone in Samsung Galaxy S5 (SM-G900F)(Android 5.0)
Hi @sekdariusz, thanks for reporting the issue. What's the library version you are using?
I have this issue too.
In my case this exception is thrown when I log http file body by logging interceptor
I forked the project and created reproducible example (commit).