Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2505] Android: App with single, lightweight Window won't load

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:17.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M05
ComponentsAndroid
Labelsandroid, defect, regression
ReporterBill Dawson
AssigneeDon Thorp
Created2011-04-15T03:21:27.000+0000
Updated2011-04-17T01:59:17.000+0000

Description

Sample app.js:

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

and win.js:

var win = Ti.UI.currentWindow;

Exception:

E/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
E/TiUncaughtHandler(  316): java.lang.RuntimeException: No Context associated with current Thread
E/TiUncaughtHandler(  316):     at org.mozilla.javascript.Context.getContext(Context.java:2350)
E/TiUncaughtHandler(  316):     at org.mozilla.javascript.Context.javaToJS(Context.java:1705)
E/TiUncaughtHandler(  316):     at org.appcelerator.kroll.KrollConverter.convertNative(KrollConverter.java:192)
E/TiUncaughtHandler(  316):     at org.appcelerator.titanium.kroll.KrollBridge.bindContextSpecific(KrollBridge.java:115)
E/TiUncaughtHandler(  316):     at org.appcelerator.titanium.util.TiBindingHelper.bindCurrentActivity(TiBindingHelper.java:18)
E/TiUncaughtHandler(  316):     at org.appcelerator.titanium.util.TiBindingHelper.bindCurrentWindowAndActivity(TiBindingHelper.java:38)
E/TiUncaughtHandler(  316):     at ti.modules.titanium.ui.TiUIWindow.handlePostOpen(TiUIWindow.java:281)
E/TiUncaughtHandler(  316):     at ti.modules.titanium.ui.TiUIWindow.<init>(TiUIWindow.java:136)
E/TiUncaughtHandler(  316):     at ti.modules.titanium.ui.WindowProxy.handleOpen(WindowProxy.java:97)
E/TiUncaughtHandler(  316):     at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:65)
E/TiUncaughtHandler(  316):     at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:84)

Comments

  1. Bill Dawson 2011-04-15

    (from [a73ba08f162265879ddb277e10986a2eb691019d]) [#2505] Also bind activity for lightweight windows https://github.com/appcelerator/titanium_mobile/commit/a73ba08f162265879ddb277e10986a2eb691019d"> https://github.com/appcelerator/titanium_mobile/commit/a73ba08f1622...

  2. Bill Dawson 2011-04-15

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

  3. Don Thorp 2011-04-15

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

  4. Thomas Huelbert 2011-04-15

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

  5. Bill Dawson 2011-04-15

    (from [6c6f24877612d58d47de9f0f3eb320a2a40b27bf]) [#2505] Unit test for the lightweight window crash issue https://github.com/appcelerator/titanium_mobile/commit/6c6f24877612d58d47de9f0f3eb320a2a40b27bf"> https://github.com/appcelerator/titanium_mobile/commit/6c6f24877612...

JSON Source