Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2080] Android: getElementsByTagName runtime error

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:58:01.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsAndroid
Labelsandroid, android_refactor, error, regression, runtime
ReporterThomas Huelbert
AssigneeDon Thorp
Created2011-04-15T03:09:53.000+0000
Updated2011-04-17T01:58:01.000+0000

Description

g1 running 1.6 and the sim running 2.2 Ti Mobile sdk 1.5.0.02c264
test cases listed below:

run time error on xhr xml data test case
1.Platform>XHR>XML Data

results:
E/KrollCallback( 8248): (kroll$5) [3002,228480] ECMA Error evaluating source, invocation: [callMethod Network.HTTPClient.(anonymous) org.appcelerator.titanium.kroll.KrollCallback@43937c30], message: TypeError: Cannot call method "getElementsByTagName" of undefined (app://examples/xhr_xml.js#6)
E/KrollCallback( 8248): org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getElementsByTagName" of undefined (app://examples/xhr_xml.js#6)
E/KrollCallback( 8248): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3761)
E/KrollCallback( 8248): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3739)
E/KrollCallback( 8248): at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3767)
E/KrollCallback( 8248): at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3786)
E/KrollCallback( 8248): at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3805)
E/KrollCallback( 8248): at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2317)
E/KrollCallback( 8248): at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2310)
E/KrollCallback( 8248): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1524)
E/KrollCallback( 8248): at script(app://examples/xhr_xml.js:6)
E/KrollCallback( 8248): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/KrollCallback( 8248): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/KrollCallback( 8248): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/KrollCallback( 8248): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
E/KrollCallback( 8248): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
E/KrollCallback( 8248): at org.appcelerator.titanium.kroll.KrollCallback$1.run(Unknown Source)
E/KrollCallback( 8248): at android.os.Handler.handleCallback(Handler.java:587)
E/KrollCallback( 8248): at android.os.Handler.dispatchMessage(Handler.java:92)
E/KrollCallback( 8248): at android.os.Looper.loop(Looper.java:123)
E/KrollCallback( 8248): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(Unknown Source)
I/Process ( 8248): Sending signal. PID: 8248 SIG: 9
regression


XML Dom genrates runtime errors
1.Platform>XML DOM

results:
D/dalvikvm( 8551): GC freed 4970 objects / 256152 bytes in 158ms
E/KrollContext( 8551): (kroll$9) [2657,78802] ECMA Error evaluating source: TypeError: Cannot call method "getElementsByTagName" of undefined (app://examples/xml_dom.js#21)
E/KrollContext( 8551): org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getElementsByTagName" of undefined (app://examples/xml_dom.js#21)
E/KrollContext( 8551): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3761)
E/KrollContext( 8551): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3739)
E/KrollContext( 8551): at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3767)
E/KrollContext( 8551): at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3786)
E/KrollContext( 8551): at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3805)
E/KrollContext( 8551): at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2317)
E/KrollContext( 8551): at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2310)
E/KrollContext( 8551): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1524)
E/KrollContext( 8551): at script(app://examples/xml_dom.js:21)
E/KrollContext( 8551): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/KrollContext( 8551): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/KrollContext( 8551): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/KrollContext( 8551): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
E/KrollContext( 8551): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
E/KrollContext( 8551): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142)
E/KrollContext( 8551): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(Unknown Source)
E/KrollContext( 8551): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(Unknown Source)
E/KrollContext( 8551): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(Unknown Source)
E/KrollContext( 8551): at android.os.Handler.dispatchMessage(Handler.java:95)
E/KrollContext( 8551): at android.os.Looper.loop(Looper.java:123)
E/KrollContext( 8551): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(Unknown Source)

regression


SOAP Mashup - runtime error (getElementsByTagName)
1.Mashups>SOAP
2.wait a few seconds

/KrollCallback( 8824): (kroll$9) [1652,217927] ECMA Error evaluating source, invocation: [callMethod Network.HTTPClient.(anonymous) org.appcelerator.titanium.kroll.KrollCallback@43ad2a70], message: TypeError: Cannot call method "getElementsByTagName" of undefined (app://examples/soap.js#26) E/KrollCallback( 8824): org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getElementsByTagName" of undefined (app://examples/soap.js#26)
E/KrollCallback( 8824): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3761)
E/KrollCallback( 8824): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3739)
E/KrollCallback( 8824): at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3767)
E/KrollCallback( 8824): at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3786)
E/KrollCallback( 8824): at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3805)
E/KrollCallback( 8824): at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2317)
E/KrollCallback( 8824): at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2310)
E/KrollCallback( 8824): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1524)
E/KrollCallback( 8824): at script(app://examples/soap.js:26)
E/KrollCallback( 8824): at script(file:///android_asset/Resources/examples/suds.js:149)
E/KrollCallback( 8824): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/KrollCallback( 8824): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/KrollCallback( 8824): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/KrollCallback( 8824): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
E/KrollCallback( 8824): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
E/KrollCallback( 8824): at org.appcelerator.titanium.kroll.KrollCallback$1.run(Unknown Source)
E/KrollCallback( 8824): at android.os.Handler.handleCallback(Handler.java:587)
E/KrollCallback( 8824): at android.os.Handler.dispatchMessage(Handler.java:92)
E/KrollCallback( 8824): at android.os.Looper.loop(Looper.java:123)
E/KrollCallback( 8824): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(Unknown Source)
D/dalvikvm( 8878): GC freed 6051 objects / 380744 bytes in 310ms

--

XML RSS test case genrates unexpected alert
1.Platform>XML RSS
2.results: an alert appears, wording is "Cannot call method "getElementsByTagName" of undefined

regression

Comments

  1. Marshall Culpepper 2011-04-15

    (from [cfee149aa90a1c668f26d14586eb3204df981c99]) some getter methods on DocumentProxy weren't exposed as properties [#2080 state:fixed-in-qa] http://github.com/appcelerator/titanium_mobile/commit/cfee149aa90a1c668f26d14586eb3204df981c99"> http://github.com/appcelerator/titanium_mobile/commit/cfee149aa90a1...

  2. Thomas Huelbert 2011-04-15

    G2 2.2 mobile sdk 1.5.0.2c1cae

JSON Source