Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7774] Android: TableView - v8 only - 4.0 ICS - Scrolling through tableview and clicking on the rows eventually crashes the application

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-28T16:56:43.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sSprint 2012-05, Release 2.0.0, Release 1.8.3
ComponentsAndroid
Labelsqe-and021312, regression, release-note-2.0.0
ReporterNatalie Huynh
AssigneeJosh Roesslein
Created2012-02-22T13:50:23.000+0000
Updated2012-04-02T20:02:34.000+0000

Description

Steps to Reproduce: 1. KS > Base UI > Views > Table Views > Table View (Layout 2) 2. Dismiss the keyboard 3. Scroll up and down and randomly click on different areas of the row Actual: The application eventually crashes Expected: Should not crash Note: Does not crash on Nexus S (2.3.6)

Attachments

FileDateSize
CrashStack.txt2012-02-22T13:50:23.000+00008203
CrashStack2.txt2012-02-24T15:08:07.000+00007977

Comments

  1. Josh Roesslein 2012-02-23

    Unable to reproduce on emulator, HTC Desire (2.2), Xoom (4.0.3), and HTC EVO 4g (2.3.3). This may only occur on the Galaxy Nexus (4.0.2).
  2. Wilson Luu 2012-02-24

    I got a similar crash on: SDK build: 1.8.2.v20120223174636 Runtime: V8 Device: LG Slate (3.1) Steps to reproduce: 1. Go to KS > Base UI > Vertical Layout > Table View 2. Quickly tap on a block of text See CrashStack2.txt
  3. Josh Roesslein 2012-02-27

    The fix for TIMOB-7676 appears to be causing this regression.
  4. Bill Dawson 2012-02-27

    So you could re-create? I've been pounding away on my G-Slate like crazy in this KS test, up and down, up and down, really fast, and clicking all over the place until there aren't any rows left to click on. Never crashes. 1_8_X, specifically 59b3a9006 (last commit = Feb 23rd).
  5. Jick Steen 2012-02-28

    I'm also able to reproduce it with "1.8.2.v20120221114636" on a Galaxy Nexus.
  6. Markus Krug 2012-02-29

    Can you guess how long it approx. takes to fix this issue?
  7. Neeraj Gupta 2012-03-01

    We will have this fix available in next few days.
  8. Josh Roesslein 2012-03-01

    [Pull request #1549](https://github.com/appcelerator/titanium_mobile/pull/1549) up for review.
  9. Marshall Culpepper 2012-03-07

    I saw another instance of this when testing Ping's fix for TIMOB-7008 (the first test case in this issue). It only happened to me a handful of times, so it doesn't seem as easy to replicate, but long-pressing the red row in this test will sometimes cause this ConcurrentModificationException:
       E/TiApplication( 2074): (main) [9593,9593] Sending event: exception on thread: main msg:java.util.ConcurrentModificationException; Titanium 2.0.0,2012/03/05 17:42,ef24e78
       E/TiApplication( 2074): java.util.ConcurrentModificationException
       E/TiApplication( 2074):   at java.util.HashMap$HashIterator.nextEntry(HashMap.java:792)
       E/TiApplication( 2074):   at java.util.HashMap$EntryIterator.next(HashMap.java:829)
       E/TiApplication( 2074):   at java.util.HashMap$EntryIterator.next(HashMap.java:827)
       E/TiApplication( 2074):   at java.util.HashMap.constructorPutAll(HashMap.java:205)
       E/TiApplication( 2074):   at java.util.HashMap.<init>(HashMap.java:196)
       E/TiApplication( 2074):   at org.appcelerator.kroll.KrollDict.<init>(KrollDict.java:60)
       E/TiApplication( 2074):   at ti.modules.titanium.ui.TableViewRowProxy.fireEvent(TableViewRowProxy.java:183)
       E/TiApplication( 2074):   at org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(TiViewProxy.java:735)
       E/TiApplication( 2074):   at org.appcelerator.titanium.view.TiUIView$5.onLongClick(TiUIView.java:1075)
       E/TiApplication( 2074):   at android.view.View.performLongClick(View.java:3498)
       E/TiApplication( 2074):   at android.view.View$CheckForLongPress.run(View.java:13961)
       E/TiApplication( 2074):   at android.os.Handler.handleCallback(Handler.java:605)
       E/TiApplication( 2074):   at android.os.Handler.dispatchMessage(Handler.java:92)
       E/TiApplication( 2074):   at android.os.Looper.loop(Looper.java:137)
       E/TiApplication( 2074):   at android.app.ActivityThread.main(ActivityThread.java:4340)
       E/TiApplication( 2074):   at java.lang.reflect.Method.invokeNative(Native Method)
       E/TiApplication( 2074):   at java.lang.reflect.Method.invoke(Method.java:511)
       E/TiApplication( 2074):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
       E/TiApplication( 2074):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
       E/TiApplication( 2074):   at dalvik.system.NativeStart.main(Native Method)
       
    The culprit seems to be that we're not copying the KrollDict for bubbled events, which rarely causes two threads to iterate the KrollDict at the same time: https://github.com/pingwang2011/titanium_mobile/blob/af9d729e167b8ee223ad021bcd7510947c551e79/android/titanium/src/java/org/appcelerator/titanium/proxy/TiViewProxy.java#L735
  10. Marshall Culpepper 2012-03-08

JSON Source