Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25737] Android - change attribute in ListDataItem - crash app

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-05-22T19:24:35.000+0000
Affected Version/sRelease 7.0.1
Fix Version/sRelease 7.5.0
Componentsn/a
Labelsandroid, engTriage
ReporterMichele Cavalcanti
AssigneeShak Hossain
Created2018-01-29T17:39:38.000+0000
Updated2019-05-22T19:24:35.000+0000

Description

SDK : 7.0.1 Hi, i have listview with Textfield hidden in a View. When Click in one row the onItemclick event it's fired, in this method i change the visible and height attribute of the view and call updateItemAt. Write in TextField and click the second row, app is killed. This code works perdect on iOS device Exception: [WARN] : View: requestLayout() improperly called by ti.modules.titanium.ui.widget.listview.TiNestedListView$ApiLevel21$NestedListView{b0dc302 VFED.VC.. ......ID 0,0-1440,2112} during layout: running second layout pass [ERROR] : TiApplication: (main) [8966,8966] Sending event: exception on thread: main msg:java.lang.IndexOutOfBoundsException: setSpan (2 ... 2) ends beyond length 0; Titanium 7.0.1,2017/12/18 10:42,undefined [ERROR] : TiApplication: java.lang.IndexOutOfBoundsException: setSpan (2 ... 2) ends beyond length 0 [ERROR] : TiApplication: at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1265) [ERROR] : TiApplication: at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:684) [ERROR] : TiApplication: at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:677) [ERROR] : TiApplication: at android.text.Selection.setSelection(Selection.java:76) [ERROR] : TiApplication: at android.text.Selection.setSelection(Selection.java:87) [ERROR] : TiApplication: at android.widget.EditText.setSelection(EditText.java:103) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.listview.TiListView$ListViewWrapper.onLayout(TiListView.java:175) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:862) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:862) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) [ERROR] : TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:261) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:443) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) [ERROR] : TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:261) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) [ERROR] : TiApplication: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) [ERROR] : TiApplication: at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) [ERROR] : TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:261) [ERROR] : TiApplication: at com.android.internal.policy.DecorView.onLayout(DecorView.java:726) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346) [ERROR] : TiApplication: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068) [ERROR] : TiApplication: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254) [ERROR] : TiApplication: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337) [ERROR] : TiApplication: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874) [ERROR] : TiApplication: at android.view.Choreographer.doCallbacks(Choreographer.java:686) [ERROR] : TiApplication: at android.view.Choreographer.doFrame(Choreographer.java:621) [ERROR] : TiApplication: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) [ERROR] : TiApplication: at android.os.Handler.handleCallback(Handler.java:751) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:154) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:6119) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

Attachments

FileDateSize
20180129_180715.gif2018-01-29T17:24:56.000+0000516867
bugAndroid.zip2018-01-29T17:31:17.000+00001995588

Comments

  1. Emiliano 2018-02-05

    I've the same issue...
  2. Alan Hutton 2019-05-22

    Unable to reproduce with 7.5.0.GA > 8.0.1.GA

JSON Source