{ "id": "63137", "key": "TIMOB-2505", "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": "11230", "name": "Release 1.5.0 M05", "archived": true, "released": true, "releaseDate": "2010-12-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:17.000+0000", "created": "2011-04-15T03:21:27.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "regression" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:59:17.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": "{html}

Sample app.js:

\n
\nTitanium.UI.setBackgroundColor('#000');\nvar win = Titanium.UI.createWindow({  \n    title:'Test',\n    backgroundColor:'#fff',\n    url: 'win.js'\n});\nwin.open();\n
\n

and win.js:

\n
\nvar win = Ti.UI.currentWindow;\n
\n

Exception:

\n
\nE/TiUncaughtHandler(  316): (main) [3,417] Sending event: exception on thread: main msg:java.lang.RuntimeException: No Context associated with current Thread; Titanium 1.5.0,2010/12/06 17:40,fd9c18\nE/TiUncaughtHandler(  316): java.lang.RuntimeException: No Context associated with current Thread\nE/TiUncaughtHandler(  316):     at org.mozilla.javascript.Context.getContext(Context.java:2350)\nE/TiUncaughtHandler(  316):     at org.mozilla.javascript.Context.javaToJS(Context.java:1705)\nE/TiUncaughtHandler(  316):     at org.appcelerator.kroll.KrollConverter.convertNative(KrollConverter.java:192)\nE/TiUncaughtHandler(  316):     at org.appcelerator.titanium.kroll.KrollBridge.bindContextSpecific(KrollBridge.java:115)\nE/TiUncaughtHandler(  316):     at org.appcelerator.titanium.util.TiBindingHelper.bindCurrentActivity(TiBindingHelper.java:18)\nE/TiUncaughtHandler(  316):     at org.appcelerator.titanium.util.TiBindingHelper.bindCurrentWindowAndActivity(TiBindingHelper.java:38)\nE/TiUncaughtHandler(  316):     at ti.modules.titanium.ui.TiUIWindow.handlePostOpen(TiUIWindow.java:281)\nE/TiUncaughtHandler(  316):     at ti.modules.titanium.ui.TiUIWindow.<init>(TiUIWindow.java:136)\nE/TiUncaughtHandler(  316):     at ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:97)\nE/TiUncaughtHandler(  316):     at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:65)\nE/TiUncaughtHandler(  316):     at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:84)\n
{html}", "attachment": [], "flagged": false, "summary": "Android: App with single, lightweight Window won't load", "creator": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "128654", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [a73ba08f162265879ddb277e10986a2eb691019d])\n[#2505] Also bind activity for lightweight\nwindows \nhttps://github.com/appcelerator/titanium_mobile/commit/a73ba08f1622...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:21:28.000+0000", "updated": "2011-04-15T03:21:28.000+0000" }, { "id": "128655", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Don plz look at commit and make sure it doesn't break anything\nyou did. :) KS & Drillbit seem ok after my changes.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:21:28.000+0000", "updated": "2011-04-15T03:21:28.000+0000" }, { "id": "128656", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Worked for me and Bugtest runs again. Assigning back to Bill and\nmoving to fixed-in-qa

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:21:28.000+0000", "updated": "2011-04-15T03:21:28.000+0000" }, { "id": "128657", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

ran bugtests to verify itanium SDK version: 1.5.0 (12/08/10\n08:34 4ee1205) G2 2.2

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:21:29.000+0000", "updated": "2011-04-15T03:21:29.000+0000" }, { "id": "128658", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [6c6f24877612d58d47de9f0f3eb320a2a40b27bf])\n[#2505] Unit test for the lightweight window\ncrash issue \nhttps://github.com/appcelerator/titanium_mobile/commit/6c6f24877612...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:21:29.000+0000", "updated": "2011-04-15T03:21:29.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }