Message6280

Author harely
Recipients harely
Date 2010-12-15.20:01:24
SpamBayes Score 0.0
Marked as misclassified No
Message-id <1292443284.35.0.779614887835.issue1687@psf.upfronthosting.co.za>
In-reply-to
Content
When Java code invoked from Jython causes a StackOverflowError, Jython hides the original error. The PyException that Jython throws does not refer to the original StackOverflowError as its cause and its error message suggests that it was the Python stack that overflowed.

example:


import org.python.util.PythonInterpreter;

public class Main {

	public static void foo() {
		// cause a StackOverflowError
		foo();
		//// When throwing a different Error, jython handles it fine
		//throw new AssertionError();
	}
	
	public static void main(String[] args) {
		PythonInterpreter interpreter = new PythonInterpreter();
		
		interpreter.exec(
				"from jythonstack import Main\n" +
				"Main.foo()");
	}
}


This produces:
init: Bootstrapping class not in Py.BOOTSTRAP_TYPES[class=class org.python.core.PyStringMap]
Exception in thread "main" Traceback (most recent call last):
  File "<string>", line 2, in <module>
RuntimeError: maximum recursion depth exceeded
History
Date User Action Args
2010-12-15 20:01:24harelysetrecipients: + harely
2010-12-15 20:01:24harelysetmessageid: <1292443284.35.0.779614887835.issue1687@psf.upfronthosting.co.za>
2010-12-15 20:01:24harelylinkissue1687 messages
2010-12-15 20:01:24harelycreate