java.lang.StringIndexOutOfBoundsException in 0.6.0 but not it 0.5.5
Closed this issue · 2 comments
dwhitney commented
Here's the file (TSV)
sample.txt.zip
Code producing the exception:
import java.io._
import net.tixxit.delimited._
object Main extends App{
val fileName = "/Users/dw/Desktop/sample.txt"
val bufferedReader = new BufferedReader(
new FileReader(fileName)
)
try{
val iterator = DelimitedParser(DelimitedFormat.TSV).parseReader(bufferedReader)
for{
parsed <- iterator
} {
println(parsed)
}
} catch {
case e: Throwable =>
e.printStackTrace
throw e
} finally{
bufferedReader.close
}
}
stacktrace:
java.lang.StringIndexOutOfBoundsException: String index out of range: 66100
[error] at java.lang.String.charAt(String.java:646)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$InputBuffer.getChar(DelimitedParserImpl.scala:96)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$InputBuffer.loop$2(DelimitedParserImpl.scala:110)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$InputBuffer.isFlag(DelimitedParserImpl.scala:118)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.isSeparator$1(DelimitedParserImpl.scala:140)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.isEndOfCell$1(DelimitedParserImpl.scala:146)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.loop$3(DelimitedParserImpl.scala:166)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.unquotedCell$1(DelimitedParserImpl.scala:179)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.cell$1(DelimitedParserImpl.scala:221)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.row$1(DelimitedParserImpl.scala:263)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.parse(DelimitedParserImpl.scala:287)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl.loop$1(DelimitedParserImpl.scala:46)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl.parseChunk(DelimitedParserImpl.scala:31)
[error] at net.tixxit.delimited.DelimitedParser$$anonfun$parseAll$1.apply(DelimitedParser.scala:51)
[error] at net.tixxit.delimited.DelimitedParser$$anonfun$parseAll$1.apply(DelimitedParser.scala:50)
[error] at scala.collection.Iterator$$anon$15.next(Iterator.scala:499)
[error] at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:396)
[error] at scala.collection.Iterator$class.foreach(Iterator.scala:742)
[error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
[error] at september.cj.Main$.delayedEndpoint$september$cj$Main$1(Main.scala:18)
[error] at september.cj.Main$delayedInit$body.apply(Main.scala:8)
[error] at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error] at scala.App$$anonfun$main$1.apply(App.scala:76)
[error] at scala.App$$anonfun$main$1.apply(App.scala:76)
[error] at scala.collection.immutable.List.foreach(List.scala:381)
[error] at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
[error] at scala.App$class.main(App.scala:76)
[error] at september.cj.Main$.main(Main.scala:8)
[error] at september.cj.Main.main(Main.scala)
[error] Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 66100
[error] at java.lang.String.charAt(String.java:646)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$InputBuffer.getChar(DelimitedParserImpl.scala:96)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$InputBuffer.loop$2(DelimitedParserImpl.scala:110)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$InputBuffer.isFlag(DelimitedParserImpl.scala:118)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.isSeparator$1(DelimitedParserImpl.scala:140)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.isEndOfCell$1(DelimitedParserImpl.scala:146)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.loop$3(DelimitedParserImpl.scala:166)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.unquotedCell$1(DelimitedParserImpl.scala:179)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.cell$1(DelimitedParserImpl.scala:221)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.row$1(DelimitedParserImpl.scala:263)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl$.parse(DelimitedParserImpl.scala:287)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl.loop$1(DelimitedParserImpl.scala:46)
[error] at net.tixxit.delimited.parser.DelimitedParserImpl.parseChunk(DelimitedParserImpl.scala:31)
[error] at net.tixxit.delimited.DelimitedParser$$anonfun$parseAll$1.apply(DelimitedParser.scala:51)
[error] at net.tixxit.delimited.DelimitedParser$$anonfun$parseAll$1.apply(DelimitedParser.scala:50)
[error] at scala.collection.Iterator$$anon$15.next(Iterator.scala:499)
[error] at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:396)
[error] at scala.collection.Iterator$class.foreach(Iterator.scala:742)
[error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
[error] at september.cj.Main$.delayedEndpoint$september$cj$Main$1(Main.scala:18)
[error] at september.cj.Main$delayedInit$body.apply(Main.scala:8)
[error] at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error] at scala.App$$anonfun$main$1.apply(App.scala:76)
[error] at scala.App$$anonfun$main$1.apply(App.scala:76)
[error] at scala.collection.immutable.List.foreach(List.scala:381)
[error] at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
[error] at scala.App$class.main(App.scala:76)
[error] at september.cj.Main$.main(Main.scala:8)
[error] at september.cj.Main.main(Main.scala)
java.lang.RuntimeException: Nonzero exit code returned from runner: 1
dwhitney commented
actually no, I get a similar error in 0.5.5, but 0.5.3 is working. Here's the stack trace from 0.5.5:
[error] java.lang.StringIndexOutOfBoundsException: String index out of range: 33153
[error] at java.lang.String.charAt(String.java:646)
[error] at net.tixxit.delimited.parser.DelimitedParser$InputBuffer.getChar(DelimitedParser.scala:130)
[error] at net.tixxit.delimited.parser.DelimitedParser$InputBuffer.loop$2(DelimitedParser.scala:144)
[error] at net.tixxit.delimited.parser.DelimitedParser$InputBuffer.isFlag(DelimitedParser.scala:152)
[error] at net.tixxit.delimited.parser.DelimitedParser$.isSeparator$1(DelimitedParser.scala:174)
[error] at net.tixxit.delimited.parser.DelimitedParser$.isEndOfCell$1(DelimitedParser.scala:180)
[error] at net.tixxit.delimited.parser.DelimitedParser$.loop$3(DelimitedParser.scala:200)
[error] at net.tixxit.delimited.parser.DelimitedParser$.unquotedCell$1(DelimitedParser.scala:213)
[error] at net.tixxit.delimited.parser.DelimitedParser$.cell$1(DelimitedParser.scala:255)
[error] at net.tixxit.delimited.parser.DelimitedParser$.row$1(DelimitedParser.scala:297)
[error] at net.tixxit.delimited.parser.DelimitedParser$.parse(DelimitedParser.scala:321)
[error] at net.tixxit.delimited.parser.DelimitedParser.loop$1(DelimitedParser.scala:41)
[error] at net.tixxit.delimited.parser.DelimitedParser.parseChunk(DelimitedParser.scala:26)
[error] at net.tixxit.delimited.parser.DelimitedParser$$anonfun$parseAll$1.apply(DelimitedParser.scala:77)
[error] at net.tixxit.delimited.parser.DelimitedParser$$anonfun$parseAll$1.apply(DelimitedParser.scala:76)
[error] at scala.collection.Iterator$$anon$15.next(Iterator.scala:499)
[error] at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:396)
[error] at scala.collection.Iterator$class.foreach(Iterator.scala:742)
[error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
[error] at september.cj.Main$.delayedEndpoint$september$cj$Main$1(Main.scala:19)
[error] at september.cj.Main$delayedInit$body.apply(Main.scala:9)
[error] at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error] at scala.App$$anonfun$main$1.apply(App.scala:76)
[error] at scala.App$$anonfun$main$1.apply(App.scala:76)
[error] at scala.collection.immutable.List.foreach(List.scala:381)
[error] at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
[error] at scala.App$class.main(App.scala:76)
[error] at september.cj.Main$.main(Main.scala:9)
[error] at september.cj.Main.main(Main.scala)
[error] Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 33153
[error] at java.lang.String.charAt(String.java:646)
[error] at net.tixxit.delimited.parser.DelimitedParser$InputBuffer.getChar(DelimitedParser.scala:130)
[error] at net.tixxit.delimited.parser.DelimitedParser$InputBuffer.loop$2(DelimitedParser.scala:144)
[error] at net.tixxit.delimited.parser.DelimitedParser$InputBuffer.isFlag(DelimitedParser.scala:152)
[error] at net.tixxit.delimited.parser.DelimitedParser$.isSeparator$1(DelimitedParser.scala:174)
[error] at net.tixxit.delimited.parser.DelimitedParser$.isEndOfCell$1(DelimitedParser.scala:180)
[error] at net.tixxit.delimited.parser.DelimitedParser$.loop$3(DelimitedParser.scala:200)
[error] at net.tixxit.delimited.parser.DelimitedParser$.unquotedCell$1(DelimitedParser.scala:213)
[error] at net.tixxit.delimited.parser.DelimitedParser$.cell$1(DelimitedParser.scala:255)
[error] at net.tixxit.delimited.parser.DelimitedParser$.row$1(DelimitedParser.scala:297)
[error] at net.tixxit.delimited.parser.DelimitedParser$.parse(DelimitedParser.scala:321)
[error] at net.tixxit.delimited.parser.DelimitedParser.loop$1(DelimitedParser.scala:41)
[error] at net.tixxit.delimited.parser.DelimitedParser.parseChunk(DelimitedParser.scala:26)
[error] at net.tixxit.delimited.parser.DelimitedParser$$anonfun$parseAll$1.apply(DelimitedParser.scala:77)
[error] at net.tixxit.delimited.parser.DelimitedParser$$anonfun$parseAll$1.apply(DelimitedParser.scala:76)
[error] at scala.collection.Iterator$$anon$15.next(Iterator.scala:499)
[error] at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:396)
[error] at scala.collection.Iterator$class.foreach(Iterator.scala:742)
[error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
[error] at september.cj.Main$.delayedEndpoint$september$cj$Main$1(Main.scala:19)
[error] at september.cj.Main$delayedInit$body.apply(Main.scala:9)
[error] at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error] at scala.App$$anonfun$main$1.apply(App.scala:76)
[error] at scala.App$$anonfun$main$1.apply(App.scala:76)
[error] at scala.collection.immutable.List.foreach(List.scala:381)
[error] at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
[error] at scala.App$class.main(App.scala:76)
[error] at september.cj.Main$.main(Main.scala:9)
[error] at september.cj.Main.main(Main.scala)