{ "id": "93106", "key": "TIMOB-9502", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13408", "description": "Sprint 2012-12 API", "name": "Sprint 2012-12 API", "archived": true, "released": true, "releaseDate": "2012-06-17" }, { "id": "15691", "description": "2013 Sprint 19", "name": "2013 Sprint 19", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15693", "description": "2013 Sprint 19 API", "name": "2013 Sprint 19 API", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-09-17T21:26:54.000+0000", "created": "2012-06-12T12:47:48.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_window", "qe-testadded", "regression", "titanbeta", "triage" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-02T09:14:53.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4.Problem\r\nThere is a regression in mobile SDK 2.1.0.v20120608174150 that causes an intermittent failure of open and focus events at the Window level. Sometimes neither event will fire. Sometimes the open event fires but the focus event won't.\r\n\r\nh4.Testcase\r\nUse the sample project that is attached. This code is reduced down from a much larger app. I have reduced it down as far as I can and still demonstrate the problem. You'll notice that much of the code in the require()d and/or include()d units is not executed, but removing it hides the problem. During testing, I noticed that volume of code seemed to affect the reproducibility of the problem.\r\n\r\nJust run the app, and look at the console log. You may need to run it several times! In my testing, it failed more often than it succeeded.\r\n\r\nh4.Expected Result\r\nIn the console log you should see:\r\n{panel}\r\n== Loading Procs\r\n== Loading Themes\r\ntop\r\nbottom\r\nMainWinLoad fired\r\nMainWinFocus fired from [object Object]\r\n{panel}\r\n\r\nh4.Actual Result\r\n{panel}\r\n== Loading Procs\r\n== Loading Themes\r\ntop\r\nbottom\r\n{panel}\r\n\r\nsometimes the \"MainWinLoad fired\" line will show up, and sometimes the \"MainWinFocus fired from [object Object]\" line also appears.\r\n", "attachment": [ { "id": "28293", "filename": "FocusOpenMemoryTest.zip", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-06-12T12:47:48.000+0000", "size": 128897, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Focus and open events don't fire on first window when require() is used", "creator": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "environment": "- Titanium SDK 2.1.0.v20120608174150\r\n- Titanium Studio 2.0.2.201205311912\r\n- iOS 5.0 (simulator), 5.1 (simulator)\r\n- Mac OSX 10.7.2\r\n\r\n", "comment": { "comments": [ { "id": "198356", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/2385", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-13T12:37:38.000+0000", "updated": "2012-06-13T12:37:38.000+0000" }, { "id": "198751", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "HD ticket: [APP-152528|https://support.appcelerator.com/tickets/APP-152528]", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-06-15T14:00:08.000+0000", "updated": "2012-06-15T14:00:08.000+0000" }, { "id": "198752", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Verified fixed in SDK 2.1.0.v20120615132253. Thanks!", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-06-15T14:00:39.000+0000", "updated": "2012-06-15T14:00:39.000+0000" }, { "id": "199123", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 2.1.0.201206172244\r\nTi Mobile SDK 2.1.0.v20120618154152 hash r7830c03d\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.1\r\n\r\nThe expected behavior is shown", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-19T10:05:15.000+0000", "updated": "2012-06-19T10:05:15.000+0000" }, { "id": "202864", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-07-12T00:19:02.000+0000", "updated": "2012-07-12T00:19:02.000+0000" }, { "id": "271454", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested Environment:\r\n\r\nAppcelerator Studio: 3.1.3.201309132456\r\nSDK: 3.1.3.v20130916153052\r\nacs:1.0.6\r\nalloy:1.2.2-cr\r\nnpm:1.3.2\r\ntitanium:3.1.2\r\ntitanium-code-processo:1.0.2\r\nOSX: 10.8.4\r\nXcode:5.0 GM seed\r\nDevice:ipad3(v7.0),iphone4s(v7.0)and ipodtouch3(v6.1.3)\r\n\r\n\r\nExpected Result on console logs are:\r\n\r\n== Loading Procs\r\n== Loading Themes\r\ntop\r\nbottom\r\nMainWinLoad fired\r\nMainWinFocus fired from [object Object]\r\n\r\nGetting the expected console logs with 3.1.2.GA sdk build but with 3.1.3.v20130916153052 build not getting the expected result.\r\n\r\nFocus event is not being fired on first window when require() is used.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-17T10:55:27.000+0000", "updated": "2013-09-17T10:55:27.000+0000" }, { "id": "271525", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I do NOT see [INFO] : MainWinFocus fired from [object Object]\n\nThe rest is as expected:\n[INFO] : == Loading Procs\n[INFO] : == Loading Themes\n[INFO] : top\n[INFO] : bottom\n[INFO] : MainWinLoad fired\n\nTested with:\nAppcelerator Studio: 3.1.3.201309132456\nTitanium SDK, build: 3.1.3.v20130916153052\nMac osx 10.8.4 Mountain Lion\nXcode5\nalloy@1.2.2-cr\nCLI version : 3.1.2\nDevices: \niPhone4(iOS7 GM seed)\niPhone5 iOS7(11A465)", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-17T17:53:30.000+0000", "updated": "2013-09-17T17:53:30.000+0000" }, { "id": "271552", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test Code\n\n{code}\n########app.js#######\nTi.UI.backgroundColor = 'white';\n\nvar win = Ti.UI.createWindow({\n backgroundColor : \"#fff\",\n url:'testWin.js',\n title:'URL WINDOW',\n layout:'vertical'\n});\n\n\nvar nav = Ti.UI.iOS.createNavigationWindow({\n window:win\n})\n\nwin.addEventListener('open',function(){\n Ti.API.info('GOT OPEN EVENT IN MAIN CONTEXT')\n})\n\nwin.addEventListener('focus',function(){\n Ti.API.info('GOT FOCUS EVENT IN MAIN CONTEXT')\n})\n\n\nvar mainWin = Ti.UI.createWindow();\n\nvar btn = Ti.UI.createButton({\n title:'OPEN'\n})\n\nbtn.addEventListener('click',function(){\n nav.open();\n})\n\nmainWin.add(btn);\n\nmainWin.open();\n\n\n########testWin.js########\n\nvar curWin = Ti.UI.currentWindow;\n\nvar l1 = Ti.UI.createLabel({\n\ttop:20,\n\ttext:'WAITING FOR OPEN EVENT'\n})\n\nvar l2 = Ti.UI.createLabel({\n\ttop:10,\n\ttext:'WAITING FOR FOCUS EVENT'\n})\n\ncurWin.add(l1);\ncurWin.add(l2);\n\n\ncurWin.addEventListener('open',function(){\n\tl1.text = 'GOT OPEN EVENT IN URL CONTEXT';\n})\n\ncurWin.addEventListener('focus',function(){\n\tl2.text = 'GOT FOCUS EVENT IN URL CONTEXT';\n})\n\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-17T19:47:39.000+0000", "updated": "2013-09-17T19:47:39.000+0000" }, { "id": "271553", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\n\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/4705\r\n3_1_X - https://github.com/appcelerator/titanium_mobile/pull/4706", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-17T19:51:22.000+0000", "updated": "2013-09-17T19:51:22.000+0000" }, { "id": "271674", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on:\r\n\r\nAppcelerator Studio: 3.1.3.201309132456\r\n
SDK: 3.1.3.v20130917141554
\r\nacs:1.0.6\r\n
alloy:1.2.2-cr
\r\nnpm:1.3.2\r\n
titanium:3.1.2
\r\ntitanium-code-processo:1.0.3-cr
\r\nOSX: 10.8.4\r\n
Xcode:5.0 GM seed\r\n
Device: ipod touch2(v7.0)\r\n\r\nUsing both the code verified the focus and open event of window being fired.\r\nHence closing the issue as fixed.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-18T06:09:07.000+0000", "updated": "2013-09-18T06:09:07.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }