{ "id": "114335", "key": "TIMOB-14214", "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": "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": "2020-01-09T22:13:33.000+0000", "created": "2013-05-14T09:48:39.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "ios", "ipad", "showMasterInPortrait", "splitwindow", "tabgroup" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2020-01-09T22:13:33.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Problem*\r\nThe Alloy code below causes the app and simulator to exit when opening the SplitWindow. Removing showMasterInPortrait property from SplitWindow tag makes it work as usual. The property in the standard test case below works fine.\r\n\r\n*Steps to reproduce*\r\n1. Drop the code below into a new Default Alloy Project\r\n2. Run in iPad simulator\r\n3. Observe app and simulator exit\r\n4. Remove property, run again and it doesn't exit\r\n\r\n*index.xml*\r\n{code:xml} \r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n*index.js*\r\n{code:javascript}$.index.open();{code}\r\n\r\n*Standard test case (doesn't crash)*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar nav = Ti.UI.iPhone.createNavigationGroup({\r\n window: win\r\n});\r\n\r\nvar masterView = Ti.UI.createWindow();\r\n\r\nvar splitwin = Ti.UI.iPad.createSplitWindow({\r\n detailView: nav,\r\n masterView: masterView,\r\n showMasterInPortrait: true\r\n});\r\n\r\nsplitwin.addEventListener('visible',function(e){\r\n if (e.view == 'detail'){\r\n e.button.title = \"Master\";\r\n win.leftNavButton = e.button;\r\n } else if (e.view == 'master'){\r\n win.leftNavButton = null;\r\n }\r\n});\r\n\r\nsplitwin.open();\r\n{code}\r\n\r\n*Standard test case (crashes... Is Alloy calling tabGroup.open?)*\r\n{code:javascript}var win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"#FFF\"\r\n});\r\n\r\nvar tabGroup = Titanium.UI.createTabGroup({\r\n\tid : 'tabGroup1'\r\n});\r\n\r\nvar win1 = Ti.UI.createWindow();\r\n\r\nvar tab1 = Titanium.UI.createTab({\r\n\ticon : 'KS_nav_ui.png',\r\n\twindow : win1\r\n});\r\n\r\ntabGroup.addTab(tab1);\r\n\r\nvar detailView = Ti.UI.createWindow();\r\n\r\nvar splitwin = Ti.UI.iPad.createSplitWindow({\r\n\tdetailView : detailView,\r\n\tmasterView : tabGroup,\r\n\tshowMasterInPortrait : true\r\n});\r\n\r\nsplitwin.addEventListener('visible', function(e) {\r\n\tif (e.view == 'detail') {\r\n\t\te.button.title = \"Master\";\r\n\t\twin.leftNavButton = e.button;\r\n\t} else if (e.view == 'master') {\r\n\t\twin.leftNavButton = null;\r\n\t}\r\n});\r\n\r\ntabGroup.open(); // simulator and app exits\r\nsplitwin.open();{code}", "attachment": [], "flagged": false, "summary": "iOS: SplitWindow with showMasterInPortrait=true causes app to exit with Alloy", "creator": { "name": "mano.mykingdom", "key": "mano.mykingdom", "displayName": "Manoj Kumar", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "mano.mykingdom", "key": "mano.mykingdom", "displayName": "Manoj Kumar", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "iOS (iPad Simualtor)\r\nMobile SDK 3.1.0GA (With Alloy MVC)", "comment": { "comments": [ { "id": "251901", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed in iOS 6 iPad simulator with Ti SDK 3.1 GA and 3.2 CI.\r\n\r\nI think it is caused by calling tabGroup.open(), which you can try yourself by running the bottom standard test case.\r\n\r\n@Manoj - Try replacing the master view with something else, you'll probably see that it doesn't crash\r\n\r\n@Tony - Do you think Alloy automatically calls tabGroup.open()??\r\n\r\nAlso worth noting that in the docs, the detailView is the one with the navigation group, not the master view: http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iPad.SplitWindow", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-14T20:52:01.000+0000", "updated": "2013-05-14T20:52:01.000+0000" }, { "id": "251979", "author": { "name": "mano.mykingdom", "key": "mano.mykingdom", "displayName": "Manoj Kumar", "active": true, "timeZone": "Asia/Kolkata" }, "body": "When i use a window as master view instead of tabgroup it is working fine and no crashes. Even if i remove showMasterInPortrait=\"true\" property and use tabgroup as master view no crashes. Only it happens when i use showMasterInPortrait=\"true\" and tabgroup together. Now i avoid it by calling setShowMasterInPortrait method after the splitwindow is opened.", "updateAuthor": { "name": "mano.mykingdom", "key": "mano.mykingdom", "displayName": "Manoj Kumar", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-05-15T06:26:06.000+0000", "updated": "2013-05-15T06:26:06.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }