{ "id": "148894", "key": "TIMOB-19038", "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": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-06-25T23:11:47.000+0000", "created": "2015-06-17T22:01:13.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "qe-4.1.0" ], "versions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2015-06-30T18:47: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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h5.Description\r\n\r\nWhen using the QE testing apps, if I open one test case then the next test case I open will crash the application. I have attached an example app as APIModule.zip\r\n\r\nh5.Steps To Reproduce\r\n\r\n1. Download the attached project and build it for device or emulator\r\n2. Open test case TIMOB7187\r\n3. Close the window\r\n4. Open test case TIMOB9214\r\n5. Reverse steps 2-4\r\n\r\nh5.Actual Result\r\n\r\nWhen attempting open the second test case window the app will crash\r\n\r\nh5.Expected Result\r\n\r\nThe app should not crash", "attachment": [ { "id": "55869", "filename": "APIModule.zip", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-06-17T21:54:10.000+0000", "size": 3125699, "mimeType": "application/zip" } ], "flagged": false, "summary": "Windows: Crashes when opening windows from a tableview with the QE testing app", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Windows 8.1\r\nTi CLI: 4.1.0-dev\r\nTi SDK: 4.1.0.v20150616225249\r\nLumia 928: 8.1\r\nWindows Phone emulator 8-1-1", "closedSprints": [ { "id": 436, "state": "closed", "name": "2015 Sprint 13 Windows", "startDate": "2015-06-20T23:02:43.965Z", "endDate": "2015-07-04T23:02:00.000Z", "completeDate": "2015-07-06T14:03:22.174Z", "originBoardId": 144 } ], "comment": { "comments": [ { "id": "355600", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Bit more information due to TIMOB-19034 when this happens the following is printed in the console\r\n{{[ERROR] Application Error: \"Runtime Error during click event: unknown exception\"}}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-06-21T04:10:41.000+0000", "updated": "2015-06-21T04:10:41.000+0000" }, { "id": "355908", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here's code to reproduce the problem. It seem's we cant add a single UI element to +multiple+ windows.\r\n{code}\r\nvar main = Ti.UI.createWindow({ backgroundColor: 'black' }),\r\n desc = Ti.UI.createLabel({text: '\\'OPEN\\' and \\'CLOSE\\' more than once.', top: '25%'}),\r\n\tbtn = Ti.UI.createButton({ title: 'OPEN' }),\r\n\r\n\tbtn_close = Ti.UI.createButton({ title: 'CLOSE' }); // Create this once\r\n\r\nbtn.addEventListener('click', function () {\r\n var win = Ti.UI.createWindow({ backgroundColor: 'blue' });\r\n\r\n // Add 'btn_close' to potentially multiple windows\r\n win.add(btn_close); // This causes the exception\r\n\r\n btn_close.addEventListener('click', function () {\r\n win.close();\r\n });\r\n\r\n win.open();\r\n});\r\n\r\nmain.add(desc);\r\nmain.add(btn);\r\nmain.open();\r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-24T23:37:26.000+0000", "updated": "2015-06-24T23:45:25.000+0000" }, { "id": "355911", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~eharris] To fix the problem replace {{createTableView}} in _ui.js_ with :\r\n\r\n{code}\r\nfunction createTableView(_level) {\r\n var tableView = Ti.UI.createTableView();\r\n \r\n // populate the rows with test cases\r\n if (_level == 'Acceptance') {\r\n var testCases = at.createData();\r\n tableView.setData(testCases);\r\n }\r\n \r\n // launch each test case when selected\r\n tableView.addEventListener('click', function(_e) {\r\n var win = createTestCase(_e.rowData),\r\n done = Titanium.UI.createButton({\r\n title: \"Done\",\r\n height: 50,\r\n width: 50,\r\n bottom: 0,\r\n right: 0\r\n });\r\n\r\n win.add(done);\r\n done.addEventListener('click', function() {\r\n win.close();\r\n });\r\n\r\n win.open();\r\n });\r\n\r\n return tableView;\r\n}\r\n{code}\r\n\r\nThis creates a new instance of {{done}} for every window.", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-25T00:03:10.000+0000", "updated": "2015-06-25T00:14:17.000+0000" }, { "id": "355915", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "??Here's code to reproduce the problem. It seem's we cant add a single UI element to multiple windows.??\r\n\r\nConfirmed that it doesn't work because Windows Xaml components doesn't accept this. I can say it is a limitation of {{Xaml.UI.Controls}}, not because of Titanium {{LayoutEngine}}.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-06-25T00:41:14.000+0000", "updated": "2015-06-25T00:43:14.000+0000" }, { "id": "355976", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We should add a more descriptive error message.", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-25T18:34:59.000+0000", "updated": "2015-06-25T18:34:59.000+0000" }, { "id": "355977", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile_windows/pull/325", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-25T18:41:54.000+0000", "updated": "2015-06-25T18:41:54.000+0000" }, { "id": "356434", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nWe now get error with a more descriptive message : {code}[ERROR] : Application Error: \"Runtime Error during click event: No installed components were detected.\\r\\n\\r\\nElement is already the child of another element.\"{code}\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio: 4.1.0.201506261427\r\nTi SDK: 4.1.0.v20150630092706\r\nTi CLI: 4.0.1\r\nAlloy: 1.6.2\r\nWindows: 8.1 Enterprise 64-bit\r\nAPPC NPM: 4.1.0-1\r\nAPPC CLI: 4.1.0-4 \r\nDevice: Nokia Lumia 928 - Windows Phone 8.1\r\nWindows emulator : 8.1\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-30T18:47:39.000+0000", "updated": "2015-06-30T18:47:39.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }