Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7571] Android: packaging - Rhino/v8 - Packaged app produces runtime errors, "run on device" version works as expected

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2012-02-27T23:32:18.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterEric Merriman
AssigneeMarshall Culpepper
Created2012-02-07T16:06:47.000+0000
Updated2017-03-24T18:16:54.000+0000

Description

Description: For speed, we packaged our module test applications into APKs and then installed them via adb. When the applications were run on device most (but not all) failed with runtime errors produced when the tableview row was clicked. Console output:

E/RhinoObject( 2176): (KrollRuntimeThread) [840,3335] ReferenceError: "detailWindow" is not defined. (app://ui.js#1(eval)#1)
E/RhinoObject( 2176): org.mozilla.javascript.EcmaError: ReferenceError: "detailWindow" is not defined. (app://ui.js#1(eval)#1)
E/RhinoObject( 2176): 	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3784)
E/RhinoObject( 2176): 	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3762)
E/RhinoObject( 2176): 	at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3847)
E/RhinoObject( 2176): 	at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1846)
E/RhinoObject( 2176): 	at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1785)
E/RhinoObject( 2176): 	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1780)
E/RhinoObject( 2176): 	at script(app://ui.js#1(eval):1)
E/RhinoObject( 2176): 	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/RhinoObject( 2176): 	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/RhinoObject( 2176): 	at org.mozilla.javascript.ScriptRuntime.evalSpecial(ScriptRuntime.java:2598)
E/RhinoObject( 2176): 	at org.mozilla.javascript.ScriptRuntime.callSpecial(ScriptRuntime.java:2450)
E/RhinoObject( 2176): 	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1567)
E/RhinoObject( 2176): 	at script(app://ui.js:1)
E/RhinoObject( 2176): 	at script(app://ui.js:2)
E/RhinoObject( 2176): 	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/RhinoObject( 2176): 	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/RhinoObject( 2176): 	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2520)
E/RhinoObject( 2176): 	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
E/RhinoObject( 2176): 	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
E/RhinoObject( 2176): 	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
E/RhinoObject( 2176): 	at org.appcelerator.kroll.runtime.rhino.js.events._c_anonymous_2(/tmp/events.js:49)
E/RhinoObject( 2176): 	at org.appcelerator.kroll.runtime.rhino.js.events.call(/tmp/events.js)
E/RhinoObject( 2176): 	at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
E/RhinoObject( 2176): 	at org.appcelerator.kroll.runtime.rhino.js.events._c_anonymous_3(/tmp/events.js:99)
E/RhinoObject( 2176): 	at org.appcelerator.kroll.runtime.rhino.js.events.call(/tmp/events.js)
E/RhinoObject( 2176): 	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/RhinoObject( 2176): 	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)
E/RhinoObject( 2176): 	at org.appcelerator.kroll.runtime.rhino.js.events.call(/tmp/events.js)
E/RhinoObject( 2176): 	at org.appcelerator.kroll.runtime.rhino.RhinoObject.fireEvent(RhinoObject.java:73)
E/RhinoObject( 2176): 	at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:441)
E/RhinoObject( 2176): 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:602)
E/RhinoObject( 2176): 	at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:347)
E/RhinoObject( 2176): 	at ti.modules.titanium.ui.TableViewProxy.handleMessage(TableViewProxy.java:578)
E/RhinoObject( 2176): 	at android.os.Handler.dispatchMessage(Handler.java:95)
E/RhinoObject( 2176): 	at android.os.Looper.loop(Looper.java:132)
E/RhinoObject( 2176): 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:102)
E/TiJSError( 2176): (main) [14,3349] ----- Titanium Javascript Runtime Error -----
E/TiJSError( 2176): (main) [0,3349] - In app://ui.js#1(eval):1,0
E/TiJSError( 2176): (main) [0,3349] - Message: ReferenceError: "detailWindow" is not defined. (app://ui.js#1(eval)#1)
E/TiJSError( 2176): (main) [1,3350] - Source: null
Steps to reproduce: 1) Import attached project into studio 2) Set Tiapp.xml to 1.8.01 or later 3) package for distribution to android marketplace. 4) Use adb to install APK 5) Run the app 6) Select "acceptance tab" 7) Select any item in the tableview Result: Runtime error, usually relating to "reference error, detail window is not defined" but we have seen other things Occurs on: Packaged APKs installed to device SDK 1.8.0.1 SDK 1.8.1 SDK 1.8.2 (master branch) V8 and Rhino DOES NOT occur on: "run on device" builds SDK 1.7.5

Attachments

FileDateSize
device-2012-02-07-160605.png2012-02-07T16:06:47.000+000051662
Network.zip2012-02-07T16:06:47.000+00002326622

Comments

  1. Bill Dawson 2012-02-07

    Please also attach a _failing_ APK.
  2. Neeraj Gupta 2012-02-07

    Allen and I looked at the test code and it is a combination of Java Script and Google Closure compiler issue. This test cases uses a variable in a string but Closure compiler does not minify it (correctly). Fixing source protection may take care of this issue but it is on borderline of being a platform bug and an application issue.
  3. Lee Morris 2017-03-24

    Closing ticket as invalid with reference to the above comments.

JSON Source