{ "id": "76856", "key": "AC-3151", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2011-08-31T19:24:03.000+0000", "created": "2011-06-23T10:50:54.000+0000", "labels": [ "android", "launch" ], "versions": [], "issuelinks": [], "assignee": { "name": "tguntharp", "key": "tguntharp", "displayName": "Tony Guntharp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:48:13.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "The following usecase reproduces the issue:\r\n\r\n{code:javascript|title=app.js}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 1',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin1.add(label1);\r\n\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 2',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n\r\ntabGroup.open();\r\n{code}\r\n\r\n\r\nFirst time taping on the application Icon: the application starts like it should.\r\nThen, when taping the icon from dashboard or from application list: A new thread (activity) is started within the already existing application process, each time!\r\n\r\nThe taskscreen is not affected by this: it brings the app to foreground like expect\r\n\r\nThe expected behavior is: Bringing application to foreground, instead of running new activities.\r\n\r\nChanges were \"debuggable=true\" in AndroidManifest.xml, so I can track the thread activity, fastdev has also been disabled.\r\n\r\nI set launchmode:singleTop manually in AndroidManifest, but didn't help.\r\n\r\nPicture of DDM with multiple threads has been included, along with DDM log output.\r\n\r\nThis bug is critical, each time new threads are created the memory consumption increases which finally leads to application crash.\r\n\r\n\r\n", "attachment": [ { "id": "21445", "filename": "bugtest2.zip", "author": { "name": "pdewaha", "key": "pdewaha", "displayName": "Patric de Waha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-23T10:50:54.000+0000", "size": 5235052, "mimeType": "application/zip" } ], "flagged": false, "summary": "A new thread is created for each launch of the application, even it is in background (1 tap on Icon = 1 new activity)", "creator": { "name": "pdewaha", "key": "pdewaha", "displayName": "Patric de Waha", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pdewaha", "key": "pdewaha", "displayName": "Patric de Waha", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "The problem exists when using combinations of the following:\r\n* Real Device Android 2.3.3 (Sony Xperia Arc)\r\n* Google APIs Android 2.1-update1\r\n* Tested SDKs: 1.6.2, 1.7.0, 1.7.1, 1.8.0.v2\r\n\r\nThe problem does NOT exist when using:\r\n* Android 2.3.3 emulator\r\n* Ti SDK 1.6.2 - 1.8.X", "comment": { "comments": [ { "id": "161890", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Thanks for raising this ticket.\r\n\r\nWhen writing code to reproduce the issue, try to keep it as simple as possible; there is no need for comments or tab icons, for instance. See [Creating Good Use-cases|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-CreatingGoodUsecases] for more information about this.\r\n\r\nYou should ideally add your code in a wiki markup code block, rather than attaching it, as it makes the code more accessible. This is the same for log files, unless they are very long.\r\n\r\nI have made these changes. Please take a look, for the next ticket that you raise. See the [Jira Ticket Checklist|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist] for the official guidelines.\r\n\r\n\r\nWould you please check the ticket for correctness, as it stands? Could you edit the ticket and clarify which versions of Android you have tested (you have mentioned both 2.1.1 and 2.3.3, but it is not clear what the outcome was in each case).\r\n\r\nOnce you have provided this info, I can move the ticket to the respective project.\r\n\r\nThanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-08-04T12:49:22.000+0000", "updated": "2011-08-04T12:49:22.000+0000" }, { "id": "164727", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Patric\r\n\r\nYou are welcome to reopen this ticket if you are prepared to verify that it is still correct since my changes, and then I will move it to the main project.\r\n\r\nThanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-08-31T19:23:50.000+0000", "updated": "2011-08-31T19:23:50.000+0000" }, { "id": "168241", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Closing due to inactivity.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-10-07T05:48:02.000+0000", "updated": "2011-10-07T05:48:02.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }