{ "id": "112201", "key": "TIMOB-13370", "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": "15397", "description": "2013 Soprint 07 API", "name": "2013 Sprint 07 API", "archived": true, "released": true, "releaseDate": "2013-04-08" }, { "id": "15105", "description": "2013 Sprint 07", "name": "2013 Sprint 07", "archived": true, "released": true, "releaseDate": "2013-04-08" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-04-08T20:38:08.000+0000", "created": "2013-04-04T19:14:37.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tableview", "qe-testadded", "regression", "triage" ], "versions": [], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-02-21T01:38:34.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. Description\r\nThe following code will make the app crash after scrolling all the way to the bottom and back up. Sometimes it crashes earlier. Another thing that happens is a JS error pops up as shown in this image:\r\nhttp://f.cl.ly/items/3e3i103A0W0y3S3Z3S1B/image001.png\r\n\r\nAll this happened after the fix for bug TIMOB-13055\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#ffffff'\r\n});\r\n\r\nvar tableData = [];\r\nvar x = 0;\r\nfor(var i = 0; i < 10; i++) {\r\n // Create 10 sections\r\n var section = Ti.UI.createTableViewSection({\r\n font: {\r\n fontSize: '14dp'\r\n },\r\n headerTitle: 'Pretty Section #' + (i+1),\r\n color: 'white'\r\n });\r\n // Create 10 rows and add them to the section\r\n for(var o = 0; o < 10; o++) {\r\n var avatar = Ti.UI.createImageView({\r\n image: 'KS_nav_ui.png',\r\n width: '64dp',\r\n height: '64dp',\r\n left: '0dp',\r\n top: '0dp'\r\n });\r\n x++;\r\n var title = Ti.UI.createLabel({\r\n left: '70dp',\r\n top: '5dp',\r\n height: Ti.UI.SIZE,\r\n font: {\r\n fontSize: '18dp'\r\n },\r\n color: 'black',\r\n text: 'Row number is ' + (o+1)\r\n });\r\n var subtitle = Ti.UI.createLabel({\r\n left: '70dp',\r\n top: '30dp',\r\n height: Ti.UI.SIZE,\r\n font: {\r\n fontSize: '14dp'\r\n },\r\n color: 'black',\r\n text: 'Section is ' + (i+1)\r\n });\r\n var row = Ti.UI.createTableViewRow({\r\n height: '64dp',\r\n className: 'choppy_tableview'\r\n });\r\n row.add(avatar);\r\n row.add(title);\r\n row.add(subtitle);\r\n section.add(row);\r\n }\r\n tableData.push(section);\r\n}\r\n// Create the table view\r\nvar table = Ti.UI.createTableView({\r\n data: tableData\r\n});\r\n\r\ntable.addEventListener('click', function(){\r\n\t\r\n});\r\n\r\ntable.addEventListener('scroll', function(){\r\n\t\r\n});\r\n\r\n\r\nwin.add(table);\r\n\r\nwin.open();\r\n{code}\r\n\r\nh3. Stack trace:\r\n{code}\r\n04-04 14:09:03.784: E/TiApplication(10959): (main) [11968,11968] Sending event: exception on thread: main msg:java.util.ConcurrentModificationException; Titanium 3.1.0,2013/04/02 15:41,1b76dea\r\n04-04 14:09:03.784: E/TiApplication(10959): java.util.ConcurrentModificationException\r\n04-04 14:09:03.784: E/TiApplication(10959): at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)\r\n04-04 14:09:03.784: E/TiApplication(10959): at java.util.HashMap$EntryIterator.next(HashMap.java:833)\r\n04-04 14:09:03.784: E/TiApplication(10959): at java.util.HashMap$EntryIterator.next(HashMap.java:831)\r\n04-04 14:09:03.784: E/TiApplication(10959): at java.util.HashMap.constructorPutAll(HashMap.java:209)\r\n04-04 14:09:03.784: E/TiApplication(10959): at java.util.HashMap.(HashMap.java:200)\r\n04-04 14:09:03.784: E/TiApplication(10959): at org.appcelerator.kroll.KrollDict.(KrollDict.java:79)\r\n04-04 14:09:03.784: E/TiApplication(10959): at ti.modules.titanium.ui.TableViewProxy.fireEvent(TableViewProxy.java:156)\r\n04-04 14:09:03.784: E/TiApplication(10959): at org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(TiViewProxy.java:818)\r\n04-04 14:09:03.784: E/TiApplication(10959): at ti.modules.titanium.ui.widget.tableview.TiTableView$1.onScrollStateChanged(TiTableView.java:306)\r\n04-04 14:09:03.784: E/TiApplication(10959): at android.widget.AbsListView.reportScrollStateChange(AbsListView.java:3253)\r\n04-04 14:09:03.784: E/TiApplication(10959): at android.widget.AbsListView$TwFlingRunnable.endFling(AbsListView.java:3323)\r\n04-04 14:09:03.784: E/TiApplication(10959): at android.widget.AbsListView$TwFlingRunnable.run(AbsListView.java:3392)\r\n04-04 14:09:03.784: E/TiApplication(10959): at android.os.Handler.handleCallback(Handler.java:587)\r\n04-04 14:09:03.784: E/TiApplication(10959): at android.os.Handler.dispatchMessage(Handler.java:92)\r\n04-04 14:09:03.784: E/TiApplication(10959): at android.os.Looper.loop(Looper.java:130)\r\n04-04 14:09:03.784: E/TiApplication(10959): at android.app.ActivityThread.main(ActivityThread.java:3691)\r\n04-04 14:09:03.784: E/TiApplication(10959): at java.lang.reflect.Method.invokeNative(Native Method)\r\n04-04 14:09:03.784: E/TiApplication(10959): at java.lang.reflect.Method.invoke(Method.java:507)\r\n04-04 14:09:03.784: E/TiApplication(10959): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)\r\n04-04 14:09:03.784: E/TiApplication(10959): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)\r\n04-04 14:09:03.784: E/TiApplication(10959): at dalvik.system.NativeStart.main(Native Method)\r\n04-04 14:09:03.854: E/(134): Dumpstate > /data/log/dumpstate_app_error\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): FATAL EXCEPTION: main\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): java.util.ConcurrentModificationException\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at java.util.HashMap$EntryIterator.next(HashMap.java:833)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at java.util.HashMap$EntryIterator.next(HashMap.java:831)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at java.util.HashMap.constructorPutAll(HashMap.java:209)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at java.util.HashMap.(HashMap.java:200)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at org.appcelerator.kroll.KrollDict.(KrollDict.java:79)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at ti.modules.titanium.ui.TableViewProxy.fireEvent(TableViewProxy.java:156)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(TiViewProxy.java:818)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at ti.modules.titanium.ui.widget.tableview.TiTableView$1.onScrollStateChanged(TiTableView.java:306)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at android.widget.AbsListView.reportScrollStateChange(AbsListView.java:3253)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at android.widget.AbsListView$TwFlingRunnable.endFling(AbsListView.java:3323)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at android.widget.AbsListView$TwFlingRunnable.run(AbsListView.java:3392)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at android.os.Handler.handleCallback(Handler.java:587)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at android.os.Handler.dispatchMessage(Handler.java:92)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at android.os.Looper.loop(Looper.java:130)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at android.app.ActivityThread.main(ActivityThread.java:3691)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at java.lang.reflect.Method.invokeNative(Native Method)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at java.lang.reflect.Method.invoke(Method.java:507)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)\r\n04-04 14:09:03.854: E/AndroidRuntime(10959): at dalvik.system.NativeStart.main(Native Method)\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: TableView crashes with ConcurrentModificationException when firing scrollend event", "creator": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 3.1.0.v20130402175640\r\nAndroid 2.3\r\nAndroid 4.2", "comment": { "comments": [ { "id": "245768", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Another one from the same issue\n{code}\n04-04 08:36:19.564: W/System.err(8316): java.lang.NullPointerException\n04-04 08:36:19.564: W/System.err(8316): at ti.modules.titanium.ui.TableViewRowProxy.fireEvent(TableViewRowProxy.java:207)\n04-04 08:36:19.564: W/System.err(8316): at org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(TiViewProxy.java:818)\n04-04 08:36:19.564: W/System.err(8316): at org.appcelerator.kroll.KrollProxy.fireEventToParent(KrollProxy.java:715)\n04-04 08:36:19.564: W/System.err(8316): at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\n04-04 08:36:19.564: W/System.err(8316): at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:64)\n04-04 08:36:19.564: W/System.err(8316): at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:819)\n04-04 08:36:19.564: W/System.err(8316): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1043)\n04-04 08:36:19.564: W/System.err(8316): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:316)\n04-04 08:36:19.564: W/System.err(8316): at android.os.Handler.dispatchMessage(Handler.java:95)\n04-04 08:36:19.564: W/System.err(8316): at android.os.Looper.loop(Looper.java:130)\n04-04 08:36:19.564: W/System.err(8316): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)\n04-04 08:36:19.604: E/TiExceptionHandler(8316): (main) [202,6299] ----- Titanium Javascript Runtime Error -----\n04-04 08:36:19.604: E/TiExceptionHandler(8316): (main) [1,6300] - In ti:/events.js:94,20\n04-04 08:36:19.604: E/TiExceptionHandler(8316): (main) [0,6300] - Message: Uncaught Error: Java Exception occurred\n04-04 08:36:19.604: E/TiExceptionHandler(8316): (main) [0,6300] - Source: handled = this._fireEventToParent(type, data);\n04-04 08:36:19.644: E/V8Exception(8316): Exception occurred at ti:/events.js:94: Uncaught Error: Java Exception occurred\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-04T19:18:03.000+0000", "updated": "2013-04-04T19:18:03.000+0000" }, { "id": "245808", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The NPE reported above should be fixed by [PR#4078|https://github.com/appcelerator/titanium_mobile/pull/4078] and [3_1_X PR#4079|https://github.com/appcelerator/titanium_mobile/pull/4079]. \r\nRan the test case using the latest master and 3_1_X branch on Nexus 7 (4.1), Galaxy Nexus (4.0.4) and HTC Sensation 4G (2.3.4). Cannot reproduce the crash.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-04T21:47:34.000+0000", "updated": "2013-04-04T21:50:21.000+0000" }, { "id": "245998", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "This is not resolved. I tested with the build from 3.1.0.v20130404173046 and my app is crashing. You have to scroll to the bottom of the list and scroll fast and then scroll back up a few times. It will happen. \r\n\r\n3.1 will be unusable if this is not fixed. \r\n\r\nThe PR above fixes the ti:/events.js error but not the scrolling error. ", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-05T17:50:51.000+0000", "updated": "2013-04-05T17:50:51.000+0000" }, { "id": "246018", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Darren, I just used the build 3.1.0.v20130404173046 to test the test case attached in the ticket and it works fine without any crash. Can you post your test app, the crash log and on what device you tested? Thanks.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-05T19:11:13.000+0000", "updated": "2013-04-05T19:11:13.000+0000" }, { "id": "246023", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "Samsung-SGH-I927\r\nAndroid 2.3.5\r\n\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#ffffff'\r\n});\r\n\r\nvar tableData = [];\r\nvar x = 0;\r\nfor(var i = 0; i < 10; i++) {\r\n // Create 10 sections\r\n var section = Ti.UI.createTableViewSection({\r\n font: {\r\n fontSize: '14dp'\r\n },\r\n headerTitle: 'Pretty Section #' + (i+1),\r\n color: 'white'\r\n });\r\n // Create 10 rows and add them to the section\r\n for(var o = 0; o < 10; o++) {\r\n\r\n x++;\r\n var title = Ti.UI.createLabel({\r\n left: '70dp',\r\n top: '5dp',\r\n height: Ti.UI.SIZE,\r\n font: {\r\n fontSize: '18dp'\r\n },\r\n color: 'black',\r\n text: 'Row number is ' + (o+1)\r\n });\r\n var subtitle = Ti.UI.createLabel({\r\n left: '70dp',\r\n top: '30dp',\r\n height: Ti.UI.SIZE,\r\n font: {\r\n fontSize: '14dp'\r\n },\r\n color: 'black',\r\n text: 'Section is ' + (i+1)\r\n });\r\n var row = Ti.UI.createTableViewRow({\r\n height: '64dp',\r\n className: 'choppy_tableview'\r\n });\r\n \r\n row.add(title);\r\n row.add(subtitle);\r\n section.add(row);\r\n }\r\n tableData.push(section);\r\n}\r\n// Create the table view\r\nvar table = Ti.UI.createTableView({\r\n data: tableData\r\n});\r\n\r\ntable.addEventListener('click', function(){\r\n\t\r\n});\r\n\r\n\r\nwin.add(table);\r\n\r\nwin.open();\r\n\r\n\r\n\r\n04-05 14:41:56.594: W/dalvikvm(21111): threadid=1: thread exiting with uncaught exception (group=0x40192578)\r\n04-05 14:41:56.594: E/TiApplication(21111): (main) [5739,5739] Sending event: exception on thread: main msg:java.util.ConcurrentModificationException; Titanium 3.1.0,2013/04/04 17:31,d30814c\r\n04-05 14:41:56.594: E/TiApplication(21111): java.util.ConcurrentModificationException\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat java.util.HashMap$EntryIterator.next(HashMap.java:833)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat java.util.HashMap$EntryIterator.next(HashMap.java:831)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat java.util.HashMap.constructorPutAll(HashMap.java:209)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat java.util.HashMap.(HashMap.java:200)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat org.appcelerator.kroll.KrollDict.(KrollDict.java:79)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat ti.modules.titanium.ui.TableViewProxy.fireEvent(TableViewProxy.java:156)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(TiViewProxy.java:818)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat ti.modules.titanium.ui.widget.tableview.TiTableView$1.onScrollStateChanged(TiTableView.java:306)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat android.widget.AbsListView.reportScrollStateChange(AbsListView.java:3253)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat android.widget.AbsListView$TwFlingRunnable.endFling(AbsListView.java:3323)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat android.widget.AbsListView$TwFlingRunnable.run(AbsListView.java:3392)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat android.os.Handler.handleCallback(Handler.java:587)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat android.os.Handler.dispatchMessage(Handler.java:92)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat android.os.Looper.loop(Looper.java:130)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat android.app.ActivityThread.main(ActivityThread.java:3691)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)\r\n04-05 14:41:56.594: E/TiApplication(21111): \tat dalvik.system.NativeStart.main(Native Method)\r\n04-05 14:41:56.664: D/dalvikvm(21111): GC_CONCURRENT freed 1183K, 43% free 4441K/7751K, external 3648K/3818K, paused 3ms+5ms\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): FATAL EXCEPTION: main\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): java.util.ConcurrentModificationException\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat java.util.HashMap$EntryIterator.next(HashMap.java:833)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat java.util.HashMap$EntryIterator.next(HashMap.java:831)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat java.util.HashMap.constructorPutAll(HashMap.java:209)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat java.util.HashMap.(HashMap.java:200)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat org.appcelerator.kroll.KrollDict.(KrollDict.java:79)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat ti.modules.titanium.ui.TableViewProxy.fireEvent(TableViewProxy.java:156)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(TiViewProxy.java:818)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat ti.modules.titanium.ui.widget.tableview.TiTableView$1.onScrollStateChanged(TiTableView.java:306)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat android.widget.AbsListView.reportScrollStateChange(AbsListView.java:3253)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat android.widget.AbsListView$TwFlingRunnable.endFling(AbsListView.java:3323)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat android.widget.AbsListView$TwFlingRunnable.run(AbsListView.java:3392)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat android.os.Handler.handleCallback(Handler.java:587)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat android.os.Handler.dispatchMessage(Handler.java:92)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat android.os.Looper.loop(Looper.java:130)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat android.app.ActivityThread.main(ActivityThread.java:3691)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)\r\n04-05 14:41:56.684: E/AndroidRuntime(21111): \tat dalvik.system.NativeStart.main(Native Method)\r\n04-05 14:41:56.694: E/(134): Dumpstate > /data/log/dumpstate_app_error\r\n", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-05T19:41:29.000+0000", "updated": "2013-04-05T19:41:29.000+0000" }, { "id": "246024", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "I was able to reproduce this by scrolling up and down fast. This started happening after this commit I think\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/commit/830727f5d65bf596e811fbbaaf1198c2517d35cf\r\n", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-05T19:42:31.000+0000", "updated": "2013-04-05T19:42:31.000+0000" }, { "id": "246026", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "You can see that this line below is getting called multiple times and the HashMap is not locked or thread safe which appears to cause the exception\r\n\r\n04-05 14:41:56.594: E/TiApplication(21111): at ti.modules.titanium.ui.widget.tableview.TiTableView$1.onScrollStateChanged(TiTableView.java:306)", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-05T19:44:02.000+0000", "updated": "2013-04-05T19:44:02.000+0000" }, { "id": "246100", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The crash can be easily reproduced on Nexus 7 (4.1).\nPR: https://github.com/appcelerator/titanium_mobile/pull/4110\n3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4111", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-05T23:16:24.000+0000", "updated": "2013-04-05T23:16:24.000+0000" }, { "id": "246131", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Environment used for verification -\r\nTitanium SDK: 3.1.0.v20130405170202\r\nTitanium  Studio:3.1.0.201304011603\r\nDevice: Samsung GALAXY Note (2.3.6) and Nexus 7 Android 4.1", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-06T07:59:46.000+0000", "updated": "2013-04-06T07:59:46.000+0000" }, { "id": "246365", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "This still has not been resolved. I was able to reproduce this error with 3.1.0.v20130405170202 Device Samsung SGH (2.3.5).\r\n\r\nAs you can see from the stack trace below the build is from Friday.\r\n\r\n04-07 23:29:04.710: E/TiApplication(1797): (main) [17296,47643] Sending event: exception on thread: main msg:java.util.ConcurrentModificationException; Titanium 3.1.0,2013/04/05 17:02,93d78f5\r\n04-07 23:29:04.710: E/TiApplication(1797): java.util.ConcurrentModificationException\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat java.util.HashMap$EntryIterator.next(HashMap.java:833)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat java.util.HashMap$EntryIterator.next(HashMap.java:831)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat java.util.HashMap.constructorPutAll(HashMap.java:209)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat java.util.HashMap.(HashMap.java:200)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat org.appcelerator.kroll.KrollDict.(KrollDict.java:79)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat ti.modules.titanium.ui.widget.tableview.TiTableView$1.onScrollStateChanged(TiTableView.java:306)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat android.widget.AbsListView.reportScrollStateChange(AbsListView.java:3253)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat android.widget.AbsListView$TwFlingRunnable.endFling(AbsListView.java:3323)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat android.widget.AbsListView$TwFlingRunnable.run(AbsListView.java:3392)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat android.os.Handler.handleCallback(Handler.java:587)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat android.os.Handler.dispatchMessage(Handler.java:92)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat android.os.Looper.loop(Looper.java:130)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat android.app.ActivityThread.main(ActivityThread.java:3691)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)\r\n04-07 23:29:04.710: E/TiApplication(1797): \tat dalvik.system.NativeStart.main(Native Method)\r\n", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-08T04:28:50.000+0000", "updated": "2013-04-08T04:28:50.000+0000" }, { "id": "246366", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "You need to scroll up and down to reproduce this error. You might have to a scroll a bunch I can reproduce it every time.", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-08T04:40:06.000+0000", "updated": "2013-04-08T04:40:06.000+0000" }, { "id": "246375", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still could not reproduce with following env. and devices(scrolled up and down around a dozen times)\nSDK: 3.1.0.v20130405170202\nStudio:3.1.0.201304011603\nCLI ver - 3.1.0\nDevice: Samsung GALAXY Note (2.3.6),Nexus 7 Android 4.1,Samsung Galaxy Nexus Android 4.0.2 and HTC Desire V Android 4.0.3.\n@Darren - If you could please specify the device on which you are able to reproduce the bug.", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-08T06:34:44.000+0000", "updated": "2013-04-08T06:34:44.000+0000" }, { "id": "246402", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "Shyam I am using Samsung-SGH-I927 (2.3.5) AT&T.\r\n\r\nEvery app I have crashes on the table view now. Makes 3.1 unusable if this is not fixed.\r\n\r\n04-08 08:57:20.110: E/TiApplication(7877): (main) [38305,118770] Sending event: exception on thread: main msg:java.util.ConcurrentModificationException; Titanium 3.1.0,2013/04/05 17:02,93d78f5\r\n04-08 08:57:20.110: E/TiApplication(7877): java.util.ConcurrentModificationException\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat java.util.HashMap$EntryIterator.next(HashMap.java:833)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat java.util.HashMap$EntryIterator.next(HashMap.java:831)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat java.util.HashMap.constructorPutAll(HashMap.java:209)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat java.util.HashMap.(HashMap.java:200)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat org.appcelerator.kroll.KrollDict.(KrollDict.java:79)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat ti.modules.titanium.ui.widget.tableview.TiTableView$1.onScrollStateChanged(TiTableView.java:306)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat android.widget.AbsListView.reportScrollStateChange(AbsListView.java:3253)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat android.widget.AbsListView$TwFlingRunnable.endFling(AbsListView.java:3323)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat android.widget.AbsListView$TwFlingRunnable.run(AbsListView.java:3392)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat android.os.Handler.handleCallback(Handler.java:587)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat android.os.Handler.dispatchMessage(Handler.java:92)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat android.os.Looper.loop(Looper.java:130)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat android.app.ActivityThread.main(ActivityThread.java:3691)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)\r\n04-08 08:57:20.110: E/TiApplication(7877): \tat dalvik.system.NativeStart.main(Native Method)\r\n", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-08T13:58:17.000+0000", "updated": "2013-04-08T13:58:17.000+0000" }, { "id": "246415", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "The latest kitchen sink from github crashes after just a few scrolls in the first list", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-08T16:05:12.000+0000", "updated": "2013-04-08T16:05:12.000+0000" }, { "id": "246437", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~vduggal] Believes he knows what is going on.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-08T17:18:35.000+0000", "updated": "2013-04-08T17:18:35.000+0000" }, { "id": "246459", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/4122\nhttps://github.com/appcelerator/titanium_mobile/pull/4123", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-08T18:53:30.000+0000", "updated": "2013-04-08T18:53:30.000+0000" }, { "id": "246462", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "Vishal how is your change different than before? ", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-08T18:59:05.000+0000", "updated": "2013-04-08T18:59:05.000+0000" }, { "id": "246482", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "We can not reproduce the error you are seeing. I am basically working off the theory that the first event gets the message onto the runtime thread, the runtime thread is paused for the UI thread where we are trying to fire the second event and it is trying to create a new dictionary for the second event and hence the ConcurrentModificationException.\n\nMy PR basically creates a copy of the dictionary before firing off the event so the above scenario will not occur.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-08T20:17:45.000+0000", "updated": "2013-04-08T20:17:45.000+0000" }, { "id": "246485", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "Why are there 2 scroll end events being fired?", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-08T20:21:42.000+0000", "updated": "2013-04-08T20:21:42.000+0000" }, { "id": "246488", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "scrollend and scrollEnd(deprecated but still supported)", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-08T20:27:26.000+0000", "updated": "2013-04-08T20:27:26.000+0000" }, { "id": "246489", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "ok I will test as soon as it makes it to the continuous builds", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-08T20:36:13.000+0000", "updated": "2013-04-08T20:36:13.000+0000" }, { "id": "246491", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Merged the PR, and resolving for now. Please test this and reopen if you are still seeing the error.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-08T20:38:08.000+0000", "updated": "2013-04-08T20:38:08.000+0000" }, { "id": "246506", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "Appears to have been fixed! Thanks!", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-08T21:31:01.000+0000", "updated": "2013-04-08T21:31:01.000+0000" }, { "id": "246591", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "App is running fine as TableView doesn't crashes.\n\nVerified on:\nSDK: 3.1.0.v20130408154547\nCLI version : 3.1.0-cr\nOS : MAC OSX 10.7.5\nAppcelerator Studio, build: 3.1.0.201304052347\nXCode : 4.5.1", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-04-09T06:11:15.000+0000", "updated": "2013-04-09T06:11:15.000+0000" } ], "maxResults": 24, "total": 24, "startAt": 0 } } }