[TIMOB-9502] iOS: Focus and open events don't fire on first window when require() is used
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-09-17T21:26:54.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-12 API, 2013 Sprint 19, 2013 Sprint 19 API, Release 3.1.3, Release 3.2.0 |
Components | iOS |
Labels | api, module_window, qe-testadded, regression, titanbeta, triage |
Reporter | Shawn Lipscomb |
Assignee | Vishal Duggal |
Created | 2012-06-12T12:47:48.000+0000 |
Updated | 2013-12-02T09:14:53.000+0000 |
Description
Problem
There 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.Testcase
Use 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. Just 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.Expected Result
In the console log you should see: {panel} == Loading Procs == Loading Themes top bottom MainWinLoad fired MainWinFocus fired from [object Object] {panel}Actual Result
{panel} == Loading Procs == Loading Themes top bottom {panel} sometimes the "MainWinLoad fired" line will show up, and sometimes the "MainWinFocus fired from [object Object]" line also appears.Attachments
File | Date | Size |
---|---|---|
FocusOpenMemoryTest.zip | 2012-06-12T12:47:48.000+0000 | 128897 |
Pull pending https://github.com/appcelerator/titanium_mobile/pull/2385
HD ticket: [APP-152528](https://support.appcelerator.com/tickets/APP-152528)
Verified fixed in SDK 2.1.0.v20120615132253. Thanks!
Closing issue Tested with Ti Studio build 2.1.0.201206172244 Ti Mobile SDK 2.1.0.v20120618154152 hash r7830c03d OSX Lion 10.7.3 iPhone 4S OS 5.1 The expected behavior is shown
Reopening to update labels.
Tested Environment: Appcelerator Studio: 3.1.3.201309132456 SDK: 3.1.3.v20130916153052 acs:1.0.6 alloy:1.2.2-cr npm:1.3.2 titanium:3.1.2 titanium-code-processo:1.0.2 OSX: 10.8.4 Xcode:5.0 GM seed Device:ipad3(v7.0),iphone4s(v7.0)and ipodtouch3(v6.1.3) Expected Result on console logs are: == Loading Procs == Loading Themes top bottom MainWinLoad fired MainWinFocus fired from [object Object] Getting the expected console logs with 3.1.2.GA sdk build but with 3.1.3.v20130916153052 build not getting the expected result. Focus event is not being fired on first window when require() is used.
I do NOT see [INFO] : MainWinFocus fired from [object Object] The rest is as expected: [INFO] : == Loading Procs [INFO] : == Loading Themes [INFO] : top [INFO] : bottom [INFO] : MainWinLoad fired Tested with: Appcelerator Studio: 3.1.3.201309132456 Titanium SDK, build: 3.1.3.v20130916153052 Mac osx 10.8.4 Mountain Lion Xcode5 alloy@1.2.2-cr CLI version : 3.1.2 Devices: iPhone4(iOS7 GM seed) iPhone5 iOS7(11A465)
Test Code
Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/4705 3_1_X - https://github.com/appcelerator/titanium_mobile/pull/4706
Verified the fix on: Appcelerator Studio: 3.1.3.201309132456 SDK: 3.1.3.v20130917141554 acs:1.0.6 alloy:1.2.2-cr npm:1.3.2 titanium:3.1.2 titanium-code-processo:1.0.3-cr OSX: 10.8.4 Xcode:5.0 GM seed Device: ipod touch2(v7.0) Using both the code verified the focus and open event of window being fired. Hence closing the issue as fixed.