Re: "inspect tree" throwing java.lang.StringIndexOutOfBoundsException

209 views
Skip to first unread message

eugene yokota

unread,
Oct 24, 2012, 5:26:13 PM10/24/12
to simple-b...@googlegroups.com
I was able to get normal output using sbt 0.12.1:

helloworld> inspect tree compile
[info] compile:compile = Task[sbt.inc.Analysis]
[info]   +-compile:compile::compile-inputs = Task[sbt.Compiler$Inputs]
[info]   | +-*/*:compile-order = Mixed
[info]   | +-compile:compile::streams = Task[sbt.std.TaskStreams[sbt.Init$ScopedKey[_ <: Any]]]
[info]   | | +-*/*:streams-manager = Task[sbt.std.Streams[sbt.Init$ScopedKey[_ <: Any]]]
[info]   | | 
....

Can you reproduce the issue with some publicly available build?

-eugene

On Wednesday, October 24, 2012 2:50:04 PM UTC-4, Kevin Esler wrote:
Just upgraded to SBT 0.12.1 because I wanted to use "inspect tree XXXX". It is throwing the exception listed below. Any suggestions for avoiding the problem?

root > inspect tree compile
inspect tree compile
[error] java.lang.StringIndexOutOfBoundsException: String index out of range: 4
[error] Use 'last' for the full log.
root > last
last
java.lang.StringIndexOutOfBoundsException: String index out of range: 4
at java.lang.String.charAt(String.java:686)
at scala.collection.immutable.StringOps.apply(StringOps.scala:39)
at sbt.Graph$.insertBar$1(SettingGraph.scala:67)
at sbt.Graph$$anonfun$4$$anonfun$apply$6.apply(SettingGraph.scala:77)
at sbt.Graph$$anonfun$4$$anonfun$apply$6.apply(SettingGraph.scala:77)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
at scala.collection.immutable.Vector.foreach(Vector.scala:63)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.immutable.Vector.map(Vector.scala:63)
at sbt.Graph$$anonfun$4.apply(SettingGraph.scala:77)
at sbt.Graph$$anonfun$4.apply(SettingGraph.scala:76)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:239)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:239)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
at scala.collection.immutable.Vector.foreach(Vector.scala:63)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:239)
at scala.collection.immutable.Vector.flatMap(Vector.scala:63)
at sbt.Graph$.toAsciiLines$1(SettingGraph.scala:76)
at sbt.Graph$$anonfun$3.apply(SettingGraph.scala:75)
at sbt.Graph$$anonfun$3.apply(SettingGraph.scala:75)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
at scala.collection.immutable.Vector.foreach(Vector.scala:63)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.immutable.Vector.map(Vector.scala:63)
at sbt.Graph$.toAsciiLines$1(SettingGraph.scala:75)
at sbt.Graph$.toAscii(SettingGraph.scala:85)
at sbt.SettingGraph.dependsAscii(SettingGraph.scala:47)
at sbt.BuiltinCommands$.inspectOutput(Main.scala:234)
at sbt.BuiltinCommands$$anonfun$inspect$1$$anonfun$apply$8.apply(Main.scala:221)
at sbt.BuiltinCommands$$anonfun$inspect$1$$anonfun$apply$8.apply(Main.scala:221)
at sbt.MultiLogger.log(MultiLogger.scala:31)
at sbt.Logger$class.info(Logger.scala:98)
at sbt.AbstractLogger.info(Logger.scala:11)
at sbt.BuiltinCommands$$anonfun$inspect$1.apply(Main.scala:221)
at sbt.BuiltinCommands$$anonfun$inspect$1.apply(Main.scala:220)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
at sbt.Command$.process(Command.scala:90)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
at sbt.State$$anon$2.process(State.scala:170)
at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.MainLoop$.next(MainLoop.scala:71)
at sbt.MainLoop$.run(MainLoop.scala:64)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:53)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:50)
at sbt.Using.apply(Using.scala:25)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:50)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:33)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:17)
at sbt.MainLoop$.runLogged(MainLoop.scala:13)
at sbt.xMain.run(Main.scala:26)
at xsbt.boot.Launch$.run(Launch.scala:55)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:69)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:31)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.StringIndexOutOfBoundsException: String index out of range: 4
[error] Use 'last' for the full log.
root > 

Roland Tritsch

unread,
May 16, 2013, 4:37:47 PM5/16/13
to simple-b...@googlegroups.com
Just did a little bit of debugging on this and the problem is that in SettingGraph.scala for dump terminals (TERM=dump, e.g. the Emacs shell) JLine.usingTerminal(_.getTerminalWidth) returns 0, which creates the stack trace below. Use a different terminal (e.g. Emacs terminal) and you should be fine. - RT
Reply all
Reply to author
Forward
0 new messages