{ "id": "85137", "key": "TIMOB-7293", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2017-03-29T22:23:48.000+0000", "created": "2012-01-19T11:21:07.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "15147", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "62543", "key": "TIMOB-1911", "fields": { "summary": "Android: Titanium apps can't survive an activity relaunch", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "15122", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "62543", "key": "TIMOB-1911", "fields": { "summary": "Android: Titanium apps can't survive an activity relaunch", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-29T22:23:52.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": "h4. PROBLEM DESCRIPTION\r\nblank (black in my case) screen after being to long in the background. App then freezes and the generated report says:\r\n\r\n{code}\r\nANR keyDispatchingTimedOut in TiTabActivity\r\nFreeze\r\nActivity appname.android.app/ti.modules.titanium.ui.TiTabActivity\r\nCause ANR keyDispatchingTimedOut\r\n{code}\r\n\r\n\r\n\r\nh4. MORE INFO\r\nCustomer tried this, without any success:\r\n\r\n{code}\r\n\r\n 8\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n{code}\r\n\r\n", "attachment": [ { "id": "25166", "filename": "stacktrace.txt", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-01-19T11:21:33.000+0000", "size": 6302, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: App Freeze after being too much time in the background", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": "Studio 1.0.7.201112281340, \r\nMobile SDK 1.8.0.1, \r\ndeploying on Android 4.0/4.0.3\r\nAlso tried latest builds/Android 2.2.3 and older builds (1.7.6).", "comment": { "comments": [ { "id": "180380", "author": { "name": "borgbis", "key": "borgbis", "displayName": "Jakub Rzepecki", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have these same problem in my app. When it stays in background too long - it freeze to black screen. This same problem occurs when I run two,tree other apps and then try to get back to mine.", "updateAuthor": { "name": "borgbis", "key": "borgbis", "displayName": "Jakub Rzepecki", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-24T02:49:18.000+0000", "updated": "2012-01-24T02:49:18.000+0000" }, { "id": "181043", "author": { "name": "sanderbeck", "key": "sanderbeck", "displayName": "Sander Beck", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Same here! App is Black", "updateAuthor": { "name": "sanderbeck", "key": "sanderbeck", "displayName": "Sander Beck", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-30T07:25:32.000+0000", "updated": "2012-01-30T07:25:32.000+0000" }, { "id": "181115", "author": { "name": "jakeh83+appcelerator.@gmail.com", "key": "jakeh83+appcelerator.@gmail.com", "displayName": "Jake H", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm seeing this as well. It's a huge issue that is preventing us from launching our apps. Android only- not happening on iOS.", "updateAuthor": { "name": "jakeh83+appcelerator.@gmail.com", "key": "jakeh83+appcelerator.@gmail.com", "displayName": "Jake H", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-30T14:35:06.000+0000", "updated": "2012-01-30T14:35:06.000+0000" }, { "id": "182060", "author": { "name": "thill8899", "key": "thill8899", "displayName": "Thomas Hill", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "thill8899", "key": "thill8899", "displayName": "Thomas Hill", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-06T11:42:44.000+0000", "updated": "2012-02-06T11:42:44.000+0000" }, { "id": "182832", "author": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There is something seriously wrong with the Activity events which is related to this problem.\r\nOur testing was done on 1.8.1 with real Android hardware from HTC, Moto and Samsung.\r\nWe've also seen this happen with 1.7.x SDK apps.\r\n\r\nWe started monitoring the events thrown by the currentActivity and when the app is started up we get:\r\n02-10 16:56:40.928: I/TiAPI(2528): onCreate: {\"source\":{\"_events\":{}},\"type\":\"create\"}\r\n02-10 16:56:41.022: I/TiAPI(2528): onStart: {\"source\":{\"_events\":{}},\"type\":\"start\"}\r\n02-10 16:56:41.022: I/TiAPI(2528): onResume: {\"source\":{\"_events\":{}},\"type\":\"resume\"}\r\n02-10 16:56:41.030: I/TiAPI(2528): onPause: {\"source\":{\"_events\":{}},\"type\":\"pause\"}\r\n02-10 16:56:41.538: I/TiAPI(2528): onStop: {\"source\":{\"_events\":{}},\"type\":\"stop\"}\r\n\r\nThe onPause and onStop appear to be erroneous since the app is running!\r\n\r\nWhen the Home button is hit, we get NO EVENT at all - no onPause or onStop events.\r\n\r\nWhen the Back button is hit, we get an onDestroy event.\r\n\r\nThen we duplicated the blank screen problem with the Activity events monitored - and Bingo!\r\n\r\nThis is what we did to get the Blank Screen:\r\n\r\n1. Start application X\r\n2. Hit Home Button\r\n3. Go away for 30-45 minutes, maybe use some other apps, maybe not - doesn't seem to make much difference (see note below)\r\n4. Click application X icon to resume\r\n5. Blank screen\r\n\r\nNow, when we click on the application icon to get the Blank Screen, we get these events:\r\n\r\n02-10 17:06:21.117: I/TiAPI(2528): onStart: {\"source\":{\"_events\":{}},\"type\":\"start\"}\r\n02-10 17:06:21.127: I/TiAPI(2528): onResume: {\"source\":{\"_events\":{}},\"type\":\"resume\"}\r\n\r\nAnd when we click on the Home button again, we get these events\r\n\r\n02-10 17:06:29.889: I/TiAPI(2528): onPause: {\"source\":{\"_events\":{}},\"type\":\"pause\"}\r\n02-10 17:06:30.109: I/TiAPI(2528): onStop: {\"source\":{\"_events\":{}},\"type\":\"stop\"}\r\n\r\nWhich bizarrely now appears to be normal behavior. \r\n\r\nPossible workaround is to recognize when we get an onStart + onResume without an immediately preceding onCreate and either kill the app or restart the app.\r\n", "updateAuthor": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-10T17:22:48.000+0000", "updated": "2012-02-10T17:22:48.000+0000" }, { "id": "182834", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "cf TIMOB-1911. Though the titles don't suggest it, it's the same underlying issue.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-02-10T17:30:59.000+0000", "updated": "2012-02-10T17:30:59.000+0000" }, { "id": "182859", "author": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Attempts at creating a workaround by detecting an onStart + onResume without an immediately preceding onCreate haven't worked.\r\nWhen the app resumes with the blank screen, global variables are available and I'm able to put up an alert screen, but I haven't been able to either kill or restart my app.\r\nSometimes the app goes unresponsive and you get an ANR message.", "updateAuthor": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-12T05:53:42.000+0000", "updated": "2012-02-12T05:53:42.000+0000" }, { "id": "183794", "author": { "name": "broadcastzero", "key": "broadcastzero", "displayName": "broadcast zero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@joe: how did you manage to get an alert-screen? maybe that could help me...", "updateAuthor": { "name": "broadcastzero", "key": "broadcastzero", "displayName": "broadcast zero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-21T07:14:50.000+0000", "updated": "2012-02-21T07:14:50.000+0000" }, { "id": "184308", "author": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "body": "You have to maintain a state variable to detect when you get an OnStart + onResume without an immediately preceding onCreate.\r\n\r\n\tcurrent.addEventListener ('start', function (e) {\r\n\t\tTi.API.info ('onStart: ');\r\n\t\tif (astate !== 'create') {\r\n\t\t\tTi.API.error ('BLANK SCREEN');\r\n\t\t\talert ('BLANK SCREEN');\r\n\t\t}\r\n\t\tastate = 'start';\r\n\t});\r\n\r\nWhat we did is that we restructured our program so that all windows and views are created in functions that are called from the main line code in app.js.\r\nAnd we put code into this event listener that would re-initialize the window state if it detected a BLANK SCREEN problem. \r\nBut the funny thing is that once we did this, we stopped having these problems.\r\nAnd I think it is because whoever is trying to kill the app to reclaim resources is somehow better able to do a clean kill when the app is structured this way without having its main window declared in the main line in app.js.\r\n\r\nSo the problem went from being predictable every 30-35 minutes after going from the App to Home to not happening at all - but instead we're noticing that the OS is reclaiming the app and we're starting from Splash more often. In my view, no big deal.", "updateAuthor": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-26T06:21:10.000+0000", "updated": "2012-02-26T06:21:10.000+0000" }, { "id": "184338", "author": { "name": "broadcastzero", "key": "broadcastzero", "displayName": "broadcast zero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "thank you for your answer, I'm still suffering from that problem..however, let's try this. thanks again.", "updateAuthor": { "name": "broadcastzero", "key": "broadcastzero", "displayName": "broadcast zero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-27T07:29:08.000+0000", "updated": "2012-02-27T07:29:08.000+0000" }, { "id": "190130", "author": { "name": "broadcastzero", "key": "broadcastzero", "displayName": "broadcast zero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "-", "updateAuthor": { "name": "broadcastzero", "key": "broadcastzero", "displayName": "broadcast zero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-05T23:00:27.000+0000", "updated": "2012-04-05T23:21:01.000+0000" }, { "id": "192431", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "Has this fix been released to any build yet?", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2012-04-24T13:40:40.000+0000", "updated": "2012-04-24T13:40:40.000+0000" }, { "id": "192440", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello Paul,\r\n\r\nthis was fixed in the latest 1.8.x and 2.0.1GA2. Let me know if is still happening to you.\r\n\r\nBest,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-04-24T14:13:00.000+0000", "updated": "2012-04-24T14:13:00.000+0000" }, { "id": "192449", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "was using 1.8.1 build for my app and was still happening. Going to 2.0.1 and seeing if it still occurs.", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2012-04-24T14:42:20.000+0000", "updated": "2012-04-24T14:42:20.000+0000" }, { "id": "192450", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "AFAIK, it's fixed on 1.8.2/3 and will be easier to go from your app with 1.8.1 SDK to 1.8.2/3 than to 2.0.1GA2. \r\n\r\nBEst,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-04-24T14:47:24.000+0000", "updated": "2012-04-24T14:47:24.000+0000" }, { "id": "192455", "author": { "name": "mlyon@gavant.com", "key": "mlyon@gavant.com", "displayName": "Miles Lyon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Similar issue here and I'd like to just upgrade to 1.8.2 if possible, but via Titanium I could only update to 2.0.1GA2. Unfortunately this introduced some new bugs and issues into my app. How do I get the 1.8.2 or 1.8.3 version specifically so I can address this bug with less impact to my app?", "updateAuthor": { "name": "mlyon@gavant.com", "key": "mlyon@gavant.com", "displayName": "Miles Lyon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-24T14:58:48.000+0000", "updated": "2012-04-24T14:58:48.000+0000" }, { "id": "192549", "author": { "name": "mlyon@gavant.com", "key": "mlyon@gavant.com", "displayName": "Miles Lyon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Actually another follow up question as well. If I update to 1.8.2/3 can I leave my app 'as is' or do I still specifically need to add changes to tiapp.xml as listed above? Like is the behavior corrected regardless in 1.8.2 and 2.0.1GA2 or just corrected so that the tiapp.xml changes will now work?", "updateAuthor": { "name": "mlyon@gavant.com", "key": "mlyon@gavant.com", "displayName": "Miles Lyon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-25T07:24:13.000+0000", "updated": "2012-04-25T07:24:13.000+0000" }, { "id": "192654", "author": { "name": "mlyon@gavant.com", "key": "mlyon@gavant.com", "displayName": "Miles Lyon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can I get a response on how to get v1.8.2 of the SDK?", "updateAuthor": { "name": "mlyon@gavant.com", "key": "mlyon@gavant.com", "displayName": "Miles Lyon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-25T15:09:12.000+0000", "updated": "2012-04-25T15:09:12.000+0000" }, { "id": "192690", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please use the steps described here and specify the SDK that you want to use:\r\nhttp://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Installing_Titanium_SDK_Continuous_Builds", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-25T17:22:19.000+0000", "updated": "2012-04-25T17:22:19.000+0000" }, { "id": "192740", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "I wouldn't say this bug was 'fixed'. Bug still exists. The problem is less and the workaround imposed is... interesting. Certainly better then before and i applaud the effort. App goes from being unreleasable to 'i can live with it if i MUST'. I've seen many sweeping changes to Appecelerator and many of the breaking bugs i've encountered have been fixed in a timely manner, within an update or so.\r\n\r\nCalling this fixed though is a bit of a stretch, although the damage is certainly mitigated. On Android the app still times out and goes to a blank screen. However, when starting back up Titanium seemingly detects this state and closes the app. The user must then manually open the application a 2nd time.\r\n\r\nThis is just terrible user experience, which i know Appcelerator prides itself on. Calling this resolved and not working on it further would be a mistake.\r\n\r\nThoughts: Either prevent this state from occuring in the first place or perhaps just have app.js run again if this state is detected? This would occur rather then closing the app. Apps in memory are freed after a period of time and it would not be unreasonable and/or expected to have to start from the beginning after being away from the application for a long period of time.", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2012-04-26T07:47:14.000+0000", "updated": "2012-04-26T07:54:19.000+0000" }, { "id": "416295", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket with reference to the linked issues.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T22:23:32.000+0000", "updated": "2017-03-29T22:23:32.000+0000" } ], "maxResults": 23, "total": 23, "startAt": 0 } } }