skadistats / clarity-examples

Example code for clarity
BSD 3-Clause "New" or "Revised" License
113 stars 37 forks source link

Seek Working? #3

Closed stevencox closed 10 years ago

stevencox commented 10 years ago

Awesome stuff. Is the seek code done (i.e. maybe I have bad data?)

$ mvn -P seek package
$ java -jar target/seek.jar ../dota2/3.dem 
index built in 1.067s
Exception in thread "main" java.lang.IndexOutOfBoundsException: toIndex = 1
    at java.util.ArrayList.subListRangeCheck(ArrayList.java:962)
    at java.util.ArrayList.subList(ArrayList.java:954)
    at skadistats.clarity.parser.DemoIndex.prologueList(DemoIndex.java:90)
    at skadistats.clarity.parser.DemoIndex.prologueIterator(DemoIndex.java:98)
    at skadistats.clarity.examples.seek.Main.main(Main.java:26)

I got the .dem here

spheenik commented 10 years ago

Nope, you hadn't. The poor seek example really missed some love lately. Here is the commit which fixes it:

https://github.com/skadistats/clarity-examples/commit/640ac886e559225b7a2f1e0e6962ce5464c2eb6e

It should work for your file too. If not, please reopen!