Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

ArrayIndexOutOfBoundsException when using dependency-graph --force #19

Open
analytically opened this issue Oct 22, 2012 · 10 comments
Open

Comments

@analytically
Copy link

> last compile:dependency-graph
java.lang.RuntimeException: Problem drawing segment EdgeSegment(Point(17,31),Down,Point(18,31)) in edge EdgeDrawingElement(List(Point(5,147), Point(7,147), Point(7,63), Point(17,63), Point(17,31), Point(18,31), Point(18,7), Point(56,7)),false,true)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$com$github$mdr$ascii$layout$Renderer$$render$4.apply(Renderer.scala:122)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$com$github$mdr$ascii$layout$Renderer$$render$4.apply(Renderer.scala:113)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at com.github.mdr.ascii.layout.Renderer.com$github$mdr$ascii$layout$Renderer$$render(Renderer.scala:113)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$render$1.apply(Renderer.scala:158)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$render$1.apply(Renderer.scala:156)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at com.github.mdr.ascii.layout.Renderer.render(Renderer.scala:156)
    at com.github.mdr.ascii.layout.Renderer$.render(Renderer.scala:72)
    at com.github.mdr.ascii.layout.Layouter$.renderGraph(Layout.scala:14)
    at net.virtualvoid.sbt.graph.IvyGraphMLDependencies$.asciiGraph(IvyGraphMLDependencies.scala:94)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4$$anonfun$apply$5.apply(Plugin.scala:77)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4$$anonfun$apply$5.apply(Plugin.scala:77)
    at sbt.MultiLogger.log(MultiLogger.scala:31)
    at sbt.Logger$class.info(Logger.scala:98)
    at sbt.AbstractLogger.info(Logger.scala:11)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4.apply(Plugin.scala:77)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4.apply(Plugin.scala:75)
    at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:579)
    at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:579)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
    at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
    at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
    at sbt.std.Transform$$anon$5.work(System.scala:71)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:238)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 62
    at com.github.mdr.ascii.layout.Renderer$Grid.update(Renderer.scala:85)
    at com.github.mdr.ascii.layout.Renderer.com$github$mdr$ascii$layout$Renderer$$drawLine(Renderer.scala:102)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$com$github$mdr$ascii$layout$Renderer$$render$4.apply(Renderer.scala:120)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$com$github$mdr$ascii$layout$Renderer$$render$4.apply(Renderer.scala:113)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at com.github.mdr.ascii.layout.Renderer.com$github$mdr$ascii$layout$Renderer$$render(Renderer.scala:113)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$render$1.apply(Renderer.scala:158)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$render$1.apply(Renderer.scala:156)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at com.github.mdr.ascii.layout.Renderer.render(Renderer.scala:156)
    at com.github.mdr.ascii.layout.Renderer$.render(Renderer.scala:72)
    at com.github.mdr.ascii.layout.Layouter$.renderGraph(Layout.scala:14)
    at net.virtualvoid.sbt.graph.IvyGraphMLDependencies$.asciiGraph(IvyGraphMLDependencies.scala:94)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4$$anonfun$apply$5.apply(Plugin.scala:77)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4$$anonfun$apply$5.apply(Plugin.scala:77)
    at sbt.MultiLogger.log(MultiLogger.scala:31)
    at sbt.Logger$class.info(Logger.scala:98)
    at sbt.AbstractLogger.info(Logger.scala:11)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4.apply(Plugin.scala:77)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4.apply(Plugin.scala:75)
    at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:579)
    at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:579)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
@jrudolph
Copy link
Member

Any idea @mdr?

@jrudolph
Copy link
Member

Maybe you can provide an isolated test case for this, Mathias? I won't fix this for the 0.7.0 release but then we can see later what can be done.

@analytically
Copy link
Author

Add these dependencies, with 0.7.0-RC3 it actually seems to be stuck:

// Utilities
      "com.typesafe" % "config" % "1.0.0",
      "com.github.scala-incubator.io" %% "scala-io-core" % "0.4.1-seq",
      "com.github.scala-incubator.io" %% "scala-io-file" % "0.4.1-seq",

      // Spray
      "io.spray" % "spray-can" % V.spray,
      "io.spray" % "spray-routing" % V.spray,
      "io.spray" %% "spray-json" % "1.2",

      // Akka
      "com.typesafe.akka" % "akka-actor" % V.akka,
      "com.typesafe.akka" % "akka-slf4j" % V.akka % "runtime",

      // Metrics
      "com.yammer.metrics" % "metrics-core" % "2.1.3" intransitive(),
      "com.yammer.metrics" % "metrics-scala_2.9.1" % "2.1.3",

      // Logging
      "org.slf4j" % "slf4j-api" % "1.7.2",
      "org.slf4j" % "jcl-over-slf4j" % "1.7.2",
      "org.slf4j" % "log4j-over-slf4j" % "1.7.2",
      "ch.qos.logback" % "logback-classic" % "1.0.7",
      "org.codehaus.janino" % "janino" % "2.6.1",

      // Jackson
      "com.fasterxml.jackson.core" % "jackson-databind" % "2.1.0",

      // Storm
      "storm" % "storm" % "0.8.1" excludeAll(
        ExclusionRule(organization = "commons-logging"),
        ExclusionRule(organization = "log4j"),
        ExclusionRule(organization = "org.slf4j", name = "slf4j-log4j12")
        ),
      "storm" % "storm-kafka" % "0.8.0-wip4" excludeAll(
        ExclusionRule(organization = "commons-logging"),
        ExclusionRule(organization = "log4j"),
        ExclusionRule(organization = "org.slf4j", name = "slf4j-log4j12")
        ),

      // OpenTSDB
      "org.hbase" % "asynchbase" % "1.3.2",

      // MongoDB
      "com.novus" %% "salat" % "1.9.2-SNAPSHOT",

      // Redis
      "net.debasishg" %% "redisclient" % "2.7",

      // Testing
      "org.specs2" %% "specs2" % "1.12.1" % "test",
      "com.novocode" % "junit-interface" % "0.10-M1" % "test",
      "org.powermock" % "powermock-api-mockito" % "1.4.12" % "test",
      "org.powermock" % "powermock-module-junit4" % "1.4.12" % "test"

@analytically
Copy link
Author

Try dependency-graph --force with the dependencies above.

@jrudolph
Copy link
Member

I think I can reproduce it with this testcase. Could it be, that it is just slow? I guess the graphing library has bad runtime for larger graphs.

@analytically
Copy link
Author

Any update on this? This still fails for me. Thanks!!

@samthebest
Copy link

This is a show stopper for me using this tool

@jrudolph
Copy link
Member

jrudolph commented Jan 4, 2015

@samthebest why is this a showstopper? The only thing that doesn't work is generating the ASCII graph which isn't a good idea for a big dependency structure anyway. Wouldn't the alternatives like dependency-tree or dot output work for you?

@samthebest
Copy link

@jrudolph Ah, sorry, I didn't realize the alternatives wouldn't throw that exception. Please could you add a catch for that AIOB and say something along the lines of "Your graph is too big for ASCII version".

@jrudolph
Copy link
Member

Also see #56 for another reproduction.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants