Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException #20272

Closed
3 tasks done
tapz opened this issue Jul 18, 2018 · 5 comments
Closed
3 tasks done

ConcurrentModificationException #20272

tapz opened this issue Jul 18, 2018 · 5 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@tapz
Copy link

tapz commented Jul 18, 2018

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.

@seanadkinson
Copy link

Seeing this in our bugsnag as well. Same stacktrace. Obviously seems to be related to rendering a Switch, based on the stacktrace.

@react-native-bot
Copy link
Collaborator

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Aug 12, 2018
@tapz
Copy link
Author

tapz commented Aug 13, 2018

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).

@syntax-e
Copy link

syntax-e commented Dec 18, 2018

We're seeing this occasionally in our app's production crash reports as well. So far it has only shown up on 3 devices, all running Android 6.0.x. Unable to find deterministic repro steps.

com.facebook.react.views.switchview.ReactSwitch.<init>
ReactSwitch.java, line 25
java.util.ConcurrentModificationException: java.util.ConcurrentModificationException
Environment:
  OS: macOS 10.14.1
  Node: 10.9.0
  Yarn: 1.9.4
  npm: 6.4.1
  Watchman: 4.9.0
  Xcode: Xcode 10.1 Build version 10B61
  Android Studio: 3.2 AI-181.5540.7.32.5056338

Packages: (wanted => installed)
  react: 16.0.0 => 16.0.0
  react-native: ^0.51.0 => 0.51.1

@arled
Copy link

arled commented Mar 26, 2019

Getting this on android only:

    "react": "16.4.1",
    "react-native": "0.56.0",

All bugs related to this end up getting closed with no without a solution!!!

@facebook facebook locked as resolved and limited conversation to collaborators Aug 12, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants