[TIMOB-15544] iOS7: info.plist key 'Application does not run in background' causes the application to crash when is set to 'YES'
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-12-27T23:15:56.000+0000 |
Affected Version/s | Release 3.1.3 |
Fix Version/s | 2013 Sprint 26, 2013 Sprint 26 API, Release 3.2.1, Release 3.3.0 |
Components | iOS |
Labels | module_titanium, module_xcodebuild, qe-testadded, regression, supportTeam, triage |
Reporter | Rupesh Sharma |
Assignee | Sabil Rahim |
Created | 2013-10-21T11:43:18.000+0000 |
Updated | 2014-07-31T08:51:11.000+0000 |
Description
Description
Attached is a very simple multiple context app using the info.plist key 'Application does not run in background' key set to 'YES'. It crashes after < 10 open/closes of app. Note: Issue is reproducible only in 3.1.3GA.Test Case
Please find the attached project that reproduces the issue. Try to open/close the application for less than 10 times and then you are able to reproduce the issue.Attachments
File | Date | Size |
---|---|---|
testApp.zip | 2013-10-21T11:43:18.000+0000 | 1408708 |
[~rsharma] You indicate it's only reproducible in 3.1.3.GA. What other SDKs did you try? Does it only happen on iOS 7?
Does it matter how fast you open and close the app? Is it in the space of one minute? Or across an hour?
Tested Environment: Appcelerator Studio: 3.2.0.201312151544 SDK:3.2.0.v20131215211321 alloy: 1.3.0-cr acs: 1.0.10 npm: 1.3.2 titanium: 3.2.0-cr3 titanium-code-processor: 1.1.0-cr2 Xcode:5.0.2 OS: Mac OSX 10.9 Device: Iphone5(v7.0.4),Ipod Touch3(v6.1.3) Hope my findings help: I could see the strange behavior that app crash(not visible to us) instead it just generates the crash logs. App crash(not visible to us) has a reason that info plist has key 'Application does not run in background' set to 'YES'. Hence app always relaunches itself from start. Steps to reproduce: 1)Import the test app attached and run on iOS Device. 2)Tap on any tab. Respective window gets open. 3)Press Home button. So that app gets terminated(as because info plist has key ‘Application does not run’ in background set to true). 4)Now when again I launch the app the app gets restarted and launch itself. But the app throws crash logs as:
The above scenario is reproduced in latest sdk build:3.2.0.v20131215211321 as well as on 3.1.3.GA on both iOS6 and 7 devices. But using 3.1.2.GA no crash logs are generated instead just gets a warning :
Alright looks like a bug we introduced as part of windows refactor. (3.1.3) Turns out in TiUITabProxy.m ; closeWindowProxy:animated: method when it trys to find the navigationController. the rootWindow is nil and is no longer a type of TiWindowProxy causing the crash.
MASTER PR : https://github.com/appcelerator/titanium_mobile/pull/5166
32X PR https://github.com/appcelerator/titanium_mobile/pull/5175
Closing ticket as fixed. Verified, using the attached sample app, that the app does not silently crash after pressing the home button. Tested on: Appcelerator Studio, build: 3.2.1.201401052158 SDK build: 3.2.1.v20140106134045, 3.3.0.v20140106141645 CLI: 3.2.0 Alloy: 1.3.1-beta Xcode: 5.0.2 Devices: iphone 4s (6.0.1), iphone 5s (7.0.2)