Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1544] Android: Problems pausing/resuming app: ConcurrentModificationException

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:56:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M01
ComponentsAndroid
Labelsandroid, defect
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T02:55:40.000+0000
Updated2011-04-17T01:56:28.000+0000

Description

See also helpdesk ticket 35861. Appears to be concurrency problem in TiContext's lifecycleListeners list. Relevant portion of trace:

E/TiUncaughtHandler( 2291): (main) [11,1437] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to pause activity {com.xxxx.XxxxMobile/com.xxxx.XxxxMobile.GetxxxxActivity}: java.util.ConcurrentModificationException
E/TiUncaughtHandler( 2291): java.lang.RuntimeException: Unable to pause activity {com.xxxx.XxxxMobile/com.xxxx.XxxxMobile.GetxxxxActivity}: java.util.ConcurrentModificationException
E/TiUncaughtHandler( 2291):     at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3567)
E/TiUncaughtHandler( 2291):     at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3524)
E/TiUncaughtHandler( 2291):     at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3507)
E/TiUncaughtHandler( 2291):     at android.app.ActivityThread.access$2500(ActivityThread.java:135)
E/TiUncaughtHandler( 2291):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2143)
E/TiUncaughtHandler( 2291):     at android.os.Handler.dispatchMessage(Handler.java:99)
E/TiUncaughtHandler( 2291):     at android.os.Looper.loop(Looper.java:144)
E/TiUncaughtHandler( 2291):     at android.app.ActivityThread.main(ActivityThread.java:4937)
E/TiUncaughtHandler( 2291):     at java.lang.reflect.Method.invokeNative(Native Method)
E/TiUncaughtHandler( 2291):     at java.lang.reflect.Method.invoke(Method.java:521)
E/TiUncaughtHandler( 2291):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/TiUncaughtHandler( 2291):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/TiUncaughtHandler( 2291):     at dalvik.system.NativeStart.main(Native Method)
E/TiUncaughtHandler( 2291): Caused by: java.util.ConcurrentModificationException
E/TiUncaughtHandler( 2291):     at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:573)

Comments

  1. Jeff Haynie 2011-04-15

    (from [dcf2e8e31524d85c8a75045b31bcd30262304ccf]) [#1544 state:open] Try to avoid concurrency problem with lifecycleListener list by synchronizing. http://github.com/appcelerator/titanium_mobile/commit/dcf2e8e31524d85c8a75045b31bcd30262304ccf"> http://github.com/appcelerator/titanium_mobile/commit/dcf2e8e31524d...

  2. Marshall Culpepper 2011-04-15

    Bump, checking to see if we can mark this as fixed?

  3. Bill Dawson 2011-04-15

    Closing as resolved because ...

    a) We couldn't reproduce it at will here;
    b) I modified lifecycleListeners (made it a synchronized list) to help avoid concurrency issues;
    c) The bigger underlying problem was conquered in #1545.

JSON Source