Open GoogleCodeExporter opened 8 years ago
You could try running jsdebug.jar instead of jsrun.jar. Choose "break on
errors" (I think that's the wording) menu item and press the run button. If
that isn't helpful you can send me the offending code and I'll give it a look:
micmath@gmail.com
Original comment by micmath
on 5 May 2011 at 6:59
Thanks, I tried using jsdebug with "break on exceptions" enabled but get memory
exceptions in the debug console (Java itself is running out of memory while
running Rhino).
I'll email about the code...
The stacktraces look like:
java.lang.OutOfMemoryError: Java heap space
at org.mozilla.javascript.Interpreter.initFrame(Interpreter.java:4293)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3282)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:173)
at org.mozilla.javascript.tools.shell.Main.evaluateScript(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.processFileSecure(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.processFile(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.processSource(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.processFiles(Unknown Source)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Unknown Source)
at org.mozilla.javascript.Context.call(Context.java:499)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511)
at org.mozilla.javascript.tools.shell.Main.exec(Unknown Source)
at org.mozilla.javascript.tools.debugger.Main.main(Unknown Source)
at JsDebugRun.main(Unknown Source)
js: exception from uncaught JavaScript throw: java.lang.OutOfMemoryError: Java
heap space
and
java.lang.OutOfMemoryError: GC overhead limit exceeded
at org.mozilla.javascript.ScriptRuntime.createFunctionActivation(ScriptRuntime.java:3098)
at org.mozilla.javascript.Interpreter.initFrame(Interpreter.java:4241)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3282)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:173)
at org.mozilla.javascript.tools.shell.Main.evaluateScript(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.processFileSecure(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.processFile(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.processSource(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.processFiles(Unknown Source)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Unknown Source)
at org.mozilla.javascript.Context.call(Context.java:499)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511)
at org.mozilla.javascript.tools.shell.Main.exec(Unknown Source)
at org.mozilla.javascript.tools.debugger.Main.main(Unknown Source)
at JsDebugRun.main(Unknown Source)
js: exception from uncaught JavaScript throw: java.lang.OutOfMemoryError: GC
overhead limit exceeded
Original comment by umi...@gmail.com
on 5 May 2011 at 11:01
Right guys, I've been experiencing this very same issue.
The cause in my case was entirely based on human error.
If you do this:
/** @extends Foo **/
var Foo = function() { /* ... */ }
jsdoc-toolkit just recurses and recurses and recurses until... BAM! The stack
overflows.
I'm uncertain whether other tags are also subject to this.
Original comment by andrew.j...@googlemail.com
on 28 Jul 2011 at 11:18
Hi,
I got the same error on a human error too :
BaseClass.extend('Foo',
/**@lends Foo#*/
{
/**
* @constructs
* @class
* @extends Foo //Here is my mistake the class Foo extends BaseClass and not Foo
*/
constructor: function(){
}
});
Because our code base is very consequent, we used this simple bash script to
find in which file the problem occurs :
for i in `find path/to/your/project -name *.js`; do echo "Testing $i"; java
-jar $JSDOCDIR/jsrun.jar $JSDOCDIR/app/run.js -d=doc/jsdoc
-t=doc/jsdoc/templates -v -r=2 $i > /dev/null 2>&1 || echo "=>>>> Error in $i";
done
Original comment by andreas....@gmail.com
on 2 Sep 2011 at 2:02
Original issue reported on code.google.com by
umi...@gmail.com
on 5 May 2011 at 6:49