From: Brad C. <yo...@br...> - 2005-02-01 22:40:17
|
setTimeout support is quite new and a little hackish. A patch that might help is in the pipeline. --- "Lodge, Gary" <Gar...@ac...> wrote: > I get a periodic error that happens when I run a number of tests in > succession. If I run this test singley, it passes much more often. > > > [echo] Enclosed exception: > [echo] java.lang.IllegalStateException > [echo] at > org.mozilla.javascript.ScriptRuntime.getTopCallScope(ScriptRuntime.java:2752 > ) > [echo] at > org.mozilla.javascript.ScriptRuntime.toObjectOrNull(ScriptRuntime.java:838) > [echo] at > org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.ja > va:1963) > [echo] at > org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2869) > [echo] at > org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164) > [echo] at > org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140 > ) > [echo] at > org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:149 > ) > [echo] at > org.mozilla.javascript.Context.evaluateString(Context.java:1220) > [echo] at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScript > Engine.java:295) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlP > age.java:786) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScri > pt.java:188) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlPage.notifyNodeAdded(HtmlPage.java:13 > 88) > [echo] at > com.gargoylesoftware.htmlunit.html.DomNode.appendChild(DomNode.java:470) > [echo] at > com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.startElemen > t(HTMLParser.java:370) > [echo] at > org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) > [echo] at > org.cyberneko.html.filters.DefaultFilter.startElement(DefaultFilter.java:179 > ) > [echo] at > org.cyberneko.html.filters.NamespaceBinder.startElement(NamespaceBinder.java > :280) > [echo] at > org.cyberneko.html.HTMLTagBalancer.callStartElement(HTMLTagBalancer.java:100 > 9) > [echo] at > org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:639) > [echo] at > org.cyberneko.html.HTMLScanner$ContentScanner.scanStartElement(HTMLScanner.j > ava:2343) > [echo] at > org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1820) > [echo] at > org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:789) > [echo] at > org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:478) > [echo] at > org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:431) > [echo] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > [echo] at > com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLP > arser.java:334) > [echo] at > com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:258) > [echo] at > com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageC > reator.java:115) > [echo] at > com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreat > or.java:84) > [echo] at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:5 > 95) > [echo] at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:562) > [echo] at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:477) > [echo] at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:381) > [echo] at > com.gargoylesoftware.htmlunit.html.HtmlAnchor.doClickAction(HtmlAnchor.java: > 109) > [echo] at > com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.j > ava:120) > [echo] at > com.ms.acceptancetest.MSCxAcceptanceTest.doLogin(MSCxAcceptanceTest.java:174 > 9) > [echo] at > com.ms.acceptancetest.WorkflowCreateAndUpdateAcceptanceTest.testCreateAndUpd > ateWorkflows(WorkflowCreateAndUpdateAcceptanceTest.java:36) > [echo] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > [echo] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > [echo] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > > > Here's a guess at what might be caussing the problem (since the call is > getTopCallScope?). Included with the stack trace is a lot of javascript. At > the bottom of the javascript is this code: > [echo] function onloadcalls(){ > [echo] eval(onloadfunctions) > [echo] pageLoaded = true; > [echo] } > > > this code executes after the page loads through this configuration > > window.onload = function(){setTimeout("onloadcalls()",1)}; > > > any ideas what might be causeing this error? > |