I am working on the BYU EDIF Tools Sourceforge Project after downloading the source code and all of it's dependencies I get the following error when trying to generate javadocs for it:
C:\Users\akeller9\workspace>javadoc -d byuediftools\doc -sourcepath byuediftools -classpath "byuediftools\JHDL_provisional.jar;byuediftools\JSAP-2.1.jar" -subpackages edu
Loading source files for package edu.byu.ece.edif.arch...
...<more source files loaded>...
Loading source files for package edu.byu.ece.edif.util.parse...
java.lang.StackOverflowError
at com.sun.tools.javac.parser.JavaTokenizer.readToken(JavaTokenizer.java:564)
at com.sun.tools.javac.parser.Scanner.ensureLookahead(Scanner.java:102)
at com.sun.tools.javac.parser.Scanner.token(Scanner.java:95)
at com.sun.tools.javac.parser.JavacParser.peekToken(JavacParser.java:310)
at com.sun.tools.javac.parser.JavacParser.peekToken(JavacParser.java:306)
at com.sun.tools.javac.parser.JavacParser.term3(JavacParser.java:1210)
at com.sun.tools.javac.parser.JavacParser.term2(JavacParser.java:909)
at com.sun.tools.javac.parser.JavacParser.term1(JavacParser.java:880)
at com.sun.tools.javac.parser.JavacParser.term(JavacParser.java:836)
at com.sun.tools.javac.parser.JavacParser.term(JavacParser.java:816)
at com.sun.tools.javac.parser.JavacParser.parseExpression(JavacParser.java:779)
at com.sun.tools.javac.parser.JavacParser.parExpression(JavacParser.java:2260)
at com.sun.tools.javac.parser.JavacParser.parseStatement(JavacParser.java:2444)
at com.sun.tools.javac.parser.JavacParser.blockStatement(JavacParser.java:2352)
at com.sun.tools.javac.parser.JavacParser.blockStatements(JavacParser.java:2298)
at com.sun.tools.javac.parser.JavacParser.block(JavacParser.java:2269)
at com.sun.tools.javac.parser.JavacParser.block(JavacParser.java:2283)
at com.sun.tools.javac.parser.JavacParser.parseStatement(JavacParser.java:2441)
at com.sun.tools.javac.parser.JavacParser.blockStatement(JavacParser.java:2352)
at com.sun.tools.javac.parser.JavacParser.parseStatementAsBlock(JavacParser.java:2317)
at com.sun.tools.javac.parser.JavacParser.parseStatement(JavacParser.java:2445)
at com.sun.tools.javac.parser.JavacParser.blockStatement(JavacParser.java:2352)
at com.sun.tools.javac.parser.JavacParser.blockStatements(JavacParser.java:2298)
<<<MANY MORE LINES IN THE STACK TRACE OBVIOUSLY STACK OVERFLOW>>>
at com.sun.tools.javac.parser.JavacParser.block(JavacParser.java:2269)
at com.sun.tools.javac.parser.JavacParser.block(JavacParser.java:2283)
at com.sun.tools.javac.parser.JavacParser.parseStatement(JavacParser.java:2441)
at com.sun.tools.javac.parser.JavacParser.blockStatement(JavacParser.java:2352)
at com.sun.tools.javac.parser.JavacParser.parseStatementAsBlock(JavacParser.java:2317)
at com.sun.tools.javac.parser.JavacParser.parseStatement(JavacParser.java:2445)
at com.sun.tools.javac.parser.JavacParser.blockStatement(JavacParser.java:2352)
at com.sun.tools.javac.parser.JavacParser.blockStatements(JavacParser.java:2298)
at com.sun.tools.javac.parser.JavacParser.block(JavacParser.java:2269)
javadoc: error - fatal error
1 error
When I exclude that last package it appears to be start generating the docs but then the same error occurs.
I am not sure what it is. The idea of dependency cycles in the packages/classes come to mind.
This code base has a deep level of dependency. This causes a stack overflow in
javadoc
because the default stack size is too small to support this level of dependencies.To work around this a the following flag can be added to the 'javadoc' command:
This passes the flag
-Xss1m
to the java VM that is running javadoc which increases the stack size to 1 megabyte. See JavaDoc documentation for more information. After running the command with this option javadoc was able to successfully generate documentation for the BYUEDIFTools