Project: titanium
Issue TIMOB-17482: Android: App crashes when using searchBar border properties
App crashes if we use the searchBar properties borderRadius, borderColor, or borderWidth. And use this searchBar in a tableView using search property. h3.Testing Environment: Titanium SDK: 3.3.0.GA, 3.2.3.GA Titanium CLI: 3.3.0, Android SDK: 4.2.2, 4.4.2 OS X Version: 10.9.3, Appcelerator Studio: 3.3.0 h3.Steps to Reproduce the issue: 1. Create classic project. 2. Paste this code app.js file. 3. Run this code with the testing environment. h3.Test Code {code:title=app.js} var win = Titanium.UI.createWindow({	title : "search bar" }); // create table view data object var data = []; data[0] = Ti.UI.createTableViewRow({	hasChild : true,	title : 'Row 1' }); data[1] = Ti.UI.createTableViewRow({	hasDetail : true,	title : 'Row 2' }); data[2] = Ti.UI.createTableViewRow({	hasCheck : true,	title : 'Row 3' }); data[3] = Ti.UI.createTableViewRow({	title : 'Row 4' }); var search = Titanium.UI.createSearchBar({	borderRadius : 10,	borderColor : 'red',	borderWidth : 2,	showCancel : true,	height : 60,	hintText : "Filter results", }); // create table view var tableview = Titanium.UI.createTableView({	data : data,	top : 40,	search : search,	filterAttribute : "title", }); win.add(tableview); win.open(); {code} {code:title=application log} [ERROR] : TiApplication: (main) [107,107] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bd.apptest1/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.; Titanium 3.2.3,2014/04/22 10:17,b958a70 [ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bd.apptest1/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. [ERROR] : TiApplication: android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) [ERROR] : TiApplication: android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) [ERROR] : TiApplication: android.app.ActivityThread.access$600(ActivityThread.java:141) [ERROR] : TiApplication: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) [ERROR] : TiApplication: android.os.Handler.dispatchMessage(Handler.java:99) [ERROR] : TiApplication: android.os.Looper.loop(Looper.java:137) [ERROR] : TiApplication: android.app.ActivityThread.main(ActivityThread.java:5041) [ERROR] : TiApplication: java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: java.lang.reflect.Method.invoke(Method.java:511) [ERROR] : TiApplication: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) [ERROR] : TiApplication: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) [ERROR] : TiApplication: dalvik.system.NativeStart.main(Native Method) [ERROR] : TiApplication: Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. [ERROR] : TiApplication: android.view.ViewGroup.addViewInner(ViewGroup.java:3339) [ERROR] : TiApplication: android.view.ViewGroup.addView(ViewGroup.java:3210) [ERROR] : TiApplication: android.view.ViewGroup.addView(ViewGroup.java:3186) [ERROR] : TiApplication: ti.modules.titanium.ui.widget.TiUITableView.processProperties(TiUITableView.java:155) [ERROR] : TiApplication: org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1185) [ERROR] : TiApplication: org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:480) [ERROR] : TiApplication: org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471) [ERROR] : TiApplication: org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449) [ERROR] : TiApplication: org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487) [ERROR] : TiApplication: org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471) [ERROR] : TiApplication: org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449) [ERROR] : TiApplication: org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:566) [ERROR] : TiApplication: org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:544) [ERROR] : TiApplication: ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:303) [ERROR] : TiApplication: org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:32) [ERROR] : TiApplication: org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:452) [ERROR] : TiApplication: org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:528) [ERROR] : TiApplication: org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18) [ERROR] : TiApplication: android.app.Activity.performCreate(Activity.java:5104) [ERROR] : TiApplication: android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) [ERROR] : TiApplication: android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) [ERROR] : TiApplication:	... 11 more {code} Thanks
Story points: 5