ConcurrentModificationException
See original GitHub issue- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
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.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
ConcurrentModificationException (Java Platform SE 7 )
This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible.
Read more >Avoiding the ConcurrentModificationException in Java
A short insight in Java's ConcurrentModificationException, why it happens and how to avoid it.
Read more >How to Avoid the Concurrent Modification Exception in Java
The ConcurrentModificationException is a very common exception in Java that occurs usually while working with Collections.
Read more >How to avoid "ConcurrentModificationException" while ...
Of course, I get a ConcurrentModificationException when trying to remove items from the list at the same time when iterating myArrayList .
Read more >java.util.ConcurrentModificationException - DigitalOcean
java.util.ConcurrentModificationException is a very common exception when working with Java collection classes. Java Collection classes are fail ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A nice way to get rid of bugs without fixing them. As nobody has mentioned a fix in the next RN version, it probably does not exist.
Testing with the new RN is not currently possible as it has compatibility issues with my dependencies (or for some other reason does not work at all).
Getting this on android only:
All bugs related to this end up getting closed with no without a solution!!!