Kohsuke Kawaguchi 6d081fafc4 This property can be null causing HtmlUnit to fail.
In event-debug.js, there's an overloaded toString() method.

    toString: function() {
         return "CustomEvent: " + "'" + this.type  + "', " +
             "context: " + this.scope;

    }

When the problem happens, "this.scope" points to a DataSourceBase object, and apparently at that time this._sName is null, and it causes a failure in ScriptableObject.getDefaultValue(), at the final "fall through to error" portion (see below)

----
Enclosed exception:
net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot find default value for object. (http://localhost:46994/static/43c91e29/scripts/yui/event/event-debug.js#385)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3652)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3630)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3658)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError1(ScriptRuntime.java:3670)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getDefaultValue(ScriptableObject.java:829)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getDefaultValue(ScriptableObject.java:748)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.add(ScriptRuntime.java:2558)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.do_add(Interpreter.java:3060)
	at script.(http://localhost:46994/static/43c91e29/scripts/yui/event/event-debug.js:385)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:879)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getDefaultValue(ScriptableObject.java:808)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getDefaultValue(ScriptableObject.java:748)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.add(ScriptRuntime.java:2558)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.do_add(Interpreter.java:3060)
	at script.(http://localhost:46994/static/43c91e29/scripts/yui/event/event-debug.js:114)
	at script.(http://localhost:46994/static/43c91e29/scripts/yui/event/event-debug.js:2258)
	at script.(http://localhost:46994/static/43c91e29/scripts/yui/datasource/datasource-debug.js:79)
	at script.(http://localhost:46994/static/43c91e29/scripts/yui/datasource/datasource-debug.js:2302)
	at script.(http://localhost:46994/static/43c91e29/scripts/yui/autocomplete/autocomplete-debug.js:18)
	at script.createSearchBox(http://localhost:46994/static/43c91e29/scripts/hudson-behavior.js:1711)
	at script.(script in http://localhost:46994//login from (4, 3626) to (4, 3663):4)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:879)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:427)
	at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:263)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3058)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$5.doRun(JavaScriptEngine.java:415)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:522)
	at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:424)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:399)
	at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:892)
	at com.gargoylesoftware.htmlunit.html.HtmlScript.executeInlineScriptIfNeeded(HtmlScript.java:309)
	at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:364)
	at com.gargoylesoftware.htmlunit.html.HtmlScript$1.execute(HtmlScript.java:223)
	at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:238)
----

So this quick fix gets us around.

I think the root cause of the problem is that ScriptableObject.getDefaultValue() should treat null as the primitive value, but I'm bit scared to make that change right now.
2011-09-23 19:42:21 -07:00
2011-09-20 09:56:44 -07:00
2011-01-30 23:44:52 -08:00
2011-09-07 09:56:30 -07:00
2011-03-21 00:23:00 -07:00
2011-09-23 15:16:33 -07:00
2011-05-28 14:07:12 +01:00
2011-01-31 18:34:17 -08:00
2011-06-13 22:26:29 -07:00
2011-09-11 16:12:09 +02:00
2011-09-20 09:56:44 -07:00
2011-06-19 23:08:11 +02:00

Jenkins CI

Copyright © 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributers. Licensed under MIT License.

About

In a nutshell Jenkins CI is the leading open-source continuous integration server. Built with Java, it provides over 300 plugins to support building and testing virtually any project.

Downloads

Non-source downloads such as WAR file and several Linux packages can be found on our Mirrors.

Source

Our latest and greatest source of Jenkins CI can be found on GitHub. Fork us!

News and Website

All about Jenkins CI can be found on our website. Follow us on Twitter @jenkinsci.

Languages
Java 87.1%
HTML 6.3%
JavaScript 3.3%
SCSS 2.3%
Groovy 0.3%
Other 0.6%