{ "id": "148239", "key": "AC-142", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-11-14T01:50:13.000+0000", "created": "2015-05-26T20:55:41.000+0000", "labels": [ "android", "lifecycle", "titanium" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-11-14T01:51:32.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "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": "*Problem*\r\nSetting the lifecycleContainer property of a TiViewProxy and adding it as a child of the lifecycleContainer creates an infinite loop when logging.\r\n\r\n*Test Case*\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar view = Ti.UI.createView({ lifecycleContainer: window });\r\n\r\nwindow.add(view);\r\nconsole.log(window);\r\n{code}", "attachment": [], "flagged": false, "summary": "Resursion when setting lifecycleContainer", "creator": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "353551", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~animecyc] Per documentation, please be sure that you are doing this:\r\n{quote}\r\nIf this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.\r\n{quote}\r\nIf you are following the documentation, please provide a full test case to reproduce the issue\r\n\r\nBest", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-05-26T21:09:17.000+0000", "updated": "2015-05-26T21:09:17.000+0000" }, { "id": "353558", "author": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "body": "@Radamantis Torres-Lechuga I provided the test case in the description.", "updateAuthor": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "created": "2015-05-26T21:18:49.000+0000", "updated": "2015-05-26T21:18:49.000+0000" }, { "id": "353559", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~animecyc] I don't see your Activity lifecycle callbacks in your test case, can you please provide a full runnable test case? Also if you can provide a use case that will help.\r\n\r\nBest", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-05-26T21:20:56.000+0000", "updated": "2015-05-26T21:20:56.000+0000" }, { "id": "353561", "author": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "body": "I don't see how that is relevant to the issue nor is it required to see the bug. For full disclosure I am using the lifecycleContainer in a custom android module. Regardless the issue will persist given my description.", "updateAuthor": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "created": "2015-05-26T21:22:36.000+0000", "updated": "2015-05-26T21:33:44.000+0000" }, { "id": "353563", "author": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "body": "Also, the provided test case exemplifies the issue. Adding callbacks won't remove the infinite loop. From what I've discerned it is because on Android when you log a TiViewProxy it prints all properties set on it's v8 object as well as its TiViewProxy children. Since \"lifecycleContainer\" sets the window and the window has the TIViewProxy in question as a child we get infinite recursion. ", "updateAuthor": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "created": "2015-05-26T21:31:46.000+0000", "updated": "2015-05-26T21:32:24.000+0000" }, { "id": "353566", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~animecyc] as you can see in our [documentation|http://docs.appcelerator.com/platform/latest/#!/guide/How_to_Submit_a_Bug_Report-section-29004732_HowtoSubmitaBugReport-SubmittingTickets] , a test case is required, and here's the doc on [how to create a test case|http://docs.appcelerator.com/platform/latest/#!/guide/How_to_Submit_a_Bug_Report-section-29004732_HowtoSubmitaBugReport-CreatingaTestCase]\r\n\r\n\r\nThanks", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-05-26T21:48:31.000+0000", "updated": "2015-05-26T21:48:31.000+0000" }, { "id": "353570", "author": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "body": "What am I missing that is not already there? From the article you provided it hits all the points needed for a test case: The test case is in the description, it has the least amount of code required to reproduce the bug, and it has no validation errors. The only thing I can't provide is a log because logging is the issue.\r\n\r\nI went ahead and added bold text as per the formatting in the article you provided.", "updateAuthor": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "created": "2015-05-26T21:56:46.000+0000", "updated": "2015-05-26T21:58:48.000+0000" }, { "id": "364338", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "We tested the issue using the sample code below. The *lifecycleContainer* property set to the current active instance of a standalone Window and it is working as expected.\r\n\r\n*Test Environments:*\r\n\r\nCLI Version :4.1.3\r\nTitanium SDK Version:4.1.1.GA,\r\nEmulator :Google Nexus 7 - 5.1.0 - API 22 - 800x1280\r\nAppc Studio: Appcelerator Studio, build: 4.1.1.201507141126\r\nAlloy: 1.7.6\r\nMac OS X,Version = 10.10.1.\r\n\r\n\r\n\r\n*Test Steps:*\r\n\r\n1.Create a classic project\r\n2.Import [Facebook module|http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook] into it and paste Facebook app id into /platform/android/res/values/strings.xml\r\n3.In app.js Use the createActivityWorker() method to create a Facebook proxy and Attach the proxy to the Window t, so it does not get garbage collected.\r\n4.Run with sample code.\r\n\r\n\r\n*Test Code:*\r\nYou may need to add the manifest and application elements.\r\n*tiapp.xml*\r\n\r\n{code}\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*app.js*\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\nvar fb = require('facebook');\r\nfb.addEventListener('login', function(e) {\r\n if (e.success) {\r\n alert('Logged in');\r\n }\r\n});\r\nfb.addEventListener('logout', function(e) {\r\n alert('Logged out');\r\n});\r\nif (Ti.Platform.name === 'android') {\r\n win.fbProxy = fb.createActivityWorker({lifecycleContainer: win});\r\n}\r\n// Add the button. Note that it doesn't need a click event listener.\r\nwin.add(fb.createLoginButton({\r\n readPermissions: ['read_stream','email'],\r\n top: 50\r\n}));\r\nwin.open()\r\n{code}\r\n\r\n*strings.xml*\r\n\r\n{code}\r\n\r\n your app id\r\n\r\n{code}\r\n", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-19T06:17:48.000+0000", "updated": "2015-11-14T01:51:32.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }