{ "id": "83554", "key": "TIMOB-6556", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "12090", "description": "", "name": "Sprint 2011-50", "archived": true, "released": true, "releaseDate": "2011-12-19" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-12-12T12:44:22.000+0000", "created": "2011-12-09T19:25:58.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "branch-v8", "merge-1.8.0.1", "verified-1.8.0.1" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "14139", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "83576", "key": "TIMOB-6568", "fields": { "summary": "Android: Modules: Rhino: (1_8_X) Creating 2nd instance of view proxy causes app to crash", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "updated": "2012-01-11T15:29:36.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Millennial Media module demonstrates the problem, but a consolidated version of the app.js here shows it quickly. Creating a single instance of the view that is exposed from the module is successful -- the view is created and the ad is displayed. When you try to create a 2nd instance of the view the app crashes.\r\n\r\nTo reproduce,\r\n1. Build the MillennialMedia module from my fork of the Titanium modules repository, branch \"apilevel2\"\r\n2. Install the module\r\n3. Create a new mobile application in TiStudio\r\n4. Add the module reference to the tiapp.xml file, using version 2.0\r\n5. Add the ti.android.runtime property to the tiapp.xml file and set the value to \"rhino\"\r\n6. Use the following app.js\r\n7. Build and run the application\r\n\r\n[Modified app.js from the example folder of the module]\r\n{code}\r\nvar MillennialMedia = require('ti.millennialmedia');\r\nMillennialMedia.apid = '54131';\r\nMillennialMedia.demographics = {\r\n age: '23',\r\n gender: 'male',\r\n zip: '60187',\r\n lat: '41.866', 'long': '-88.107'\r\n};\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nwin.add(MillennialMedia.createView({\r\n top: 0, left: 0, right: 0,\r\n height: 53,\r\n type: MillennialMedia.TYPE_TOP\r\n}));\r\n\r\nwin.add(MillennialMedia.createView({\r\n top: 100, left: 0, right: 0,\r\n height: 53,\r\n type: MillennialMedia.TYPE_TOP\r\n}));\r\n\r\nwin.open();\r\n{code}\r\n\r\nThe stack trace from the crash is as follows:\r\n\r\n{code}\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): Error while executing app.js: org.mozilla.javascript.UniqueTag\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): java.lang.ClassCastException: org.mozilla.javascript.UniqueTag\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.ProxyFactory.createRhinoProxy(ProxyFactory.java:45)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at ti.millennialmedia.MillennialmediaModulePrototype.execIdCall(MillennialmediaModulePrototype.java:233)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:178)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.Context.evaluateString(Context.java:1111)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.runSource(ScriptsModule.java:72)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.access$300(ScriptsModule.java:28)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule$RunInThisContext.call(ScriptsModule.java:137)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_10(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js:242)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_5(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js:96)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_3(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js:65)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.RhinoRuntime.doRunModule(RhinoRuntime.java:80)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:207)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at android.os.Handler.dispatchMessage(Handler.java:95)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at android.os.Looper.loop(Looper.java:123)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:102)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): Error while executing app.js: org.mozilla.javascript.UniqueTag\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): java.lang.ClassCastException: org.mozilla.javascript.UniqueTag\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.ProxyFactory.createRhinoProxy(ProxyFactory.java:45)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at ti.millennialmedia.MillennialmediaModulePrototype.execIdCall(MillennialmediaModulePrototype.java:233)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:178)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.Context.evaluateString(Context.java:1111)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.runSource(ScriptsModule.java:72)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.access$300(ScriptsModule.java:28)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule$RunInThisContext.call(ScriptsModule.java:137)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_10(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js:242)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_5(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js:96)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_3(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js:65)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.runtime.rhino.RhinoRuntime.doRunModule(RhinoRuntime.java:80)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:207)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at android.os.Handler.dispatchMessage(Handler.java:95)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at android.os.Looper.loop(Looper.java:123)\r\n12-09 21:21:13.170: ERROR/ScriptsModule(1586): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:102)\r\n12-09 21:21:13.220: ERROR/TiJSError(1586): (main) [1627,2629] ----- Titanium Javascript Runtime Error -----\r\n12-09 21:21:13.220: ERROR/TiJSError(1586): (main) [0,2629] - In /var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js:242,0\r\n12-09 21:21:13.220: ERROR/TiJSError(1586): (main) [0,2629] - Message: Wrapped java.lang.ClassCastException: org.mozilla.javascript.UniqueTag (/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js#242)\r\n12-09 21:21:13.220: ERROR/TiJSError(1586): (main) [1,2630] - Source: null\r\n12-09 21:21:13.220: ERROR/TiJSError(1586): (main) [1627,2629] ----- Titanium Javascript Runtime Error -----\r\n12-09 21:21:13.220: ERROR/TiJSError(1586): (main) [0,2629] - In /var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js:242,0\r\n12-09 21:21:13.220: ERROR/TiJSError(1586): (main) [0,2629] - Message: Wrapped java.lang.ClassCastException: org.mozilla.javascript.UniqueTag (/var/folders/dx/dxSQSZKdH3KwJcS3XyegF++++TM/-Tmp-/module.js#242)\r\n12-09 21:21:13.220: ERROR/TiJSError(1586): (main) [1,2630] - Source: null\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Modules: Rhino: Creating 2nd instance of view proxy causes app to crash", "creator": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "environment": "SDK: 1.8.0.1 (branch 1_8_X from GitHub build)\r\nRuntimes: Android Rhino\r\nOS: OS X Snow Leopard\r\n\r\nUsing the 'apilevel2' branch of the module source located in my fork of the modules repository", "comment": { "comments": [ { "id": "176550", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with v8/rhino on Emulator 2.3.3 with 1.8.0.1.RC3. Application does not crash. Leaving open for verification with 1.9.0", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-19T13:24:27.000+0000", "updated": "2011-12-19T13:24:27.000+0000" }, { "id": "178967", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Already verified fix on 1.8.0.1", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-01-11T15:29:36.000+0000", "updated": "2012-01-11T15:29:36.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }