{ "id": "84536", "key": "TIMOB-7020", "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": "13503", "description": "Sprint 2012-14 Core", "name": "Sprint 2012-14 API", "archived": true, "released": true, "releaseDate": "2012-07-13" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-12-21T05:45:02.000+0000", "created": "2012-01-06T11:53:44.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_searchbar", "qe-review", "qe-testadded" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "18155", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "93314", "key": "TIMOB-9745", "fields": { "summary": "Android: Searchbar crashes in tableView when adding and removing views", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-06T19:23:25.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. Expected Behavior \r\nThe app launch, pressing the button shows another window with a search bar in a table, then pushing the hardware back button take us to the first window, then push again the button to open the window with the search bar again, needs to work and open the window with the search bar again\r\n\r\nh3. Actual Behavior\r\nWhen I push the button to open the search bar window for the second time, the application crash and throw this message:\r\n{code}\r\nmsg:java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first\r\n{code} \r\n\r\nh3. Steps to reproduce\r\n- Push the button\r\n- use hardware button to go back to the first screen\r\n- Push the button again\r\n- Crash\r\n\r\nh3. Test Case\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nvar page1 = require(\"page1\");\r\npage1.win.open(); \r\n{code}\r\n\r\n\r\n{code:title=page1.js|borderStyle=solid}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:\"white\",\r\n\tnavBarHidden:false\r\n}); \r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle:\"button\"\r\n});\r\n\r\nwin.add(button);\r\n\r\nvar page2 = require(\"page2\");\r\n\r\nbutton.addEventListener('click', function(){\r\n\tpage2.win.open(); \r\n})\r\n\r\nexports.win = win; \r\n{code}\r\n\r\n\r\n{code:title=page2.js|borderStyle=solid}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"white\",\r\n\tnavBarHidden : false\r\n});\r\n\r\nvar search = Ti.UI.createSearchBar();\r\n\r\nvar table = Ti.UI.createTableView({\r\n\tsearch:search\r\n});\r\n\r\nwin.add(table);\r\n\r\nexports.win = win;\r\n{code}\r\n\r\n\r\n{code:title=Log|borderStyle=solid}\r\nI/ActivityManager( 62): Starting: Intent { cmp=com.appcelerator.app283994/org.appcelerator.titanium.TiActivity (has extras) } from pid 412\r\nD/AndroidRuntime( 412): Shutting down VM\r\nW/dalvikvm( 412): threadid=1: thread exiting with uncaught exception (group=0x40015560)\r\nE/TiApplication( 412): (main) [2630,9831] 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 1.9.0,2012/01/03 08:46,428293e\r\nE/TiApplication( 412): java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.\r\nE/TiApplication( 412): \tat android.view.ViewGroup.addViewInner(ViewGroup.java:1976)\r\nE/TiApplication( 412): \tat android.view.ViewGroup.addView(ViewGroup.java:1871)\r\nE/TiApplication( 412): \tat android.view.ViewGroup.addView(ViewGroup.java:1851)\r\nE/TiApplication( 412): \tat ti.modules.titanium.ui.widget.TiUITableView.processProperties(TiUITableView.java:131)\r\nE/TiApplication( 412): \tat org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:641)\r\nE/TiApplication( 412): \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:449)\r\nE/TiApplication( 412): \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:441)\r\nE/TiApplication( 412): \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:427)\r\nE/TiApplication( 412): \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:456)\r\nE/TiApplication( 412): \tat ti.modules.titanium.ui.ActivityWindowProxy.handleMessage(ActivityWindowProxy.java:81)\r\nE/TiApplication( 412): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/TiApplication( 412): \tat android.os.Looper.loop(Looper.java:130)\r\nE/TiApplication( 412): \tat android.app.ActivityThread.main(ActivityThread.java:3683)\r\nE/TiApplication( 412): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/TiApplication( 412): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\nE/TiApplication( 412): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)\r\nE/TiApplication( 412): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)\r\nE/TiApplication( 412): \tat dalvik.system.NativeStart.main(Native Method)\r\nI/ActivityManager( 62): Displayed com.appcelerator.app283994/org.appcelerator.titanium.TiActivity: +364ms\r\nE/AndroidRuntime( 412): FATAL EXCEPTION: main\r\nE/AndroidRuntime( 412): java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.\r\nE/AndroidRuntime( 412): \tat android.view.ViewGroup.addViewInner(ViewGroup.java:1976)\r\nE/AndroidRuntime( 412): \tat android.view.ViewGroup.addView(ViewGroup.java:1871)\r\nE/AndroidRuntime( 412): \tat android.view.ViewGroup.addView(ViewGroup.java:1851)\r\nE/AndroidRuntime( 412): \tat ti.modules.titanium.ui.widget.TiUITableView.processProperties(TiUITableView.java:131)\r\nE/AndroidRuntime( 412): \tat org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:641)\r\nE/AndroidRuntime( 412): \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:449)\r\nE/AndroidRuntime( 412): \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:441)\r\nE/AndroidRuntime( 412): \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:427)\r\nE/AndroidRuntime( 412): \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:456)\r\nE/AndroidRuntime( 412): \tat ti.modules.titanium.ui.ActivityWindowProxy.handleMessage(ActivityWindowProxy.java:81)\r\nE/AndroidRuntime( 412): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/AndroidRuntime( 412): \tat android.os.Looper.loop(Looper.java:130)\r\nE/AndroidRuntime( 412): \tat android.app.ActivityThread.main(ActivityThread.java:3683)\r\nE/AndroidRuntime( 412): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/AndroidRuntime( 412): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\nE/AndroidRuntime( 412): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)\r\nE/AndroidRuntime( 412): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)\r\nE/AndroidRuntime( 412): \tat dalvik.system.NativeStart.main(Native Method)\r\nW/ActivityManager( 62): Force finishing activity com.appcelerator.app283994/org.appcelerator.titanium.TiActivity\r\n{code}\r\n", "attachment": [ { "id": "24959", "filename": "Screen Shot 2012-01-06 at 11.53.20 AM.png", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2012-01-06T11:53:44.000+0000", "size": 103723, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Search bar in table causing crash", "creator": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "subtasks": [], "reporter": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "environment": "Titanium SDK version: 1.8.0 / 1.8.0.1 / 1.9.0\r\nPlatform OS: Android\r\nPlatform OS Version: 2.3.3\r\nDevice Details: simulator \r\nHost Operating System: OSX 10.7.2\r\nTitanium Studio Build 1.0.6.201110251616", "comment": { "comments": [ { "id": "201353", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/2497", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-03T10:52:48.000+0000", "updated": "2012-07-03T10:52:48.000+0000" }, { "id": "211360", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Environment used for verification -\r\nTested with Titanium SDK: 2.2.0.v20120801170113\r\nTested with Titanium  Studio: 2.1.1.201207271312\r\nDevice - Android Emulator 2.3.3\r\nMachine OS - MAC 10.7.3\r\n", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-08-03T01:08:01.000+0000", "updated": "2012-08-03T01:08:01.000+0000" }, { "id": "215539", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Occurs on:\r\nTitanium SDK: 2.1.2.v20120816171609\r\nTitanium  Studio: 2.1.2.201208192014\r\nDevice:\r\nSamsung GALAXY Note (2.3.6)\r\n\r\nFixed with: SDK version: 2.2.0.v20120801170113", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-21T22:07:51.000+0000", "updated": "2012-08-21T22:07:51.000+0000" }, { "id": "278482", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil testcase PR\n\nhttps://github.com/appcelerator/titanium_mobile/pull/4758\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-06T19:23:25.000+0000", "updated": "2013-11-06T19:23:25.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }