Skip to content

ConcurrentModificationException #20272

Closed
Closed
@tapz

Description

Environment

Environment:
OS: macOS High Sierra 10.13.5
Node: 8.11.3
Yarn: 1.7.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: 3.1 AI-173.4697961

Packages: (wanted => installed)
react: 16.4.1 => 16.4.1
react-native: 0.55.4 => 0.55.4

Description

Caused by java.util.ConcurrentModificationException
       at android.support.v4.util.SimpleArrayMap.put(SimpleArrayMap.java:461)
       at android.support.v7.widget.AppCompatDrawableManager.addDelegate(AppCompatDrawableManager.java:493)
       at android.support.v7.widget.AppCompatDrawableManager.installDefaultInflateDelegates(AppCompatDrawableManager.java:97)
       at android.support.v7.widget.AppCompatDrawableManager.get(AppCompatDrawableManager.java:86)
       at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
       at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:75)
       at android.support.v7.widget.SwitchCompat.<init>(SwitchCompat.java:223)
       at android.support.v7.widget.SwitchCompat.<init>(SwitchCompat.java:200)
       at android.support.v7.widget.SwitchCompat.<init>(SwitchCompat.java:189)
       at com.facebook.react.views.switchview.ReactSwitch.<init>(ReactSwitch.java:23)
       at com.facebook.react.views.switchview.ReactSwitchManager.createViewInstance(ReactSwitchManager.java:118)
       at com.facebook.react.views.switchview.ReactSwitchManager.createViewInstance(ReactSwitchManager.java:31)
       at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:42)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:223)
       at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:152)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1012)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:983)
       at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
       at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:134)
       at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:105)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:909)
       at android.view.Choreographer.doCallbacks(Choreographer.java:686)
       at android.view.Choreographer.doFrame(Choreographer.java:619)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:7325)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Reproducible Demo

No idea how to reproduce as occurs randomly in release builds. The stack trace is from Crashlytics. Seems to be related on how React Native updates the UI. Our code does not have much control over the native screen updating and as JavaScript is single threaded, there isn't much we can do about concurrency.

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions