java.lang.ArrayIndexOutOfBoundsException

Appcelerator JIRA | Markus Wutzler | 4 years ago
  1. 0

    h6.Problem Several performance issues with tableview on Android. h6.Expected result Applying a classname attribute to all rows should solve these issues and so we did. h6.Actual results Now the app crashes continously but not at the same point each time we try. h6.Developer remarks Unfortunately we tried several things to avoid this issue * changed tableview's data creation to tableview.data = [row1,row2,...]; instead of creating an empty data array on tableview creation and add rows via appendRow(); * removed startLayout() and finishLayout() * placed classname attribute at different possitions (seems to be important: classname in createTableViewRow({classname:...}) and the error occurs even earlier as if you place it as row.classname = ... somewhere after the creation part) Sometimes the error occurs during TableView creation and sometimes during scrolling and sometimes it doesn't appear. h6.Stack Trace {noformat} [WARN][dalvikvm( 636)] threadid=1: thread exiting with uncaught exception (group=0x4001d800) [ERROR][TiApplication( 636)] (main) [1466163,1660888] Sending event: exception on thread: main msg:java.lang.ArrayIndexOutOfBoundsException; Titanium 2.1.3,2012/10/02 16:16,15997d0 [ERROR][TiApplication( 636)] java.lang.ArrayIndexOutOfBoundsException [ERROR][TiApplication( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.applyChildProxies(TiTableViewRowProxyItem.java:164) [ERROR][TiApplication( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.refreshControls(TiTableViewRowProxyItem.java:144) [ERROR][TiApplication( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:280) [ERROR][TiApplication( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:83) [ERROR][TiApplication( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:216) [ERROR][TiApplication( 636)] at android.widget.AbsListView.obtainView(AbsListView.java:1294) [ERROR][TiApplication( 636)] at android.widget.ListView.makeAndAddView(ListView.java:1727) [ERROR][TiApplication( 636)] at android.widget.ListView.fillDown(ListView.java:652) [ERROR][TiApplication( 636)] at android.widget.ListView.fillGap(ListView.java:623) [ERROR][TiApplication( 636)] at android.widget.AbsListView.trackMotionScroll(AbsListView.java:2944) [ERROR][TiApplication( 636)] at android.widget.AbsListView.onTouchEvent(AbsListView.java:2065) [ERROR][TiApplication( 636)] at android.widget.ListView.onTouchEvent(ListView.java:3315) [ERROR][TiApplication( 636)] at android.view.View.dispatchTouchEvent(View.java:3766) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:897) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1671) [ERROR][TiApplication( 636)] at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107) [ERROR][TiApplication( 636)] at android.app.Activity.dispatchTouchEvent(Activity.java:2086) [ERROR][TiApplication( 636)] at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1655) [ERROR][TiApplication( 636)] at android.view.ViewRoot.handleMessage(ViewRoot.java:1785) [ERROR][TiApplication( 636)] at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR][TiApplication( 636)] at android.os.Looper.loop(Looper.java:123) [ERROR][TiApplication( 636)] at android.app.ActivityThread.main(ActivityThread.java:4627) [ERROR][TiApplication( 636)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][TiApplication( 636)] at java.lang.reflect.Method.invoke(Method.java:521) [ERROR][TiApplication( 636)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) [ERROR][TiApplication( 636)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) [ERROR][TiApplication( 636)] at dalvik.system.NativeStart.main(Native Method) [ERROR][AndroidRuntime( 636)] FATAL EXCEPTION: main [ERROR][AndroidRuntime( 636)] java.lang.ArrayIndexOutOfBoundsException [ERROR][AndroidRuntime( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.applyChildProxies(TiTableViewRowProxyItem.java:164) [ERROR][AndroidRuntime( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.refreshControls(TiTableViewRowProxyItem.java:144) [ERROR][AndroidRuntime( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:280) [ERROR][AndroidRuntime( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:83) [ERROR][AndroidRuntime( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:216) [ERROR][AndroidRuntime( 636)] at android.widget.AbsListView.obtainView(AbsListView.java:1294) [ERROR][AndroidRuntime( 636)] at android.widget.ListView.makeAndAddView(ListView.java:1727) [ERROR][AndroidRuntime( 636)] at android.widget.ListView.fillDown(ListView.java:652) [ERROR][AndroidRuntime( 636)] at android.widget.ListView.fillGap(ListView.java:623) [ERROR][AndroidRuntime( 636)] at android.widget.AbsListView.trackMotionScroll(AbsListView.java:2944) [ERROR][AndroidRuntime( 636)] at android.widget.AbsListView.onTouchEvent(AbsListView.java:2065) [ERROR][AndroidRuntime( 636)] at android.widget.ListView.onTouchEvent(ListView.java:3315) [ERROR][AndroidRuntime( 636)] at android.view.View.dispatchTouchEvent(View.java:3766) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:897) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1671) [ERROR][AndroidRuntime( 636)] at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107) [ERROR][AndroidRuntime( 636)] at android.app.Activity.dispatchTouchEvent(Activity.java:2086) [ERROR][AndroidRuntime( 636)] at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1655) [ERROR][AndroidRuntime( 636)] at android.view.ViewRoot.handleMessage(ViewRoot.java:1785) [ERROR][AndroidRuntime( 636)] at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR][AndroidRuntime( 636)] at android.os.Looper.loop(Looper.java:123) [ERROR][AndroidRuntime( 636)] at android.app.ActivityThread.main(ActivityThread.java:4627) [ERROR][AndroidRuntime( 636)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][AndroidRuntime( 636)] at java.lang.reflect.Method.invoke(Method.java:521) [ERROR][AndroidRuntime( 636)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) [ERROR][AndroidRuntime( 636)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) [ERROR][AndroidRuntime( 636)] at dalvik.system.NativeStart.main(Native Method) {noformat} h6.Additional inputs I compared our version with the KitchenSink exmaples but i didn't find any important differences. Therefore I'm not able to create some code that reproduces this error but maybe the following code samples of our app may help you. h6.Repro sequence Just scroll down/up on a device to replicate {code:javascript} var win = Titanium.UI.createWindow({ title : 'Tab 2', backgroundColor : '#fff', width : Ti.UI.FILL, height : Ti.UI.FILL, exitOnClose : true, }); var tableView = Titanium.UI.createTableView({ width : Ti.UI.FILL, height : Ti.UI.FILL }); var section = Ti.UI.createTableViewSection(); for (var i = 0; i < 100; i++) { var row = Ti.UI.createTableViewRow({ className : 'row'//having this enabled, causes the issue }); var view = Ti.UI.createView(); view.add(Ti.UI.createLabel({ text : '1', left : '10 dp' })); if (i % 2 === 0) view.add(Ti.UI.createLabel({ text : '2', right : '10 dp', })); row.add(view); section.add(row); } tableView.data = [section]; win.add(tableView); win.open(); {code} h6.Stack trace - Razr 2.3.5 {code} 11-29 12:32:15.942: I/ActivityManager(499): Start proc com.appc.test for activity com.appc.test/._1bestpracticesActivity: pid=3412 uid=10148 gids={1015, 3003} 11-29 12:32:15.997: I/TiApplication(3412): (main) [0,0] checkpoint, app created. 11-29 12:32:16.036: I/TiApplication(3412): (main) [39,39] Titanium 2.1.3 (2012/10/02 16:16 15997d0) 11-29 12:32:16.216: I/TiDbHelper(3412): (main) [182,221] No value in database for platform key: 'unique_machine_id' returning supplied default '' 11-29 12:32:16.223: I/TiDbHelper(3412): (main) [4,225] No value in database for platform key: 'hardware_machine_id' returning supplied default '' 11-29 12:32:16.294: I/TiApplication(3412): (main) [68,293] Titanium Javascript runtime: v8 11-29 12:32:16.294: D/dalvikvm(3412): Trying to load lib /data/data/com.appc.test/lib/libstlport_shared.so 0x4051cd78 11-29 12:32:16.302: D/dalvikvm(3412): Added shared lib /data/data/com.appc.test/lib/libstlport_shared.so 0x4051cd78 11-29 12:32:16.302: D/dalvikvm(3412): No JNI_OnLoad found in /data/data/com.appc.test/lib/libstlport_shared.so 0x4051cd78, skipping init 11-29 12:32:16.302: D/dalvikvm(3412): Trying to load lib /data/data/com.appc.test/lib/libkroll-v8.so 0x4051cd78 11-29 12:32:16.309: D/dalvikvm(3412): Added shared lib /data/data/com.appc.test/lib/libkroll-v8.so 0x4051cd78 11-29 12:32:16.333: I/TiRootActivity(3412): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null 11-29 12:32:16.387: D/TiAnalyticsDb(3412): (main) [59,59] Creating Database tianalytics.db 11-29 12:32:16.387: I/TiAnalyticsDb(3412): (main) [1,60] Upgrading Database from 1 to 4 11-29 12:32:16.528: E/TiApplication(3412): (KrollRuntimeThread) [135,195] APP PROXY: ti.modules.titanium.app.AppModule@405e5f90 11-29 12:32:16.544: W/V8Object(3412): Runtime disposed, cannot set property 'userAgent' 11-29 12:32:16.778: D/dalvikvm(3412): GC_EXTERNAL_ALLOC freed 1178K, 47% free 3786K/7111K, external 2741K/2773K, paused 36ms 11-29 12:32:16.825: D/dalvikvm(3412): Trying to load lib /data/data/com.appc.test/lib/libtiverify.so 0x4051cd78 11-29 12:32:16.825: D/dalvikvm(3412): Added shared lib /data/data/com.appc.test/lib/libtiverify.so 0x4051cd78 11-29 12:32:16.825: I/TiRootActivity(3412): (main) [0,0] checkpoint, on root activity resume. activity = com.appc.test._1bestpracticesActivity@405bcd50 11-29 12:32:16.911: W/InputManagerService(499): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@407d2688 (uid=10035 pid=917) 11-29 12:32:16.919: I/gralloc(499): Allocated 0x660072 size 6488161 11-29 12:32:16.973: I/ActivityManager(499): Displayed com.appc.test/._1bestpracticesActivity: +1s38ms 11-29 12:32:17.052: I/ActivityManager(499): No longer want com.motorola.blur.home.other (pid 1999): hidden #21 11-29 12:32:18.052: I/gralloc(499): Allocated 0x660072 size 6488161 11-29 12:32:19.802: D/AndroidRuntime(3412): Shutting down VM 11-29 12:32:19.802: W/dalvikvm(3412): threadid=1: thread exiting with uncaught exception (group=0x4001e560) 11-29 12:32:19.848: E/TiApplication(3412): (main) [2976,2976] Sending event: exception on thread: main msg:java.lang.ArrayIndexOutOfBoundsException; Titanium 2.1.3,2012/10/02 16:16,15997d0 11-29 12:32:19.848: E/TiApplication(3412): java.lang.ArrayIndexOutOfBoundsException 11-29 12:32:19.848: E/TiApplication(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.applyChildProxies(TiTableViewRowProxyItem.java:164) 11-29 12:32:19.848: E/TiApplication(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.refreshControls(TiTableViewRowProxyItem.java:144) 11-29 12:32:19.848: E/TiApplication(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:280) 11-29 12:32:19.848: E/TiApplication(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:83) 11-29 12:32:19.848: E/TiApplication(3412): at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:216) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.AbsListView.obtainView(AbsListView.java:1435) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.ListView.makeAndAddView(ListView.java:1824) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.ListView.fillDown(ListView.java:689) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.ListView.fillGap(ListView.java:658) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.AbsListView.trackMotionScroll(AbsListView.java:3469) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.AbsListView.onTouchEvent(AbsListView.java:2276) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.ListView.onTouchEvent(ListView.java:3535) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.View.dispatchTouchEvent(View.java:3885) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1921) 11-29 12:32:19.848: E/TiApplication(3412): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1196) 11-29 12:32:19.848: E/TiApplication(3412): at android.app.Activity.dispatchTouchEvent(Activity.java:2155) 11-29 12:32:19.848: E/TiApplication(3412): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1905) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2249) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewRoot.handleMessage(ViewRoot.java:1933) 11-29 12:32:19.848: E/TiApplication(3412): at android.os.Handler.dispatchMessage(Handler.java:99) 11-29 12:32:19.848: E/TiApplication(3412): at android.os.Looper.loop(Looper.java:130) 11-29 12:32:19.848: E/TiApplication(3412): at android.app.ActivityThread.main(ActivityThread.java:3859) 11-29 12:32:19.848: E/TiApplication(3412): at java.lang.reflect.Method.invokeNative(Native Method) 11-29 12:32:19.848: E/TiApplication(3412): at java.lang.reflect.Method.invoke(Method.java:507) 11-29 12:32:19.848: E/TiApplication(3412): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840) 11-29 12:32:19.848: E/TiApplication(3412): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598) 11-29 12:32:19.848: E/TiApplication(3412): at dalvik.system.NativeStart.main(Native Method) 11-29 12:32:19.927: E/AndroidRuntime(3412): FATAL EXCEPTION: main 11-29 12:32:19.927: E/AndroidRuntime(3412): java.lang.ArrayIndexOutOfBoundsException 11-29 12:32:19.927: E/AndroidRuntime(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.applyChildProxies(TiTableViewRowProxyItem.java:164) 11-29 12:32:19.927: E/AndroidRuntime(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.refreshControls(TiTableViewRowProxyItem.java:144) 11-29 12:32:19.927: E/AndroidRuntime(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:280) 11-29 12:32:19.927: E/AndroidRuntime(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:83) 11-29 12:32:19.927: E/AndroidRuntime(3412): at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:216) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.AbsListView.obtainView(AbsListView.java:1435) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.ListView.makeAndAddView(ListView.java:1824) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.ListView.fillDown(ListView.java:689) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.ListView.fillGap(ListView.java:658) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.AbsListView.trackMotionScroll(AbsListView.java:3469) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.AbsListView.onTouchEvent(AbsListView.java:2276) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.ListView.onTouchEvent(ListView.java:3535) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.View.dispatchTouchEvent(View.java:3885) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1921) 11-29 12:32:19.927: E/AndroidRuntime(3412): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1196) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.app.Activity.dispatchTouchEvent(Activity.java:2155) 11-29 12:32:19.927: E/AndroidRuntime(3412): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1905) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2249) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewRoot.handleMessage(ViewRoot.java:1933) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.os.Handler.dispatchMessage(Handler.java:99) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.os.Looper.loop(Looper.java:130) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.app.ActivityThread.main(ActivityThread.java:3859) 11-29 12:32:19.927: E/AndroidRuntime(3412): at java.lang.reflect.Method.invokeNative(Native Method) 11-29 12:32:19.927: E/AndroidRuntime(3412): at java.lang.reflect.Method.invoke(Method.java:507) 11-29 12:32:19.927: E/AndroidRuntime(3412): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840) 11-29 12:32:19.927: E/AndroidRuntime(3412): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598) 11-29 12:32:19.927: E/AndroidRuntime(3412): at dalvik.system.NativeStart.main(Native Method) 11-29 12:32:19.958: W/ActivityManager(499): Force finishing activity com.appc.test/._1bestpracticesActivity 11-29 12:32:20.106: D/dalvikvm(499): GC_EXTERNAL_ALLOC freed 1437K, 33% free 9328K/13767K, external 10097K/10227K, paused 90ms 11-29 12:32:20.122: W/ApplicationContext(499): Unable to create files directory 11-29 12:32:20.145: I/gralloc(499): Allocated 0x61663d64 size 2103800684 11-29 12:32:20.458: W/ActivityManager(499): Activity pause timeout for HistoryRecord{40bf7d68 com.appc.test/._1bestpracticesActivity} 11-29 12:32:20.505: D/ActivitityRenderTarget(917): onResume 11-29 12:32:20.520: W/IMGSRV(917): eglglue.c:778: InitContext: ignoring buffer type CBUF_TYPE_PDS_VERT_SECONDARY_PREGEN_BUFFER 11-29 12:32:20.528: I/gralloc(499): Allocated 0x660072 size 6488161 11-29 12:32:20.645: I/gralloc(499): Allocated 0x660072 size 6488161 11-29 12:32:20.716: I/gralloc(499): Allocated 0x660072 size 6488161 11-29 12:32:20.731: I/gralloc(499): Allocated 0x660072 size 6488161 {code}

    Appcelerator JIRA | 4 years ago | Markus Wutzler
    java.lang.ArrayIndexOutOfBoundsException
  2. 0

    h6.Problem Several performance issues with tableview on Android. h6.Expected result Applying a classname attribute to all rows should solve these issues and so we did. h6.Actual results Now the app crashes continously but not at the same point each time we try. h6.Developer remarks Unfortunately we tried several things to avoid this issue * changed tableview's data creation to tableview.data = [row1,row2,...]; instead of creating an empty data array on tableview creation and add rows via appendRow(); * removed startLayout() and finishLayout() * placed classname attribute at different possitions (seems to be important: classname in createTableViewRow({classname:...}) and the error occurs even earlier as if you place it as row.classname = ... somewhere after the creation part) Sometimes the error occurs during TableView creation and sometimes during scrolling and sometimes it doesn't appear. h6.Stack Trace {noformat} [WARN][dalvikvm( 636)] threadid=1: thread exiting with uncaught exception (group=0x4001d800) [ERROR][TiApplication( 636)] (main) [1466163,1660888] Sending event: exception on thread: main msg:java.lang.ArrayIndexOutOfBoundsException; Titanium 2.1.3,2012/10/02 16:16,15997d0 [ERROR][TiApplication( 636)] java.lang.ArrayIndexOutOfBoundsException [ERROR][TiApplication( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.applyChildProxies(TiTableViewRowProxyItem.java:164) [ERROR][TiApplication( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.refreshControls(TiTableViewRowProxyItem.java:144) [ERROR][TiApplication( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:280) [ERROR][TiApplication( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:83) [ERROR][TiApplication( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:216) [ERROR][TiApplication( 636)] at android.widget.AbsListView.obtainView(AbsListView.java:1294) [ERROR][TiApplication( 636)] at android.widget.ListView.makeAndAddView(ListView.java:1727) [ERROR][TiApplication( 636)] at android.widget.ListView.fillDown(ListView.java:652) [ERROR][TiApplication( 636)] at android.widget.ListView.fillGap(ListView.java:623) [ERROR][TiApplication( 636)] at android.widget.AbsListView.trackMotionScroll(AbsListView.java:2944) [ERROR][TiApplication( 636)] at android.widget.AbsListView.onTouchEvent(AbsListView.java:2065) [ERROR][TiApplication( 636)] at android.widget.ListView.onTouchEvent(ListView.java:3315) [ERROR][TiApplication( 636)] at android.view.View.dispatchTouchEvent(View.java:3766) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:897) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][TiApplication( 636)] at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1671) [ERROR][TiApplication( 636)] at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107) [ERROR][TiApplication( 636)] at android.app.Activity.dispatchTouchEvent(Activity.java:2086) [ERROR][TiApplication( 636)] at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1655) [ERROR][TiApplication( 636)] at android.view.ViewRoot.handleMessage(ViewRoot.java:1785) [ERROR][TiApplication( 636)] at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR][TiApplication( 636)] at android.os.Looper.loop(Looper.java:123) [ERROR][TiApplication( 636)] at android.app.ActivityThread.main(ActivityThread.java:4627) [ERROR][TiApplication( 636)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][TiApplication( 636)] at java.lang.reflect.Method.invoke(Method.java:521) [ERROR][TiApplication( 636)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) [ERROR][TiApplication( 636)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) [ERROR][TiApplication( 636)] at dalvik.system.NativeStart.main(Native Method) [ERROR][AndroidRuntime( 636)] FATAL EXCEPTION: main [ERROR][AndroidRuntime( 636)] java.lang.ArrayIndexOutOfBoundsException [ERROR][AndroidRuntime( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.applyChildProxies(TiTableViewRowProxyItem.java:164) [ERROR][AndroidRuntime( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.refreshControls(TiTableViewRowProxyItem.java:144) [ERROR][AndroidRuntime( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:280) [ERROR][AndroidRuntime( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:83) [ERROR][AndroidRuntime( 636)] at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:216) [ERROR][AndroidRuntime( 636)] at android.widget.AbsListView.obtainView(AbsListView.java:1294) [ERROR][AndroidRuntime( 636)] at android.widget.ListView.makeAndAddView(ListView.java:1727) [ERROR][AndroidRuntime( 636)] at android.widget.ListView.fillDown(ListView.java:652) [ERROR][AndroidRuntime( 636)] at android.widget.ListView.fillGap(ListView.java:623) [ERROR][AndroidRuntime( 636)] at android.widget.AbsListView.trackMotionScroll(AbsListView.java:2944) [ERROR][AndroidRuntime( 636)] at android.widget.AbsListView.onTouchEvent(AbsListView.java:2065) [ERROR][AndroidRuntime( 636)] at android.widget.ListView.onTouchEvent(ListView.java:3315) [ERROR][AndroidRuntime( 636)] at android.view.View.dispatchTouchEvent(View.java:3766) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:897) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936) [ERROR][AndroidRuntime( 636)] at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1671) [ERROR][AndroidRuntime( 636)] at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107) [ERROR][AndroidRuntime( 636)] at android.app.Activity.dispatchTouchEvent(Activity.java:2086) [ERROR][AndroidRuntime( 636)] at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1655) [ERROR][AndroidRuntime( 636)] at android.view.ViewRoot.handleMessage(ViewRoot.java:1785) [ERROR][AndroidRuntime( 636)] at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR][AndroidRuntime( 636)] at android.os.Looper.loop(Looper.java:123) [ERROR][AndroidRuntime( 636)] at android.app.ActivityThread.main(ActivityThread.java:4627) [ERROR][AndroidRuntime( 636)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][AndroidRuntime( 636)] at java.lang.reflect.Method.invoke(Method.java:521) [ERROR][AndroidRuntime( 636)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) [ERROR][AndroidRuntime( 636)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) [ERROR][AndroidRuntime( 636)] at dalvik.system.NativeStart.main(Native Method) {noformat} h6.Additional inputs I compared our version with the KitchenSink exmaples but i didn't find any important differences. Therefore I'm not able to create some code that reproduces this error but maybe the following code samples of our app may help you. h6.Repro sequence Just scroll down/up on a device to replicate {code:javascript} var win = Titanium.UI.createWindow({ title : 'Tab 2', backgroundColor : '#fff', width : Ti.UI.FILL, height : Ti.UI.FILL, exitOnClose : true, }); var tableView = Titanium.UI.createTableView({ width : Ti.UI.FILL, height : Ti.UI.FILL }); var section = Ti.UI.createTableViewSection(); for (var i = 0; i < 100; i++) { var row = Ti.UI.createTableViewRow({ className : 'row'//having this enabled, causes the issue }); var view = Ti.UI.createView(); view.add(Ti.UI.createLabel({ text : '1', left : '10 dp' })); if (i % 2 === 0) view.add(Ti.UI.createLabel({ text : '2', right : '10 dp', })); row.add(view); section.add(row); } tableView.data = [section]; win.add(tableView); win.open(); {code} h6.Stack trace - Razr 2.3.5 {code} 11-29 12:32:15.942: I/ActivityManager(499): Start proc com.appc.test for activity com.appc.test/._1bestpracticesActivity: pid=3412 uid=10148 gids={1015, 3003} 11-29 12:32:15.997: I/TiApplication(3412): (main) [0,0] checkpoint, app created. 11-29 12:32:16.036: I/TiApplication(3412): (main) [39,39] Titanium 2.1.3 (2012/10/02 16:16 15997d0) 11-29 12:32:16.216: I/TiDbHelper(3412): (main) [182,221] No value in database for platform key: 'unique_machine_id' returning supplied default '' 11-29 12:32:16.223: I/TiDbHelper(3412): (main) [4,225] No value in database for platform key: 'hardware_machine_id' returning supplied default '' 11-29 12:32:16.294: I/TiApplication(3412): (main) [68,293] Titanium Javascript runtime: v8 11-29 12:32:16.294: D/dalvikvm(3412): Trying to load lib /data/data/com.appc.test/lib/libstlport_shared.so 0x4051cd78 11-29 12:32:16.302: D/dalvikvm(3412): Added shared lib /data/data/com.appc.test/lib/libstlport_shared.so 0x4051cd78 11-29 12:32:16.302: D/dalvikvm(3412): No JNI_OnLoad found in /data/data/com.appc.test/lib/libstlport_shared.so 0x4051cd78, skipping init 11-29 12:32:16.302: D/dalvikvm(3412): Trying to load lib /data/data/com.appc.test/lib/libkroll-v8.so 0x4051cd78 11-29 12:32:16.309: D/dalvikvm(3412): Added shared lib /data/data/com.appc.test/lib/libkroll-v8.so 0x4051cd78 11-29 12:32:16.333: I/TiRootActivity(3412): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null 11-29 12:32:16.387: D/TiAnalyticsDb(3412): (main) [59,59] Creating Database tianalytics.db 11-29 12:32:16.387: I/TiAnalyticsDb(3412): (main) [1,60] Upgrading Database from 1 to 4 11-29 12:32:16.528: E/TiApplication(3412): (KrollRuntimeThread) [135,195] APP PROXY: ti.modules.titanium.app.AppModule@405e5f90 11-29 12:32:16.544: W/V8Object(3412): Runtime disposed, cannot set property 'userAgent' 11-29 12:32:16.778: D/dalvikvm(3412): GC_EXTERNAL_ALLOC freed 1178K, 47% free 3786K/7111K, external 2741K/2773K, paused 36ms 11-29 12:32:16.825: D/dalvikvm(3412): Trying to load lib /data/data/com.appc.test/lib/libtiverify.so 0x4051cd78 11-29 12:32:16.825: D/dalvikvm(3412): Added shared lib /data/data/com.appc.test/lib/libtiverify.so 0x4051cd78 11-29 12:32:16.825: I/TiRootActivity(3412): (main) [0,0] checkpoint, on root activity resume. activity = com.appc.test._1bestpracticesActivity@405bcd50 11-29 12:32:16.911: W/InputManagerService(499): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@407d2688 (uid=10035 pid=917) 11-29 12:32:16.919: I/gralloc(499): Allocated 0x660072 size 6488161 11-29 12:32:16.973: I/ActivityManager(499): Displayed com.appc.test/._1bestpracticesActivity: +1s38ms 11-29 12:32:17.052: I/ActivityManager(499): No longer want com.motorola.blur.home.other (pid 1999): hidden #21 11-29 12:32:18.052: I/gralloc(499): Allocated 0x660072 size 6488161 11-29 12:32:19.802: D/AndroidRuntime(3412): Shutting down VM 11-29 12:32:19.802: W/dalvikvm(3412): threadid=1: thread exiting with uncaught exception (group=0x4001e560) 11-29 12:32:19.848: E/TiApplication(3412): (main) [2976,2976] Sending event: exception on thread: main msg:java.lang.ArrayIndexOutOfBoundsException; Titanium 2.1.3,2012/10/02 16:16,15997d0 11-29 12:32:19.848: E/TiApplication(3412): java.lang.ArrayIndexOutOfBoundsException 11-29 12:32:19.848: E/TiApplication(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.applyChildProxies(TiTableViewRowProxyItem.java:164) 11-29 12:32:19.848: E/TiApplication(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.refreshControls(TiTableViewRowProxyItem.java:144) 11-29 12:32:19.848: E/TiApplication(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:280) 11-29 12:32:19.848: E/TiApplication(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:83) 11-29 12:32:19.848: E/TiApplication(3412): at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:216) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.AbsListView.obtainView(AbsListView.java:1435) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.ListView.makeAndAddView(ListView.java:1824) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.ListView.fillDown(ListView.java:689) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.ListView.fillGap(ListView.java:658) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.AbsListView.trackMotionScroll(AbsListView.java:3469) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.AbsListView.onTouchEvent(AbsListView.java:2276) 11-29 12:32:19.848: E/TiApplication(3412): at android.widget.ListView.onTouchEvent(ListView.java:3535) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.View.dispatchTouchEvent(View.java:3885) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.848: E/TiApplication(3412): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1921) 11-29 12:32:19.848: E/TiApplication(3412): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1196) 11-29 12:32:19.848: E/TiApplication(3412): at android.app.Activity.dispatchTouchEvent(Activity.java:2155) 11-29 12:32:19.848: E/TiApplication(3412): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1905) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2249) 11-29 12:32:19.848: E/TiApplication(3412): at android.view.ViewRoot.handleMessage(ViewRoot.java:1933) 11-29 12:32:19.848: E/TiApplication(3412): at android.os.Handler.dispatchMessage(Handler.java:99) 11-29 12:32:19.848: E/TiApplication(3412): at android.os.Looper.loop(Looper.java:130) 11-29 12:32:19.848: E/TiApplication(3412): at android.app.ActivityThread.main(ActivityThread.java:3859) 11-29 12:32:19.848: E/TiApplication(3412): at java.lang.reflect.Method.invokeNative(Native Method) 11-29 12:32:19.848: E/TiApplication(3412): at java.lang.reflect.Method.invoke(Method.java:507) 11-29 12:32:19.848: E/TiApplication(3412): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840) 11-29 12:32:19.848: E/TiApplication(3412): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598) 11-29 12:32:19.848: E/TiApplication(3412): at dalvik.system.NativeStart.main(Native Method) 11-29 12:32:19.927: E/AndroidRuntime(3412): FATAL EXCEPTION: main 11-29 12:32:19.927: E/AndroidRuntime(3412): java.lang.ArrayIndexOutOfBoundsException 11-29 12:32:19.927: E/AndroidRuntime(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.applyChildProxies(TiTableViewRowProxyItem.java:164) 11-29 12:32:19.927: E/AndroidRuntime(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.refreshControls(TiTableViewRowProxyItem.java:144) 11-29 12:32:19.927: E/AndroidRuntime(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:280) 11-29 12:32:19.927: E/AndroidRuntime(3412): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:83) 11-29 12:32:19.927: E/AndroidRuntime(3412): at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:216) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.AbsListView.obtainView(AbsListView.java:1435) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.ListView.makeAndAddView(ListView.java:1824) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.ListView.fillDown(ListView.java:689) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.ListView.fillGap(ListView.java:658) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.AbsListView.trackMotionScroll(AbsListView.java:3469) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.AbsListView.onTouchEvent(AbsListView.java:2276) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.widget.ListView.onTouchEvent(ListView.java:3535) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.View.dispatchTouchEvent(View.java:3885) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) 11-29 12:32:19.927: E/AndroidRuntime(3412): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1921) 11-29 12:32:19.927: E/AndroidRuntime(3412): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1196) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.app.Activity.dispatchTouchEvent(Activity.java:2155) 11-29 12:32:19.927: E/AndroidRuntime(3412): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1905) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2249) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.view.ViewRoot.handleMessage(ViewRoot.java:1933) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.os.Handler.dispatchMessage(Handler.java:99) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.os.Looper.loop(Looper.java:130) 11-29 12:32:19.927: E/AndroidRuntime(3412): at android.app.ActivityThread.main(ActivityThread.java:3859) 11-29 12:32:19.927: E/AndroidRuntime(3412): at java.lang.reflect.Method.invokeNative(Native Method) 11-29 12:32:19.927: E/AndroidRuntime(3412): at java.lang.reflect.Method.invoke(Method.java:507) 11-29 12:32:19.927: E/AndroidRuntime(3412): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840) 11-29 12:32:19.927: E/AndroidRuntime(3412): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598) 11-29 12:32:19.927: E/AndroidRuntime(3412): at dalvik.system.NativeStart.main(Native Method) 11-29 12:32:19.958: W/ActivityManager(499): Force finishing activity com.appc.test/._1bestpracticesActivity 11-29 12:32:20.106: D/dalvikvm(499): GC_EXTERNAL_ALLOC freed 1437K, 33% free 9328K/13767K, external 10097K/10227K, paused 90ms 11-29 12:32:20.122: W/ApplicationContext(499): Unable to create files directory 11-29 12:32:20.145: I/gralloc(499): Allocated 0x61663d64 size 2103800684 11-29 12:32:20.458: W/ActivityManager(499): Activity pause timeout for HistoryRecord{40bf7d68 com.appc.test/._1bestpracticesActivity} 11-29 12:32:20.505: D/ActivitityRenderTarget(917): onResume 11-29 12:32:20.520: W/IMGSRV(917): eglglue.c:778: InitContext: ignoring buffer type CBUF_TYPE_PDS_VERT_SECONDARY_PREGEN_BUFFER 11-29 12:32:20.528: I/gralloc(499): Allocated 0x660072 size 6488161 11-29 12:32:20.645: I/gralloc(499): Allocated 0x660072 size 6488161 11-29 12:32:20.716: I/gralloc(499): Allocated 0x660072 size 6488161 11-29 12:32:20.731: I/gralloc(499): Allocated 0x660072 size 6488161 {code}

    Appcelerator JIRA | 4 years ago | Markus Wutzler
    java.lang.ArrayIndexOutOfBoundsException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Eclipse | Using content assist on findViewById error

    Stack Overflow | 4 years ago | DirkJan
    java.lang.ArrayIndexOutOfBoundsException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      No message provided

      at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.applyChildProxies()
    2. ti.modules.titanium
      TiTableView$TTVListAdapter.getView
      1. ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.applyChildProxies(TiTableViewRowProxyItem.java:164)
      2. ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.refreshControls(TiTableViewRowProxyItem.java:144)
      3. ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:280)
      4. ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:83)
      5. ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:216)
      5 frames
    3. Android Platform
      ViewGroup.dispatchTouchEvent
      1. android.widget.AbsListView.obtainView(AbsListView.java:1435)
      2. android.widget.ListView.makeAndAddView(ListView.java:1824)
      3. android.widget.ListView.fillDown(ListView.java:689)
      4. android.widget.ListView.fillGap(ListView.java:658)
      5. android.widget.AbsListView.trackMotionScroll(AbsListView.java:3469)
      6. android.widget.AbsListView.onTouchEvent(AbsListView.java:2276)
      7. android.widget.ListView.onTouchEvent(ListView.java:3535)
      8. android.view.View.dispatchTouchEvent(View.java:3885)
      9. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903)
      10. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
      11. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
      12. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
      13. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
      14. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
      15. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
      15 frames
    4. Android
      PhoneWindow.superDispatchTouchEvent
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1921)
      2. com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1196)
      2 frames
    5. Android Platform
      Activity.dispatchTouchEvent
      1. android.app.Activity.dispatchTouchEvent(Activity.java:2155)
      1 frame
    6. Android
      PhoneWindow$DecorView.dispatchTouchEvent
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1905)
      1 frame
    7. Android Platform
      ActivityThread.main
      1. android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2249)
      2. android.view.ViewRoot.handleMessage(ViewRoot.java:1933)
      3. android.os.Handler.dispatchMessage(Handler.java:99)
      4. android.os.Looper.loop(Looper.java:130)
      5. android.app.ActivityThread.main(ActivityThread.java:3859)
      5 frames
    8. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:507)
      2 frames
    9. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598)
      2 frames
    10. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame