Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3017] Android: UI - searchBar autocorrect and autocapitalization causes crash

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2012-02-23T10:36:00.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStudio, Titanium SDK & CLI
Labelstc-more-info, tc-q-and-a
Reportermoe jo
AssigneeMauro Parra-Miranda
Created2012-01-01T01:24:07.000+0000
Updated2016-03-08T07:48:02.000+0000

Description

Problem

when adding the auto capitalization and auto correct attributes to a searchBar component the application crashes immediately.

Test case

var tabGroup = Ti.UI.createTabGroup();
var win = Ti.UI.createWindow({
    backgroundColor:'#fff'
});

win.add(Ti.UI.createSearchBar({
	autocorrect : false,
	hintText : "Search Everywhere",
	autocapitalization : false,
	height : 46,
	left : 0,
	top : 60,
	width : 320
});

tabGroup.addTab(Ti.UI.createTab({window:win});
tabGroup.open();

Logs

12-29 10:28:54.745: E/TiAPI(20029): --------added
12-29 10:28:54.764: E/TiAPI(20029): --------window created
12-29 10:28:54.764: E/TiAPI(20029): -------logo created
12-29 10:28:54.768: E/TiAPI(20029): -------searchbar created
12-29 10:28:54.772: E/TiAPI(20029): -------BT1 created
12-29 10:28:54.776: E/TiAPI(20029): -------BTN2 created
12-29 10:28:54.776: E/TiAPI(20029): ------- appSTUDIO logo created
12-29 10:28:54.780: E/TiAPI(20029): -------Bug report pic created
12-29 10:28:54.780: E/TiAPI(20029): ---------window created
12-29 10:28:55.128: E/TiApplication(20029): (main) [14,192] Sending event: exception on thread: main msg:java.lang.NumberFormatException: Unable to convert java.lang.Boolean; Titanium 1.8.0.1,2011/12/22 13:09,fbdc96f
12-29 10:28:55.128: E/TiApplication(20029): java.lang.NumberFormatException: Unable to convert java.lang.Boolean
12-29 10:28:55.128: E/TiApplication(20029): 	at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:307)
12-29 10:28:55.128: E/TiApplication(20029): 	at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:313)
12-29 10:28:55.128: E/TiApplication(20029): 	at ti.modules.titanium.ui.widget.TiUIText.handleKeyboard(TiUIText.java:297)
12-29 10:28:55.128: E/TiApplication(20029): 	at ti.modules.titanium.ui.widget.TiUIText.processProperties(TiUIText.java:145)
12-29 10:28:55.128: E/TiApplication(20029): 	at ti.modules.titanium.ui.widget.searchbar.TiUISearchBar.processProperties(TiUISearchBar.java:93)
12-29 10:28:55.128: E/TiApplication(20029): 	at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:641)
12-29 10:28:55.128: E/TiApplication(20029): 	at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:449)
12-29 10:28:55.128: E/TiApplication(20029): 	at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:441)
12-29 10:28:55.128: E/TiApplication(20029): 	at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:427)
12-29 10:28:55.128: E/TiApplication(20029): 	at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:456)
12-29 10:28:55.128: E/TiApplication(20029): 	at ti.modules.titanium.ui.ActivityWindowProxy.handleMessage(ActivityWindowProxy.java:81)
12-29 10:28:55.128: E/TiApplication(20029): 	at android.os.Handler.dispatchMessage(Handler.java:95)
12-29 10:28:55.128: E/TiApplication(20029): 	at android.os.Looper.loop(Looper.java:123)
12-29 10:28:55.128: E/TiApplication(20029): 	at android.app.ActivityThread.main(ActivityThread.java:3687)
12-29 10:28:55.128: E/TiApplication(20029): 	at java.lang.reflect.Method.invokeNative(Native Method)
12-29 10:28:55.128: E/TiApplication(20029): 	at java.lang.reflect.Method.invoke(Method.java:507)
12-29 10:28:55.128: E/TiApplication(20029): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
12-29 10:28:55.128: E/TiApplication(20029): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
12-29 10:28:55.128: E/TiApplication(20029): 	at dalvik.system.NativeStart.main(Native Method)
12-29 10:28:55.174: E/AndroidRuntime(20029): FATAL EXCEPTION: main
12-29 10:28:55.174: E/AndroidRuntime(20029): java.lang.NumberFormatException: Unable to convert java.lang.Boolean
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:307)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:313)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at ti.modules.titanium.ui.widget.TiUIText.handleKeyboard(TiUIText.java:297)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at ti.modules.titanium.ui.widget.TiUIText.processProperties(TiUIText.java:145)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at ti.modules.titanium.ui.widget.searchbar.TiUISearchBar.processProperties(TiUISearchBar.java:93)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:641)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:449)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:441)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:427)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:456)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at ti.modules.titanium.ui.ActivityWindowProxy.handleMessage(ActivityWindowProxy.java:81)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at android.os.Handler.dispatchMessage(Handler.java:95)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at android.os.Looper.loop(Looper.java:123)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at android.app.ActivityThread.main(ActivityThread.java:3687)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at java.lang.reflect.Method.invokeNative(Native Method)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at java.lang.reflect.Method.invoke(Method.java:507)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
12-29 10:28:55.174: E/AndroidRuntime(20029): 	at dalvik.system.NativeStart.main(Native Method)
12-29 10:28:55.182: E/(482): Dumpstate > /data/log/dumpstate_app_error

Discussions

Insert a link to your Q&A question and/or helpdesk ticket

Comments

  1. Paul Dowsett 2012-01-01

    Thanks for raising this ticket. In order for me to escalate it to the core team, all the fields must be complete. Please check it against the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist), and add any missing information. For the description, you can use [this template](https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template) as a starting point. Furthermore, a test case must be included and run without modification, as per the [Creating a Test Case](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase) section. Once it is complete, I will move it to the main project. Cheers
  2. Paul Dowsett 2012-01-01

    As I said previously, a test case must be included and run without modification, as per the [Creating a Test Case](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase) section. Thank you
  3. Paul Dowsett 2012-01-05

    Are you able to provide the requested information, so I may escalate this ticket? Thanks
  4. moe jo 2012-01-07

    sorry for the time it took me, my wife just had a baby.
  5. Paul Dowsett 2012-01-10

    Moe Congratulations about your new arrival - I hope mother and baby are well. :) Would you please refer to the [The Bug-Reporting Lifecycle](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-TheBugReportingLifecycle)? Hence, an open [Q&A](http://developer.appcelerator.com/questions/created) thread is required, so that it may be verified with the community, before a ticket may be opened. Thank you
  6. Paul Dowsett 2012-01-10

    Furthermore, please ensure that you are testing with the latest Titanium Mobile release, which is currently, 1.8.0.1. Thanks
  7. Mauro Parra-Miranda 2012-02-23

    Not a bug.
  8. Mauro Parra-Miranda 2013-11-24

    Invalid issue.

JSON Source