{ "id": "83208", "key": "TIMOB-6371", "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": "12088", "description": "", "name": "Sprint 2011-48", "archived": true, "released": true, "releaseDate": "2011-12-05" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-05T10:29:11.000+0000", "created": "2011-11-29T19:09:20.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "branch-v8", "dr-list", "module_filesystem", "qe-testadded" ], "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": "14029", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "82858", "key": "TIMOB-6224", "fields": { "summary": "Android: Studio templates- v8/rhino - Android templates crash and have build errors on Windows 7 and Windows XP", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-01-05T10:29:11.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": "h3. Expected Result:\r\nA CommonJS project should build and run without build errors or runtime errors.\r\n\r\nh3. Actual Result:\r\nRhino and V8 crash every time with the following error:\r\n\r\n{code}\r\nTypeError: Cant use instance of a non-object. (Resources/app.js#4)\r\n{code}\r\n\r\nh3. Steps to Reproduce:\r\n\r\n# Create a new project using 1.8.0.1 (V8 or Rhino), choose next (instead of finish).\r\n# Use the code below to create the app\r\n# Run the project (emulator or device) on a windows OS.\r\n\r\n{code:lang=javascript|title=Resources/app.js}\r\n// This is a single context application with mutliple windows in a stack\r\n(function() {\r\n\r\n\tvar Window = require('ApplicationWindow').ApplicationWindow;\r\n\t\r\n\tnew Window().open();\r\n})();\r\n{code}\r\n\r\n{code:lang=javascript|title=Resources/ApplicationWindow.js}\r\n//Application Window Component Constructor\r\nexports.ApplicationWindow = function() {\r\n\t//create object instance\r\n\tvar self = Ti.UI.createWindow();\r\n\r\n\treturn self;\r\n};\r\n{code}\r\n\r\n", "attachment": [ { "id": "24375", "filename": "Resources.zip", "author": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-29T19:09:20.000+0000", "size": 746252, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: CommonJS apps crashing on android (V8 + Rhino) on Windows 7 / XP", "creator": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Windows 7, Ti Mobile 1.8.0.1.v2011112912857, Android emulator 2.2, Android emulator 2.3.3, Nexus One 2.3.3", "comment": { "comments": [ { "id": "174470", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Tested and works without producing any exceptions on 1.8.0.1 with both engines:\r\n\r\n{code:lang=javascript|title=1.8.0.1 (12/01/11 11:50 3359099...) + rhino}\r\n 310 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<\r\n 310 AndroidRuntime D CheckJNI is ON\r\n 310 AndroidRuntime D --- registering native functions ---\r\n 60 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x\r\n 10000000 cmp=timob6371.netaxiom.net/.Timob6371Activity }\r\n 60 ActivityManager I Start proc timob6371.netaxiom.net for activity timob6371.netaxiom.net/.Timob6371Activity: pid=316 uid=10\r\n 041 gids={1015, 3003}\r\n 310 AndroidRuntime D Shutting down VM\r\n 310 AndroidRuntime I NOTE: attach of thread 'Binder Thread #3' failed\r\n 316 TiApplication I (main) [0,0] checkpoint, app created.\r\n 316 TiApplication I (main) [653,653] Titanium 1.8.0.1 (2011/12/01 11:51 3359099)\r\n 316 TiDbHelper I (main) [230,883] No value in database for platform key: 'unique_machine_id' returning supplied default '\r\n '\r\n 316 TiDbHelper I (main) [11,894] No value in database for platform key: 'hardware_machine_id' returning supplied default \r\n ''\r\n 316 TiPlatformHelper E (main) [1,895] renaming ID\r\n 316 TiFastDev D (main) [112,1007] Enabling Fastdev on port 41309\r\n 316 TiFastDev D (main) [12,1019] sent tokens successfully\r\n 316 TiFastDev D (main) [1,1020] Fastdev session handshake succesful.\r\n 316 TiApplication I (main) [10,1030] Titanium Javascript runtime: rhino\r\n 316 TiRootActivity I (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n 316 TiAnalyticsDb D (main) [43,43] Creating Database tianalytics.db\r\n 316 TiAnalyticsDb I (main) [3,46] Upgrading Database from 1 to 4\r\n 316 TiApplication E (KrollRuntimeThread) [952,998] APP PROXY: ti.modules.titanium.app.AppModule@44f1f050\r\n 316 TiAssetHelper D Fetching \"app.js\" with Fastdev...\r\n 316 Module D Loading module: ApplicationWindow -> Resources/ApplicationWindow.js\r\n 316 TiAssetHelper D Fetching \"ApplicationWindow.js\" with Fastdev...\r\n 316 TiRootActivity I (main) [0,0] checkpoint, on root activity resume. activity = timob6371.netaxiom.net.Timob6371Activity@44\r\n f1ff20\r\n 60 ActivityManager I Displayed activity timob6371.netaxiom.net/.Timob6371Activity: 5796 ms (total 5796 ms)\r\n 316 TiAnalyticsSvc W (Thread-12) [27475,27475] Analytics Service Started\r\n 316 TiAnalyticsSvc I (Thread-12) [99,27574] Sending 2 analytics events.\r\n 316 TiAnalyticsSvc W (Thread-12) [1256,28830] Stopping Analytics Service\r\n{code}\r\n\r\n{code:lang=javascript|title=1.8.0.1 (2011/12/01 11:51 3359099) + v8}\r\n 353 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<\r\n 353 AndroidRuntime D CheckJNI is ON\r\n 353 AndroidRuntime D --- registering native functions ---\r\n 60 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x\r\n 10000000 cmp=timob6371.netaxiom.net/.Timob6371Activity }\r\n 60 ActivityManager I Start proc timob6371.netaxiom.net for activity timob6371.netaxiom.net/.Timob6371Activity: pid=359 uid=10\r\n 041 gids={1015, 3003}\r\n 353 AndroidRuntime D Shutting down VM\r\n 353 AndroidRuntime I NOTE: attach of thread 'Binder Thread #3' failed\r\n 359 TiApplication I (main) [0,0] checkpoint, app created.\r\n 359 TiApplication I (main) [622,622] Titanium 1.8.0.1 (2011/12/01 11:51 3359099)\r\n 359 TiFastDev D (main) [188,810] Enabling Fastdev on port 41309\r\n 359 TiFastDev D (main) [14,824] sent tokens successfully\r\n 359 TiFastDev D (main) [1,825] Fastdev session handshake succesful.\r\n 359 TiApplication I (main) [8,833] Titanium Javascript runtime: v8\r\n 359 KrollV8Runtime I Loading emulator version of kroll-v8\r\n 359 TiRootActivity I (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n 359 TiApplication E (KrollRuntimeThread) [1142,1142] APP PROXY: ti.modules.titanium.app.AppModule@44f32748\r\n 359 TiAssetHelper D Fetching \"app.js\" with Fastdev...\r\n 359 Module D Loading module: ApplicationWindow -> Resources/ApplicationWindow.js\r\n 359 TiAssetHelper D Fetching \"ApplicationWindow.js\" with Fastdev...\r\n 359 TypeConverter W jsValueToJavaObject returning null\r\n 359 TiRootActivity I (main) [0,0] checkpoint, on root activity resume. activity = timob6371.netaxiom.net.Timob6371Activity@44\r\n f069e8\r\n 60 ActivityManager I Displayed activity timob6371.netaxiom.net/.Timob6371Activity: 3469 ms (total 3469 ms)\r\n 359 TiAnalyticsSvc W (Thread-12) [28536,28536] Analytics Service Started\r\n 359 TiAnalyticsSvc I (Thread-12) [73,28609] Sending 1 analytics events.\r\n{code}", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-01T12:48:45.000+0000", "updated": "2011-12-01T12:48:45.000+0000" }, { "id": "174472", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Further clarification from Matt - this is a Windows-specific issue. Title and steps to reproduce have been amended. Previous tests were on Ubuntu. Tests on windows to follow.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-01T12:53:56.000+0000", "updated": "2011-12-01T12:53:56.000+0000" }, { "id": "174537", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR ready: https://github.com/appcelerator/titanium_mobile/pull/812\r\n\r\nIf you run into the error above, make sure you do a a full clean build before launching the emulator.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-02T00:07:56.000+0000", "updated": "2011-12-02T00:07:56.000+0000" }, { "id": "174545", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "I have tested this on Windows 7, ensuring that the project was cleaned before launch. The following exception is generated, and \"Uncaught TypeError: Cannot use 'in' operator to search for 'Resources/ApplicationWindow.js' in null\" is displayed on the emulator:\r\n\r\n{code:lang=none|title=1.8.0.1 (2011/12/01 23:07 20399e2) + v8}D/AndroidRuntime( 450): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<\r\nD/AndroidRuntime( 450): CheckJNI is ON\r\nD/AndroidRuntime( 450): --- registering native functions ---\r\nI/ActivityManager( 101): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=net.netaxiom.timob6371/.Timob6371Activity }\r\nD/AndroidRuntime( 450): Shutting down VM\r\nD/jdwp ( 450): adbd disconnected\r\nI/ActivityManager( 101): Start proc net.netaxiom.timob6371 for activity net.netaxiom.timob6371/.Timob6371Activity: pid=457 uid=10040 gids={1015, 3003}\r\nD/dalvikvm( 33): GC_EXPLICIT freed 285 objects / 10816 bytes in 885ms\r\nD/dalvikvm( 33): GC_EXPLICIT freed 47 objects / 2080 bytes in 463ms\r\nI/TiApplication( 457): (main) [0,0] checkpoint, app created.\r\nD/dalvikvm( 33): GC_EXPLICIT freed 2 objects / 64 bytes in 332ms\r\nI/TiApplication( 457): (main) [231,231] Titanium 1.8.0.1 (2011/12/01 23:07 20399e2)\r\nD/TiFastDev( 457): (main) [157,388] Enabling Fastdev on port 50315\r\nD/TiFastDev( 457): (main) [28,416] sent tokens successfully\r\nD/TiFastDev( 457): (main) [1,417] Fastdev session handshake succesful.\r\nI/TiApplication( 457): (main) [11,428] Titanium Javascript runtime: v8\r\nI/KrollV8Runtime( 457): Loading emulator version of kroll-v8\r\nD/dalvikvm( 457): Trying to load lib /data/data/net.netaxiom.timob6371/lib/libkroll-v8-emulator.so 0x44ede4b0\r\nD/dalvikvm( 457): Added shared lib /data/data/net.netaxiom.timob6371/lib/libkroll-v8-emulator.so 0x44ede4b0\r\nD/dalvikvm( 457): GC_FOR_MALLOC freed 3697 objects / 345152 bytes in 116ms\r\nI/TiRootActivity( 457): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\nE/TiApplication( 457): (KrollRuntimeThread) [1505,1505] APP PROXY: ti.modules.titanium.app.AppModule@44f52cf0\r\nD/TiAssetHelper( 457): Fetching \"app.js\" with Fastdev...\r\nE/TiAssetHelper( 457): Error while reading asset \"index.json\":\r\nE/TiAssetHelper( 457): java.io.FileNotFoundException: index.json\r\nE/TiAssetHelper( 457): at android.content.res.AssetManager.openAsset(Native Method)\r\nE/TiAssetHelper( 457): at android.content.res.AssetManager.open(AssetManager.java:313)\r\nE/TiAssetHelper( 457): at android.content.res.AssetManager.open(AssetManager.java:287)\r\nE/TiAssetHelper( 457): at org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:55)\r\nE/TiAssetHelper( 457): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)\r\nE/TiAssetHelper( 457): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:59)\r\nE/TiAssetHelper( 457): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:206)\r\nE/TiAssetHelper( 457): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:78)\r\nE/TiAssetHelper( 457): at android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/TiAssetHelper( 457): at android.os.Looper.loop(Looper.java:123)\r\nE/TiAssetHelper( 457): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:101)\r\nE/TiJSError( 457): (main) [512,2017] ----- Titanium Javascript Runtime Error -----\r\nE/TiJSError( 457): (main) [2,2019] - In module.js:258,21\r\nE/TiJSError( 457): (main) [3,2022] - Message: Uncaught TypeError: Cannot use 'in' operator to search for 'Resources/ApplicationWindow.js' in null\r\nE/TiJSError( 457): (main) [2,2024] - Source: return filename in fileIndex;\r\nE/V8Exception( 457): Exception occurred at module.js:258: Uncaught TypeError: Cannot use 'in' operator to search for 'Resources/ApplicationWindow.js' in null\r\nI/TiRootActivity( 457): (main) [0,0] checkpoint, on root activity resume. activity = net.netaxiom.timob6371.Timob6371Activity@44f53d50\r\nI/ActivityManager( 101): Displayed activity net.netaxiom.timob6371/.Timob6371Activity: 6441 ms (total 6441 ms)\r\nD/dalvikvm( 336): GC_EXPLICIT freed 1937 objects / 140808 bytes in 157ms\r\nD/dalvikvm( 385): GC_EXPLICIT freed 273 objects / 18224 bytes in 131ms\r\nD/dalvikvm( 395): GC_EXPLICIT freed 800 objects / 56368 bytes in 150ms\r\nD/dalvikvm( 229): GC_EXPLICIT freed 693 objects / 39632 bytes in 171ms\r\nW/TiAnalyticsSvc( 457): (Thread-12) [27944,27944] Analytics Service Started\r\nI/TiAnalyticsSvc( 457): (Thread-12) [66,28010] Sending 1 analytics events.\r\nD/dalvikvm( 457): GC_FOR_MALLOC freed 5139 objects / 378168 bytes in 79ms\r\nD/dalvikvm( 457): GC_FOR_MALLOC freed 4409 objects / 236216 bytes in 62ms\r\nW/TiAnalyticsSvc( 457): (Thread-12) [1634,29644] Stopping Analytics Service\r\n{code}", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-02T05:00:00.000+0000", "updated": "2011-12-02T05:00:00.000+0000" }, { "id": "174547", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "The following results are from an Ubuntu system. No exception is generated, or error in the emulator, but the message {{jsValueToJavaObject returning null}} is shown in the console (not sure if it's relevant to this windows issue, tho):\r\n\r\n{code:lang=none|title=1.8.0.1 (2011/12/01 23:07 20399e2) + v8}\r\n 437 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<\r\n 437 AndroidRuntime D CheckJNI is ON\r\n 60 InputManagerService W Got RemoteException sending setActive(false) notification to pid 416 uid 10041\r\n 437 AndroidRuntime D --- registering native functions ---\r\n 60 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=timob6371.netaxiom.net/.Timob6371Activity }\r\n 60 ActivityManager I Start proc timob6371.netaxiom.net for activity timob6371.netaxiom.net/.Timob6371Activity: pid=443 uid=10041 gids={1015, 3003}\r\n 437 AndroidRuntime D Shutting down VM\r\n 443 TiApplication I (main) [0,0] checkpoint, app created.\r\n 443 TiApplication I (main) [199,199] Titanium 1.8.0.1 (2011/12/01 23:07 20399e2)\r\n 443 TiFastDev D (main) [153,352] Enabling Fastdev on port 43011\r\n 443 TiFastDev D (main) [9,361] sent tokens successfully\r\n 443 TiFastDev D (main) [1,362] Fastdev session handshake succesful.\r\n 443 TiApplication I (main) [8,370] Titanium Javascript runtime: v8\r\n 443 KrollV8Runtime I Loading emulator version of kroll-v8\r\n 443 TiRootActivity I (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n 60 NotificationService W Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@450037e0 in package timob6371.netaxiom.net\r\n 60 ActivityManager W setProcessForeground called on unknown pid: 416\r\n 443 TiApplication E (KrollRuntimeThread) [1062,1062] APP PROXY: ti.modules.titanium.app.AppModule@44f79e40\r\n 443 TiAssetHelper D Fetching \"app.js\" with Fastdev...\r\n 443 Module D Loading module: ApplicationWindow -> Resources/ApplicationWindow.js\r\n 443 TiAssetHelper D Fetching \"ApplicationWindow.js\" with Fastdev...\r\n 443 TypeConverter W jsValueToJavaObject returning null\r\n 443 TiRootActivity I (main) [0,0] checkpoint, on root activity resume. activity = timob6371.netaxiom.net.Timob6371Activity@44f66938\r\n 60 ActivityManager I Displayed activity timob6371.netaxiom.net/.Timob6371Activity: 3278 ms (total 3278 ms)\r\n 443 TiAnalyticsSvc W (Thread-12) [28585,28585] Analytics Service Started\r\n 443 TiAnalyticsSvc I (Thread-12) [67,28652] Sending 1 analytics events.\r\n 443 TiAnalyticsSvc W (Thread-12) [1271,29923] Stopping Analytics Service\r\n{code}", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-02T05:33:49.000+0000", "updated": "2011-12-02T05:33:49.000+0000" }, { "id": "175097", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Bug fixed. Verified on:\r\nSDK: 1.8.0.1.v20111206151102\r\nRuntimes: Android V8/Rhino\r\nStudio: 1.0.7.201112060130\r\nOS: Windows 7\r\nDevices Tested: Nexus One 2.2.2, Droid3 2.3.4, G-Slate 3.1, Android Emulator 4.0", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-06T16:22:54.000+0000", "updated": "2012-01-05T10:25:04.000+0000" }, { "id": "178149", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Added label qe-testadded.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-05T10:22:36.000+0000", "updated": "2012-01-05T10:22:36.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }