{ "id": "106597", "key": "TIMOB-12134", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15070", "description": "2013 Sprint 02 Core", "name": "2013 Sprint 02 Core", "archived": true, "released": true, "releaseDate": "2013-01-28" }, { "id": "14812", "description": "2013 Sprint 02", "name": "2013 Sprint 02", "archived": true, "released": true, "releaseDate": "2013-01-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-01-28T23:32:28.000+0000", "created": "2012-12-16T15:10:59.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "community", "qe-testadded", "regression" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-03-20T00:07:40.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": "h3. Problem description\r\nSetting 'borderWidth' for a window in a tabGroup crashes the App \r\n\r\nNot reproducible with TiSDK 2.1.4 GA\r\n\r\nh3. Steps to reproduce: \r\n\r\nStart from the KitchenSink BaseUIWindow.js \r\nAdd borderWidth: 0 in the self (window) definition as follows: \r\n\r\n{code}\r\nfunction BaseUIWindow(title) {\r\n var self = Ti.UI.createWindow({\r\n title:title,\r\n backgroundColor:'white',\r\n borderWidth : 0 // Add this line\r\n});\r\n{code}\r\n\r\nThe app will crash in the simulator and on the device with the following error:\r\n\r\n{code}\r\n[1028,1028] Sending event: exception on thread: main msg:java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.; Titanium 3.0.0,2012/12/12 18:49,a5894b3\r\n[ERROR][TiApplication(13705)] java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.\r\n[ERROR][TiApplication(13705)] \tat android.view.ViewGroup.addViewInner(ViewGroup.java:3337)\r\n[ERROR][TiApplication(13705)] \tat android.view.ViewGroup.addView(ViewGroup.java:3208)\r\n[ERROR][TiApplication(13705)] \tat android.view.ViewGroup.addView(ViewGroup.java:3188)\r\n[ERROR][TiApplication(13705)] \tat org.appcelerator.titanium.view.TiUIView.initializeBorder(TiUIView.java:953)\r\n[ERROR][TiApplication(13705)] \tat org.appcelerator.titanium.view.TiUIView.processProperties(TiUIView.java:697)\r\n[ERROR][TiApplication(13705)] \tat ti.modules.titanium.ui.widget.TiView.processProperties(TiView.java:49)\r\n[ERROR][TiApplication(13705)] \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:893)\r\n[ERROR][TiApplication(13705)] \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:310)\r\n[ERROR][TiApplication(13705)] \tat org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:107)\r\n[ERROR][TiApplication(13705)] \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n[ERROR][TiApplication(13705)] \tat android.os.Looper.loop(Looper.java:137)\r\n[ERROR][TiApplication(13705)] \tat android.app.ActivityThread.main(ActivityThread.java:4514)\r\n[ERROR][TiApplication(13705)] \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n[ERROR][TiApplication(13705)] \tat java.lang.reflect.Method.invoke(Method.java:511)\r\n[ERROR][TiApplication(13705)] \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)\r\n[ERROR][TiApplication(13705)] \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)\r\n[ERROR][TiApplication(13705)] \tat dalvik.system.NativeStart.main(Native Method)\r\n\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: window borderWidth:0 crashes when in tabGroup", "creator": { "name": "sjacq", "key": "sjacq", "displayName": "Sebastien JACQ", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [ { "id": "108679", "key": "TIMOB-12460", "fields": { "summary": "Backport to 3_0_X: TIMOB-12134", "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": "High", "id": "2" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } ], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.0.0 GA\r\ntested on Nexus Galaxy 4.2.1", "comment": { "comments": [ { "id": "235341", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Pull request https://github.com/appcelerator/titanium_mobile/pull/3752\r\n\r\nIf the view already has a parent, it needs to be removed before adding to the borderView. borderView is then added to the original parent.\r\n\r\nTested the kitchensink sample, works without crash.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-01-22T17:12:30.000+0000", "updated": "2013-01-22T17:12:30.000+0000" }, { "id": "236326", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "test case:\r\n\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff',\r\n borderWidth : 1,\r\n borderColor: 'red'\r\n \r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\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\n//\r\n// create controls tab and root window\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 icon:'KS_nav_ui.png',\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\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n\r\n// open tab group\r\ntabGroup.open();\r\n\r\n{code}\r\n\r\n1. Run test case\r\n\r\nExpected result:\r\nTabgroup opens without crashing\r\n\r\nActual result:\r\nApp crashes when opening tab group", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-28T23:26:01.000+0000", "updated": "2013-01-28T23:28:29.000+0000" }, { "id": "236338", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "backport PR https://github.com/appcelerator/titanium_mobile/pull/3809", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-01-28T23:54:06.000+0000", "updated": "2013-01-28T23:54:06.000+0000" }, { "id": "239377", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "App runs successfully and no crashes.\r\n\r\nVerified on:\r\nGoogle Nexus, android : 4.1\r\nSDK version: 3.1.0.v20130220200300\r\nCLI version : 3.0.24\r\nOS : MAC OSX 10.7.5\r\nXCode : 4.5.1", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-02-22T10:59:53.000+0000", "updated": "2013-02-22T10:59:53.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }