#1722 Cycle-dependent pod

go4 Sun 4 Dec 2011

I got a very complex cyclic dependency pod build script.

The compiler just StackOverflowError.

brian Sun 4 Dec 2011

Cyclic dependencies are checked by compiler, but maybe missed something. Can you provide me the cycle tree to help reproduce and test the error?

go4 Mon 5 Dec 2011

pod b depends pod a and a depends b.

It's successful on the first time to run the build script. But run again:

fan F:/temp/fan/and4/build.fan
compile [b]
  Compile [b]
    FindSourceFiles [1 files]
    WritePod [file:/D:/tools/fan/dev/rel/lib/fan/b.pod]
BUILD SUCCESS [33ms]!


fan F:/temp/fan/and4/build.fan
compile [b]
  Compile [b]
    FindSourceFiles [1 files]
ERR: Internal compiler error
sys::Err: java.lang.StackOverflowError
  sun.nio.cs.ext.DoubleByteEncoder.encodeArrayLoop (Unknown)
  sun.nio.cs.ext.DoubleByteEncoder.encodeLoop (Unknown)
  java.nio.charset.CharsetEncoder.encode (Unknown)
  java.lang.StringCoding$StringEncoder.encode (Unknown)
  java.lang.StringCoding.encode (Unknown)
  java.lang.String.getBytes (Unknown)
  java.util.zip.ZipFile.open (Unknown)
  java.util.zip.ZipFile.<init> (Unknown)
  java.util.zip.ZipFile.<init> (Unknown)
  fanx.fcode.FStore.makeZip (FStore.java:36)
  fan.sys.Pod.readFPod (Pod.java:166)
  fan.sys.Pod.doFind (Pod.java:65)
  fan.sys.Pod.doFind (Pod.java:79)
  fan.sys.Pod.doFind (Pod.java:79)
  fan.sys.Pod.doFind (Pod.java:79)
  fan.sys.Pod.doFind (Pod.java:79)
  fan.sys.Pod.doFind (Pod.java:79)
  fan.sys.Pod.doFind (Pod.java:79)
  fan.sys.Pod.doFind (Pod.java:79)
  fan.sys.Pod.doFind (Pod.java:79)
  1005 More...
BUILD FAILED [4127ms]!

brian Mon 5 Dec 2011

Promoted to ticket #1722 and assigned to brian

I can reproduce - there is definitely a bug in there

brian Wed 15 Feb 2012

Ticket resolved in 1.0.62

The cyclic dependency check in Java runtime had some flaws, so fixed that.

I also added checks for this condition at compile time to prevent it from happening in the first place.

Login or Signup to reply.