{ "id": "83925", "key": "TIMOB-6707", "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-16T12:34:25.000+0000", "created": "2011-12-15T10:05:34.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "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": [], "assignee": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "updated": "2012-01-11T15:25:34.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": "I have a Proxy called SessionProxy on a native Android module. I also have another Proxy called ClientProxy on the same module.\r\n\r\nSomewhere in the code inside SessionProxy, I need to return an instance of the ClientProxy. So normally I write (Java code):\r\n\r\n ClientProxy c = new ClientProxy();\r\n\r\nThe code compiles, but in runtime, it crashes:\r\n\r\nE/ProxyFactory( 1592): Failed to find class for com.Ox82.ClientProxy\r\nE/ProxyFactory( 1592): Unable to find class while creating V8 Proxy.I/DEBUG ( 28): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***I/DEBUG ( 28): Build fingerprint: 'generic/sdk/generic/:2.1-update1/ECLAIR/35983:eng/test-keys'\r\nI/DEBUG ( 28): pid: 1592, tid: 1600 >>> com.Ox82.dropbox <<<\r\nI/DEBUG ( 28): signal 11 (SIGSEGV), fault addr 00000000\r\nI/DEBUG ( 28): r0 570209dd r1 570209e9 r2 00000000 r3 00000000\r\nI/DEBUG ( 28): r4 00307afc r5 00000000 r6 00307b00 r7 00308af0\r\nI/DEBUG ( 28): r8 00000000 r9 00307b00 10 00307b04 fp 00000000\r\nI/DEBUG ( 28): ip 00000000 sp 45a40bb8 lr 81287e18 pc 8117f804 cpsr 80000010\r\nI/DEBUG ( 28): #00 pc 0017f804 /data/data/com.Ox82.dropbox/lib/libkroll-v8.soI/DEBUG ( 28): #01 lr 81287e18 /data/data/com.Ox82.dropbox/lib/libkroll-v8.so\r\n\r\nThat didn't happened on < 1.8 SDK.", "attachment": [ { "id": "24738", "filename": "tps.zip", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-12-15T15:29:47.000+0000", "size": 11820, "mimeType": "application/zip" } ], "flagged": false, "summary": "1.8.0.1 RC1 Android creating KrollProxy instances at runtime fails", "creator": { "name": "rubenfonseca", "key": "rubenfonseca", "displayName": "Ruben Fonseca", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rubenfonseca", "key": "rubenfonseca", "displayName": "Ruben Fonseca", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "BROKEN in OSX, SDK 1.8.0.1 RC1, Android Module on V8\r\nBROKEN in V8 on EPIC 4G 2.2, version=1.8.0.1, module_apiversion=2, timestamp=12/15/11 09:16, githash=21968ea", "comment": { "comments": [ { "id": "176279", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Reproduced in CI from earlier today and in our Box module with V8.\r\nh1. Reproduction\r\n\r\nDrop the following in an app.js:\r\n{code:title=app.js}\r\nvar tps = require('ti.tps');\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\nwin.add(Ti.UI.createLabel({\r\n text: 'Is It Working? The answer is... ' \r\n + (tps.retrieveReport().isWorking ? 'Yes! t(^_^t)' : 'No <(-_-<)')\r\n}));\r\nwin.open();\r\n{code}\r\n\r\nCreate a module:\r\n{code:title=bash}\r\ntitanium1801 create --type=module --name=tps --id=ti.tps --platform=android\r\n{code}\r\n\r\nChange TpsModule.java to the following:\r\n{code:title=TpsModule.java}\r\npackage ti.tps;\r\n\r\nimport org.appcelerator.kroll.KrollModule;\r\nimport org.appcelerator.kroll.annotations.Kroll;\r\n\r\n@Kroll.module(name = \"Tps\", id = \"ti.tps\")\r\npublic class TpsModule extends KrollModule {\r\n\t@Kroll.method\r\n\tpublic ExampleProxy retrieveReport() {\r\n\t\treturn new ExampleProxy();\r\n\t}\r\n}\r\n{code}\r\n\r\nChange ExampleProxy.java to the following:\r\n{code:title=ExampleProxy.java}\r\npackage ti.tps;\r\n\r\nimport org.appcelerator.kroll.KrollProxy;\r\nimport org.appcelerator.kroll.annotations.Kroll;\r\n\r\n@Kroll.proxy()\r\npublic class ExampleProxy extends KrollProxy {\r\n\t@Kroll.getProperty\r\n\tpublic boolean getIsWorking() {\r\n\t\treturn true;\r\n\t}\r\n}\r\n{code}\r\n\r\nRun with V8 and watch the logs.\r\n\r\nh2. Error Logs\r\nI see the following:\r\n{quote}\r\n12-15 15:21:30.359: V/InputDevice(2449): ID[0]=0(0) Dn(0=>1)\r\n12-15 15:21:30.366: V/WindowManager(2449): Dsptch > Window{48930250 com.fede.launcher/com.fede.launcher.Launcher paused=false}\r\n12-15 15:21:30.441: V/WindowManager(2449): Dsptch > Window{48930250 com.fede.launcher/com.fede.launcher.Launcher paused=false}\r\n12-15 15:21:30.441: V/InputDevice(2449): ID[0]=0(0) Up(1=>0)\r\n12-15 15:21:30.444: I/ActivityManager(2449): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=ti.tps/.TpsActivity bnds=[125,234][235,364] }\r\n12-15 15:21:30.511: I/ActivityManager(2449): Start proc ti.tps for activity ti.tps/.TpsActivity: pid=18738 uid=10110 gids={1015, 3003}\r\n12-15 15:21:30.585: I/TiApplication(18738): (main) [0,0] checkpoint, app created.\r\n12-15 15:21:30.628: I/TiApplication(18738): (main) [47,47] Titanium 1.8.0.1 (2011/12/15 09:16 21968ea)\r\n12-15 15:21:30.714: I/TiApplication(18738): (main) [84,131] Titanium Javascript runtime: v8\r\n12-15 15:21:30.722: D/dalvikvm(18738): Trying to load lib /data/data/ti.tps/lib/libstlport_shared.so 0x482fe0e0\r\n12-15 15:21:30.722: D/dalvikvm(18738): Added shared lib /data/data/ti.tps/lib/libstlport_shared.so 0x482fe0e0\r\n12-15 15:21:30.722: D/dalvikvm(18738): No JNI_OnLoad found in /data/data/ti.tps/lib/libstlport_shared.so 0x482fe0e0, skipping init\r\n12-15 15:21:30.730: W/TiApplication(18738): (main) [16,147] activity stack is emtpy, unable to get current activity\r\n12-15 15:21:30.734: D/dalvikvm(18738): Trying to load lib /data/data/ti.tps/lib/libkroll-v8.so 0x482fe0e0\r\n12-15 15:21:30.734: I/TiRootActivity(18738): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n12-15 15:21:30.749: D/dalvikvm(18738): Added shared lib /data/data/ti.tps/lib/libkroll-v8.so 0x482fe0e0\r\n12-15 15:21:30.788: D/dalvikvm(18738): GC_FOR_MALLOC freed 3715 objects / 341936 bytes in 35ms\r\n12-15 15:21:30.855: W/TiApplication(18738): (main) [119,119] activity stack is emtpy, unable to get current activity\r\n12-15 15:21:30.855: W/TiApplication(18738): (main) [1,120] activity stack is emtpy, unable to get current activity\r\n12-15 15:21:30.855: W/TiApplication(18738): (main) [0,120] activity stack is emtpy, unable to get current activity\r\n12-15 15:21:31.179: E/TiApplication(18738): (KrollRuntimeThread) [326,446] APP PROXY: ti.modules.titanium.app.AppModule@48307d18\r\n12-15 15:21:31.218: D/dalvikvm(18738): Trying to load lib /data/data/ti.tps/lib/libti.tps.so 0x482fe0e0\r\n12-15 15:21:31.218: D/dalvikvm(18738): Added shared lib /data/data/ti.tps/lib/libti.tps.so 0x482fe0e0\r\n12-15 15:21:31.218: D/dalvikvm(18738): No JNI_OnLoad found in /data/data/ti.tps/lib/libti.tps.so 0x482fe0e0, skipping init\r\n12-15 15:21:31.288: E/ProxyFactory(18738): Failed to find class for ti.tps.ExampleProxy\r\n12-15 15:21:31.288: E/ProxyFactory(18738): Unable to find class while creating V8 Proxy.\r\n12-15 15:21:31.382: E/TiJSError(18738): (main) [203,649] ----- Titanium Javascript Runtime Error -----\r\n12-15 15:21:31.382: E/TiJSError(18738): (main) [0,649] - In app.js:8,32\r\n12-15 15:21:31.382: E/TiJSError(18738): (main) [0,649] - Message: Uncaught TypeError: Cannot read property 'isWorking' of undefined\r\n12-15 15:21:31.382: E/TiJSError(18738): (main) [1,650] - Source: + (tps.retrieveReport().isWorking ? 'Yes! t(^_^t)' : 'No <(-_-<)')\r\n12-15 15:21:31.409: E/V8Exception(18738): Exception occurred at app.js:8: Uncaught TypeError: Cannot read property 'isWorking' of undefined\r\n12-15 15:21:31.444: I/TiRootActivity(18738): (main) [0,0] checkpoint, on root activity resume. activity = ti.tps.TpsActivity@4836fe08\r\n12-15 15:21:31.601: I/ActivityManager(2449): Displayed activity ti.tps/.TpsActivity: 1099 ms (total 1099 ms)\r\n{quote}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-12-15T15:28:19.000+0000", "updated": "2011-12-15T15:28:19.000+0000" }, { "id": "176280", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Attached zip of the \"tps\" module I referenced in my comment for reproducing this issue.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-12-15T15:29:47.000+0000", "updated": "2011-12-15T15:29:47.000+0000" }, { "id": "176504", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fix on:\r\n\r\nSDK build: 1.8.0.1.RC3\r\nRuntime: V8, Rhino\r\nTitanium Studio, build: 1.0.7.201112152014\r\nDevice: Nexus One (2.2.2)\r\nOS: Mac OS X Lion\r\n\r\nNote: Did not verify fix on sdk build 1.9.0", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-12-19T10:44:25.000+0000", "updated": "2011-12-19T10:44:25.000+0000" }, { "id": "178956", "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:25:34.000+0000", "updated": "2012-01-11T15:25:34.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }