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

ReactSlider crash on Android release version #9979

Closed
lukefanning opened this issue Sep 19, 2016 · 45 comments
Closed

ReactSlider crash on Android release version #9979

lukefanning opened this issue Sep 19, 2016 · 45 comments
Labels
Bug Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@lukefanning
Copy link

lukefanning commented Sep 19, 2016

Issue Description

Hard crash randomly and unexpectedly on Android release version only (debug is fine, iOS is fine on both debug and release) when hiding and displaying sliders based on a state variable.

Steps to Reproduce / Code Snippets

We have a number of photo filters in our app which are selected by <TouchableOpacity> components and some have a slider to adjust the blur or brightness etc. These sliders are completely separate from each other and are displayed based on a string stored in the components state called filter.

Here is one such slider from render():

{filter === 'gamify' && ( <View style={styles.filterSlider}> <Text>How retro do you want to go?</Text> <Slider value={this.state.pixelSize} minimumValue={1} maximumValue={5} onValueChange={value => this.setState({pixelSize: value})} /> </View>)}

Expected Results

No crash when hiding and displaying sliders

Stack Trace

java.lang.NullPointerException: Attempt to write to field 'java.util.ArrayList android.animation.AnimatorSet$Node.nodeDependents' on a null object reference

http://pastebin.com/270Wg6Pu

Additional Information

  • React Native version: 0.33
  • Platform(s) (iOS, Android, or both?): Android (Release only)
  • Operating System (macOS, Linux, or Windows?): Mac OSX
@rusel1989
Copy link

Still crashes once in while in 0.40.0

@timxyz
Copy link

timxyz commented Jan 13, 2017

I've been getting the same crash in AnimatorSet with a button created in a custom Android ViewManager, since at least 0.33. The crash is very rare relative to the number of times the view manager in question creates buttons, and happens in both release and debug on Android only.

The line in question is:

Button button = new Button(context);

(There is also an identical line in the shadow node which causes identical issues)

I can pretty much guarantee the crash occurring by wrapping the line above in a loop. I didn't look into it deeply, but the nature of the problem and analysis of the code in AnimatorSet suggested it might be a threading issue. Sure enough, wrapping the line of code above in a block synchronized on something available to both the ViewManager and ShadowNode (e.g. the React context) eradicates the issue, although I assume the crash will still happen if code I don't have control over also creates / inflates Buttons concurrently with mine. The line has to be synchronized in both the ViewManager and the ShadowNode.

Hopefully that narrows down the issue with the Slider and can help identify the root cause.

@jasongrishkoff
Copy link

+1 on this issue with ReactSlider on 0.40.0. Log below.

android.content.res.Resources$NotFoundException: Drawable android:drawable/seekbar_thumb_material_anim with resource ID #0x108067c
Caused by: java.lang.NullPointerException: Attempt to read from field 'android.animation.Animator android.animation.AnimatorSet$Node.mAnimation' on a null object reference
	at android.animation.AnimatorSet.clone(AnimatorSet.java:725)
	at android.animation.AnimatorSet.clone(AnimatorSet.java:682)
	at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:589)
	at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:588)
	at android.content.res.ConstantState.newInstance(ConstantState.java:53)
	at android.content.res.ConstantState.newInstance(ConstantState.java:61)
	at android.content.res.ConfigurationBoundResourceCache.getInstance(ConfigurationBoundResourceCache.java:40)
	at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:114)
	at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance(AnimatedVectorDrawable.java:808)
	at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators(AnimatedVectorDrawable.java:784)
	at android.graphics.drawable.AnimatedVectorDrawable.applyTheme(AnimatedVectorDrawable.java:613)
	at android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme(DrawableContainer.java:953)
	at android.graphics.drawable.DrawableContainer.applyTheme(DrawableContainer.java:612)
	at android.graphics.drawable.StateListDrawable.applyTheme(StateListDrawable.java:371)
	at android.graphics.drawable.AnimatedStateListDrawable.applyTheme(AnimatedStateListDrawable.java:392)
	at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:580)
	at android.content.res.Resources.loadDrawable(Resources.java:858)
	at android.content.res.TypedArray.getDrawable(TypedArray.java:928)
	at android.widget.AbsSeekBar.<init>(AbsSeekBar.java:99)
	at android.widget.SeekBar.<init>(SeekBar.java:85)
	at android.widget.SeekBar.<init>(SeekBar.java:81)
	at com.facebook.react.views.slider.ReactSlider.<init>(ReactSlider.java:56)
	at com.facebook.react.views.slider.ReactSliderManager.createViewInstance(ReactSliderManager.java:118)
	at com.facebook.react.views.slider.ReactSliderManager.createViewInstance(ReactSliderManager.java:36)
	at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:46)
	at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:218)
	at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:148)
	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:890)
	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:863)
	at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
	at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:872)
	at android.view.Choreographer.doCallbacks(Choreographer.java:686)
	at android.view.Choreographer.doFrame(Choreographer.java:618)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6119)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

@bourgois
Copy link

+1 RN 0.40.0

Android: 6.0.1
Android Build: MMB29M.N910FXXS1DPC2
Manufacturer: samsung
Model: SM-N910F
Thread: main-1
Start Date: Sat Jan 28 08:57:05 GMT+01:00 2017

java.lang.NullPointerException: Attempt to write to field 'java.util.ArrayList android.animation.AnimatorSet$Node.nodeDependents' on a null object reference
	at android.animation.AnimatorSet.clone(AnimatorSet.java:700)
	at android.animation.AnimatorSet.clone(AnimatorSet.java:51)
	at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:562)
	at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:543)
	at android.content.res.ConstantState.newInstance(ConstantState.java:51)
	at android.content.res.ConstantState.newInstance(ConstantState.java:59)
	at android.content.res.ConfigurationBoundResourceCache.getInstance(ConfigurationBoundResourceCache.java:48)
	at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:111)
	at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance(AnimatedVectorDrawable.java:567)
	at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators(AnimatedVectorDrawable.java:545)
	at android.graphics.drawable.AnimatedVectorDrawable.applyTheme(AnimatedVectorDrawable.java:377)
	at android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme(DrawableContainer.java:865)
	at android.graphics.drawable.DrawableContainer.applyTheme(DrawableContainer.java:577)
	at android.graphics.drawable.StateListDrawable.applyTheme(StateListDrawable.java:370)
	at android.graphics.drawable.AnimatedStateListDrawable.applyTheme(AnimatedStateListDrawable.java:391)
	at android.content.res.Resources.loadDrawable(Resources.java:4094)
	at android.content.res.Resources.loadDrawable(Resources.java:3935)
	at android.content.res.TypedArray.getDrawable(TypedArray.java:886)
	at android.content.res.XResources$XTypedArray.getDrawable(XResources.java:1372)
	at android.widget.AbsSeekBar.<init>(AbsSeekBar.java:189)
	at android.widget.SeekBar.<init>(SeekBar.java:85)
	at android.widget.SeekBar.<init>(SeekBar.java:81)
	at com.facebook.react.views.slider.ReactSlider.<init>(ReactSlider.java:56)
	at com.facebook.react.views.slider.ReactSliderManager.createViewInstance(ReactSliderManager.java:118)
	at com.facebook.react.views.slider.ReactSliderManager.createViewInstance(ReactSliderManager.java:36)
	at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:46)
	at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:218)
	at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:148)
	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:890)
	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:863)
	at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
	at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:918)
	at android.view.Choreographer.doCallbacks(Choreographer.java:695)
	at android.view.Choreographer.doFrame(Choreographer.java:628)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:158)
	at android.app.ActivityThread.main(ActivityThread.java:7225)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)

@em222iv
Copy link

em222iv commented Feb 20, 2017

+1 RN0.39 also on Samsung devices! Any news on this?

@bourgois
Copy link

Still get the issue from time to time. Now I am on RN 0.41.2

@einvalentin
Copy link

We are also seeing this crash in production for example on a Galaxy S7 with Android 6.0 (RN 0.42.0)

java.lang.NullPointerException: Attempt to write to field 'java.util.ArrayList android.animation.AnimatorSet$Node.nodeDependents' on a null object reference
	at android.animation.AnimatorSet.clone(AnimatorSet.java:700)
	at android.animation.AnimatorSet.clone(AnimatorSet.java:51)
	at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:562)
	at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:543)
	at android.content.res.ConstantState.newInstance(ConstantState.java:51)
	at android.content.res.ConstantState.newInstance(ConstantState.java:59)
	at android.content.res.ConfigurationBoundResourceCache.getInstance(ConfigurationBoundResourceCache.java:48)
	at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:111)
	at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance(AnimatedVectorDrawable.java:567)
	at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators(AnimatedVectorDrawable.java:545)
	at android.graphics.drawable.AnimatedVectorDrawable.applyTheme(AnimatedVectorDrawable.java:377)
	at android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme(DrawableContainer.java:865)
	at android.graphics.drawable.DrawableContainer.applyTheme(DrawableContainer.java:577)
	at android.graphics.drawable.StateListDrawable.applyTheme(StateListDrawable.java:370)
	at android.graphics.drawable.AnimatedStateListDrawable.applyTheme(AnimatedStateListDrawable.java:391)
	at android.content.res.Resources.loadDrawable(Resources.java:4098)
	at android.content.res.Resources.loadDrawable(Resources.java:3939)
	at android.content.res.TypedArray.getDrawable(TypedArray.java:886)
	at android.widget.AbsSeekBar.<init>(AbsSeekBar.java:189)
	at android.widget.SeekBar.<init>(SeekBar.java:85)
	at android.widget.SeekBar.<init>(SeekBar.java:81)
	at com.facebook.react.views.slider.ReactSlider.<init>(ReactSlider.java:56)
	at com.facebook.react.views.slider.ReactSliderManager.createViewInstance(ReactSliderManager.java:124)
	at com.facebook.react.views.slider.ReactSliderManager.createViewInstance(ReactSliderManager.java:42)
	at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:46)
	at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:218)
	at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:149)
	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:892)
	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:865)
	at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
	at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:918)
	at android.view.Choreographer.doCallbacks(Choreographer.java:695)
	at android.view.Choreographer.doFrame(Choreographer.java:628)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:158)
	at android.app.ActivityThread.main(ActivityThread.java:7229)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

@pmdida
Copy link

pmdida commented Apr 20, 2017

+1 RN 0.43

@Aleksion
Copy link

+1 FN 0.43
Samsung Galaxy S7

@dnish
Copy link

dnish commented May 23, 2017

+1 RN 0.43.4 Android 7.0

java.lang.NullPointerException Attempt to read from field 'android.animation.Animator android.animation.AnimatorSet$Node.mAnimation' on a null object reference 
    AnimatorSet.java:725 android.animation.AnimatorSet.clone
    AnimatorSet.java:682 android.animation.AnimatorSet.clone
    Animator.java:589 android.animation.Animator$AnimatorConstantState.newInstance
    Animator.java:588 android.animation.Animator$AnimatorConstantState.newInstance
    ConstantState.java:53 android.content.res.ConstantState.newInstance
    ConstantState.java:61 android.content.res.ConstantState.newInstance
    AnimatorInflater.java:136 android.animation.AnimatorInflater.loadAnimator
    AnimatedVectorDrawable.java:641 android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance
    AnimatedVectorDrawable.java:619 android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators
    AnimatedVectorDrawable.java:451 android.graphics.drawable.AnimatedVectorDrawable.applyTheme
    DrawableContainer.java:949 android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme
    DrawableContainer.java:611 android.graphics.drawable.DrawableContainer.applyTheme
    StateListDrawable.java:371 android.graphics.drawable.StateListDrawable.applyTheme
    AnimatedStateListDrawable.java:392 android.graphics.drawable.AnimatedStateListDrawable.applyTheme
    ResourcesImpl.java:630 android.content.res.ResourcesImpl.loadDrawable
    Resources.java:1727 android.content.res.Resources.loadDrawable
    TypedArray.java:945 android.content.res.TypedArray.getDrawable
    AbsSeekBar.java:212 android.widget.AbsSeekBar.<init>
    SeekBar.java:85 android.widget.SeekBar.<init>
    SeekBar.java:81 android.widget.SeekBar.<init>
    ReactSlider.java:56 com.facebook.react.views.slider.ReactSlider.<init>
    ReactSliderManager.java:124 com.facebook.react.views.slider.ReactSliderManager.createViewInstance
    ReactSliderManager.java:42 com.facebook.react.views.slider.ReactSliderManager.createViewInstance
    ViewManager.java:46 com.facebook.react.uimanager.ViewManager.createView
    NativeViewHierarchyManager.java:218 com.facebook.react.uimanager.NativeViewHierarchyManager.createView
    UIViewOperationQueue.java:152 com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute
    UIViewOperationQueue.java:912 com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations
    UIViewOperationQueue.java:884 com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded
    GuardedFrameCallback.java:31 com.facebook.react.uimanager.GuardedFrameCallback.doFrame
    ReactChoreographer.java:129 com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame
    ChoreographerCompat.java:107 com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame
    Choreographer.java:925 android.view.Choreographer$CallbackRecord.run
    Choreographer.java:702 android.view.Choreographer.doCallbacks
    Choreographer.java:635 android.view.Choreographer.doFrame
    Choreographer.java:913 android.view.Choreographer$FrameDisplayEventReceiver.run
    Handler.java:751 android.os.Handler.handleCallback
    Handler.java:95 android.os.Handler.dispatchMessage
    Looper.java:154 android.os.Looper.loop
    ActivityThread.java:6682 android.app.ActivityThread.main
    Method.java:-2 java.lang.reflect.Method.invoke
    ZygoteInit.java:1520 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
    ZygoteInit.java:1410 com.android.internal.os.ZygoteInit.main

We're hiding the slider when the user clicks on "Finish".

@renanpupin
Copy link

+1
NullPointerException: Attempt to read from field 'android.animation.Animator android.animation.AnimatorSet$Node.mAnimation' on a null object reference

@lz-jony
Copy link

lz-jony commented Jul 5, 2017

+1 RN 0.43
Samsung Galaxy S6 Android 6.0.1

@xwartz
Copy link

xwartz commented Jul 12, 2017

+1 RN 0.37.0

@fstutz
Copy link

fstutz commented Jul 26, 2017

+1 RN 0.44
Samsung Galaxy S7 Android 7.0

android.content.res.Resources$NotFoundException: Drawable android:drawable/seekbar_thumb_material_anim with resource ID #0x1080751

java.lang.NullPointerException: Attempt to read from field 'android.animation.Animator android.animation.AnimatorSet$Node.mAnimation' on a null object reference
       at android.animation.AnimatorSet.clone(AnimatorSet.java:725)
       at android.animation.AnimatorSet.clone(AnimatorSet.java:682)
       at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:589)
       at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:588)
       at android.content.res.ConstantState.newInstance(ConstantState.java:53)
       at android.content.res.ConstantState.newInstance(ConstantState.java:61)
       at android.content.res.ConfigurationBoundResourceCache.getInstance(ConfigurationBoundResourceCache.java:40)
       at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:114)
       at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance(AnimatedVectorDrawable.java:641)
       at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators(AnimatedVectorDrawable.java:619)
       at android.graphics.drawable.AnimatedVectorDrawable.applyTheme(AnimatedVectorDrawable.java:451)
       at android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme(DrawableContainer.java:949)
       at android.graphics.drawable.DrawableContainer.applyTheme(DrawableContainer.java:611)
       at android.graphics.drawable.StateListDrawable.applyTheme(StateListDrawable.java:371)
       at android.graphics.drawable.AnimatedStateListDrawable.applyTheme(AnimatedStateListDrawable.java:392)
       at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:630)
       at android.content.res.Resources.loadDrawable(Resources.java:1727)
       at android.content.res.TypedArray.getDrawable(TypedArray.java:945)
       at android.widget.AbsSeekBar.<init>(AbsSeekBar.java:212)
       at android.widget.SeekBar.<init>(SeekBar.java:85)
       at android.widget.SeekBar.<init>(SeekBar.java:81)
       at com.facebook.react.views.slider.ReactSlider.<init>(ReactSlider.java:56)
       at com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode.measure(ReactSliderManager.java:67)
       at com.facebook.yoga.YogaNode.measure(YogaNode.java:722)
       at com.facebook.yoga.YogaNode.jni_YGNodeCalculateLayout(YogaNode.java)
       at com.facebook.yoga.YogaNode.calculateLayout(YogaNode.java:198)
       at com.facebook.react.uimanager.ReactShadowNode.calculateLayout(ReactShadowNode.java:371)
       at com.facebook.react.uimanager.UIImplementation.calculateRootLayout(UIImplementation.java:781)
       at com.facebook.react.uimanager.UIImplementation.updateViewHierarchy(UIImplementation.java:550)
       at com.facebook.react.uimanager.UIImplementation.dispatchViewUpdates(UIImplementation.java:539)
       at com.facebook.react.uimanager.UIManagerModule.onBatchComplete(UIManagerModule.java:523)
       at com.facebook.react.cxxbridge.NativeModuleRegistry.onBatchComplete(NativeModuleRegistry.java:103)
       at com.facebook.react.cxxbridge.CatalystInstanceImpl$BridgeCallback.onBatchComplete(CatalystInstanceImpl.java:154)
       at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
       at android.os.Handler.handleCallback(Handler.java:751)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
       at android.os.Looper.loop(Looper.java:154)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:208)
       at java.lang.Thread.run(Thread.java:762)

@juanamd
Copy link

juanamd commented Aug 3, 2017

Same here: 8 issues, all on Samsung devices, api level 23:

Exception java.lang.NullPointerException: Attempt to write to field 'java.util.ArrayList android.animation.AnimatorSet$Node.dependencies' on a null object reference android.animation.AnimatorSet.clone (AnimatorSet.java:690) android.animation.AnimatorSet.clone (AnimatorSet.java:51) android.animation.Animator$AnimatorConstantState.newInstance (Animator.java:562) android.animation.Animator$AnimatorConstantState.newInstance (Animator.java:543) android.content.res.ConstantState.newInstance (ConstantState.java:51) android.content.res.ConstantState.newInstance (ConstantState.java:59) android.content.res.ConfigurationBoundResourceCache.getInstance (ConfigurationBoundResourceCache.java:48) android.animation.AnimatorInflater.loadAnimator (AnimatorInflater.java:111) android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance (AnimatedVectorDrawable.java:567) android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators (AnimatedVectorDrawable.java:545) android.graphics.drawable.AnimatedVectorDrawable.applyTheme (AnimatedVectorDrawable.java:377) android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme (DrawableContainer.java:865) android.graphics.drawable.DrawableContainer.applyTheme (DrawableContainer.java:577) android.graphics.drawable.StateListDrawable.applyTheme (StateListDrawable.java:370) android.graphics.drawable.AnimatedStateListDrawable.applyTheme (AnimatedStateListDrawable.java:391) android.content.res.Resources.loadDrawable (Resources.java:4094) android.content.res.Resources.loadDrawable (Resources.java:3935) android.content.res.TypedArray.getDrawable (TypedArray.java:886) android.widget.AbsSeekBar.<init> (AbsSeekBar.java:190) android.widget.SeekBar.<init> (SeekBar.java:85) android.widget.SeekBar.<init> (SeekBar.java:81) com.facebook.react.views.slider.ReactSlider.<init> (ReactSlider.java:56) com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode.measure (ReactSliderManager.java:67) com.facebook.yoga.YogaNode.measure (YogaNode.java:722) com.facebook.yoga.YogaNode.jni_YGNodeCalculateLayout (YogaNode.java) com.facebook.yoga.YogaNode.calculateLayout (YogaNode.java:198) com.facebook.react.uimanager.ReactShadowNode.calculateLayout (ReactShadowNode.java:371) com.facebook.react.uimanager.UIImplementation.calculateRootLayout (UIImplementation.java:781) com.facebook.react.uimanager.UIImplementation.updateViewHierarchy (UIImplementation.java:550) com.facebook.react.uimanager.UIImplementation.dispatchViewUpdates (UIImplementation.java:539) com.facebook.react.uimanager.UIManagerModule.onBatchComplete (UIManagerModule.java:523) com.facebook.react.cxxbridge.NativeModuleRegistry.onBatchComplete (NativeModuleRegistry.java:103) com.facebook.react.cxxbridge.CatalystInstanceImpl$BridgeCallback.onBatchComplete (CatalystInstanceImpl.java:154) com.facebook.react.bridge.queue.NativeRunnable.run (NativeRunnable.java) android.os.Handler.handleCallback (Handler.java:739) android.os.Handler.dispatchMessage (Handler.java:95) com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:31) android.os.Looper.loop (Looper.java:158) com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run (MessageQueueThreadImpl.java:208) java.lang.Thread.run (Thread.java:818)

@pull-bot
Copy link

pull-bot commented Oct 9, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Oct 9, 2017
@hramos hramos closed this as completed Oct 9, 2017
@jeffie
Copy link

jeffie commented Nov 7, 2017

why closed? this crash is still not fix

@azabost
Copy link

azabost commented Nov 20, 2017

+1 RN 0.45.1
Huawei Honor 9, Android 7.0

Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'android.animation.AnimatorSet$Node android.animation.AnimatorSet$Node.mTmpClone' on a null object reference
       at android.animation.AnimatorSet$Node.-get0(AnimatorSet.java)
       at android.animation.AnimatorSet.clone(AnimatorSet.java:740)
       at android.animation.AnimatorSet.clone(AnimatorSet.java:682)
       at android.animation.AnimatorSet$Node.clone(AnimatorSet.java:1160)
       at android.animation.AnimatorSet.clone(AnimatorSet.java:707)
       at android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorUI.init(AnimatedVectorDrawable.java:880)
       at android.graphics.drawable.AnimatedVectorDrawable.ensureAnimatorSet(AnimatedVectorDrawable.java:709)
       at android.graphics.drawable.AnimatedVectorDrawable.start(AnimatedVectorDrawable.java:692)
       at android.graphics.drawable.AnimatedStateListDrawable$AnimatedVectorDrawableTransition.start(AnimatedStateListDrawable.java:339)
       at android.graphics.drawable.AnimatedStateListDrawable.selectTransition(AnimatedStateListDrawable.java:226)
       at android.graphics.drawable.AnimatedStateListDrawable.onStateChange(AnimatedStateListDrawable.java:146)
       at android.graphics.drawable.Drawable.setState(Drawable.java:732)
       at android.widget.AbsSeekBar.drawableStateChanged(AbsSeekBar.java:534)
       at android.view.View.refreshDrawableState(View.java:18100)
       at android.view.View.setPressed(View.java:8518)
       at android.widget.AbsSeekBar.startDrag(AbsSeekBar.java:832)
       at android.widget.AbsSeekBar.onTouchEvent(AbsSeekBar.java:797)
       at android.view.View.dispatchTouchEvent(View.java:10013)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
       at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:447)
       at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1871)
       at android.app.Dialog.dispatchTouchEvent(Dialog.java:939)
       at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:409)
       at android.view.View.dispatchPointerEvent(View.java:10233)
       at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4859)
       at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4720)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4252)
       at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4305)
       at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4271)
       at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4398)
       at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4279)
       at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4455)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4252)
       at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4305)
       at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4271)
       at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4279)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4252)
       at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6684)
       at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6658)
       at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6619)
       at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6813)
       at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:192)
       at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(InputEventReceiver.java)
       at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:181)
       at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6758)
       at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6841)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:933)
       at android.view.Choreographer.doCallbacks(Choreographer.java:742)
       at android.view.Choreographer.doFrame(Choreographer.java:668)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:919)
       at android.os.Handler.handleCallback(Handler.java:761)
       at android.os.Handler.dispatchMessage(Handler.java:98)
       at android.os.Looper.loop(Looper.java:156)
       at android.app.ActivityThread.main(ActivityThread.java:6577)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

@bourgois
Copy link

Still here for us also. Happened a few days ago on HUAWEI KIW-L21, OS Level 23 WITH "react-native": "0.48.2"

java.lang.NullPointerException: Attempt to write to field 'java.util.ArrayList android.animation.AnimatorSet$Node.nodeDependents' on a null object reference at android.animation.AnimatorSet.clone(AnimatorSet.java:700) at android.animation.AnimatorSet.clone(AnimatorSet.java:51) at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:562) at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:543) at android.content.res.ConstantState.newInstance(ConstantState.java:51) at android.content.res.ConstantState.newInstance(ConstantState.java:59) at android.content.res.ConfigurationBoundResourceCache.getInstance(ConfigurationBoundResourceCache.java:48) at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:111) at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance(AnimatedVectorDrawable.java:567) at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators(AnimatedVectorDrawable.java:545) at android.graphics.drawable.AnimatedVectorDrawable.applyTheme(AnimatedVectorDrawable.java:377) at android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme(DrawableContainer.java:865) at android.graphics.drawable.DrawableContainer.applyTheme(DrawableContainer.java:577) at android.graphics.drawable.StateListDrawable.applyTheme(StateListDrawable.java:370) at android.graphics.drawable.AnimatedStateListDrawable.applyTheme(AnimatedStateListDrawable.java:391) at android.content.res.Resources.loadDrawable(Resources.java:4165) at android.content.res.Resources.loadDrawable(Resources.java:4006) at android.content.res.TypedArray.getDrawable(TypedArray.java:886) at android.content.res.XResources$XTypedArray.getDrawable(XResources.java:1372) at android.widget.AbsSeekBar.<init>(AbsSeekBar.java:194) at android.widget.SeekBar.<init>(SeekBar.java:85) at android.widget.SeekBar.<init>(SeekBar.java:81) at com.facebook.react.views.slider.ReactSlider.<init>(ReactSlider.java:56) at com.facebook.react.views.slider.ReactSliderManager.createViewInstance(ReactSliderManager.java:121) at com.facebook.react.views.slider.ReactSliderManager.createViewInstance(ReactSliderManager.java:39) at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:46) at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:218) at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:150) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:923) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:895) at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:31) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:136) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:107) 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:7407) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:133)

@denstepa
Copy link

denstepa commented Nov 28, 2017

Same here:
react-native: 0.50.3
compileSdkVersion 25
buildToolsVersion "26.0.2"
targetSdkVersion 25
Crash on androiod 6, 7

screen shot 2017-11-28 at 4 17 42 pm

Fatal Exception: java.lang.NullPointerException: Attempt to write to field 'java.util.ArrayList android.animation.AnimatorSet$Node.dependencies' on a null object reference
       at android.animation.AnimatorSet.clone(AnimatorSet.java:690)
       at android.animation.AnimatorSet.clone(AnimatorSet.java:635)
       at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:562)
       at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:561)
       at android.content.res.ConstantState.newInstance(ConstantState.java:51)
       at android.content.res.ConstantState.newInstance(ConstantState.java:59)
       at android.content.res.ConfigurationBoundResourceCache.getInstance(ConfigurationBoundResourceCache.java:48)
       at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:111)
       at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance(AnimatedVectorDrawable.java:567)
       at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators(AnimatedVectorDrawable.java:545)
       at android.graphics.drawable.AnimatedVectorDrawable.applyTheme(AnimatedVectorDrawable.java:377)
       at android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme(DrawableContainer.java:865)
       at android.graphics.drawable.DrawableContainer.applyTheme(DrawableContainer.java:577)
       at android.graphics.drawable.StateListDrawable.applyTheme(StateListDrawable.java:370)
       at android.graphics.drawable.AnimatedStateListDrawable.applyTheme(AnimatedStateListDrawable.java:391)
       at android.content.res.Resources.loadDrawable(Resources.java:2765)
       at android.content.res.TypedArray.getDrawable(TypedArray.java:870)
       at android.widget.AbsSeekBar.<init>(AbsSeekBar.java:97)
       at android.widget.SeekBar.<init>(SeekBar.java:85)
       at android.widget.SeekBar.<init>(SeekBar.java:81)
       at com.facebook.react.views.slider.ReactSlider.<init>(ReactSlider.java:56)
       at com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode.measure(ReactSliderManager.java:64)
       at com.facebook.yoga.YogaNode.measure(YogaNode.java:634)
       at com.facebook.yoga.YogaNode.jni_YGNodeCalculateLayout(YogaNode.java)
       at com.facebook.yoga.YogaNode.calculateLayout(YogaNode.java:184)
       at com.facebook.react.uimanager.ReactShadowNode.calculateLayout(ReactShadowNode.java:378)
       at com.facebook.react.uimanager.UIImplementation.calculateRootLayout(UIImplementation.java:831)
       at com.facebook.react.uimanager.UIImplementation.updateViewHierarchy(UIImplementation.java:588)
       at com.facebook.react.uimanager.UIImplementation.dispatchViewUpdates(UIImplementation.java:561)
       at com.facebook.react.uimanager.UIManagerModule.onBatchComplete(UIManagerModule.java:537)
       at com.facebook.react.bridge.NativeModuleRegistry.onBatchComplete(NativeModuleRegistry.java:136)
       at com.facebook.react.bridge.CatalystInstanceImpl$BridgeCallback.onBatchComplete(CatalystInstanceImpl.java:139)
       at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
       at android.os.Handler.handleCallback(Handler.java:815)
       at android.os.Handler.dispatchMessage(Handler.java:104)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
       at android.os.Looper.loop(Looper.java:207)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
       at java.lang.Thread.run(Thread.java:818)

@MattyK14
Copy link

MattyK14 commented Dec 5, 2017

Android 7.0 in production
React-Native 0.50.3

java.lang.NullPointerException Attempt to read from field 'android.animation.Animator android.animation.AnimatorSet$Node.mAnimation' on a null object reference 
    AnimatorSet.java:725 android.animation.AnimatorSet.clone
    AnimatorSet.java:682 android.animation.AnimatorSet.clone
    Animator.java:589 android.animation.Animator$AnimatorConstantState.newInstance
    Animator.java:588 android.animation.Animator$AnimatorConstantState.newInstance
    ConstantState.java:53 android.content.res.ConstantState.newInstance
    ConstantState.java:61 android.content.res.ConstantState.newInstance
    AnimatorInflater.java:136 android.animation.AnimatorInflater.loadAnimator
    AnimatedVectorDrawable.java:641 android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance
    AnimatedVectorDrawable.java:619 android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators
    AnimatedVectorDrawable.java:451 android.graphics.drawable.AnimatedVectorDrawable.applyTheme
    DrawableContainer.java:949 android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme
    DrawableContainer.java:611 android.graphics.drawable.DrawableContainer.applyTheme
    StateListDrawable.java:371 android.graphics.drawable.StateListDrawable.applyTheme
    AnimatedStateListDrawable.java:392 android.graphics.drawable.AnimatedStateListDrawable.applyTheme
    ResourcesImpl.java:630 android.content.res.ResourcesImpl.loadDrawable
    Resources.java:1727 android.content.res.Resources.loadDrawable
    TypedArray.java:945 android.content.res.TypedArray.getDrawable
    AbsSeekBar.java:212 android.widget.AbsSeekBar.<init>
    SeekBar.java:85 android.widget.SeekBar.<init>
    SeekBar.java:81 android.widget.SeekBar.<init>
    ReactSlider.java:56 com.facebook.react.views.slider.ReactSlider.<init>
    ReactSliderManager.java:121 com.facebook.react.views.slider.ReactSliderManager.createViewInstance
    ReactSliderManager.java:39 com.facebook.react.views.slider.ReactSliderManager.createViewInstance
    ViewManager.java:44 com.facebook.react.uimanager.ViewManager.createView
    NativeViewHierarchyManager.java:224 com.facebook.react.uimanager.NativeViewHierarchyManager.createView
    UIViewOperationQueue.java:153 com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute
    UIViewOperationQueue.java:1006 com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations
    UIViewOperationQueue.java:977 com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded
    GuardedFrameCallback.java:31 com.facebook.react.uimanager.GuardedFrameCallback.doFrame
    ReactChoreographer.java:136 com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame
    ChoreographerCompat.java:107 com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame
    Choreographer.java:925 android.view.Choreographer$CallbackRecord.run
    Choreographer.java:702 android.view.Choreographer.doCallbacks
    Choreographer.java:635 android.view.Choreographer.doFrame
    Choreographer.java:913 android.view.Choreographer$FrameDisplayEventReceiver.run
    Handler.java:751 android.os.Handler.handleCallback
    Handler.java:95 android.os.Handler.dispatchMessage
    Looper.java:154 android.os.Looper.loop
    ActivityThread.java:6688 android.app.ActivityThread.main
    Method.java:-2 java.lang.reflect.Method.invoke
    ZygoteInit.java:1468 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
    ZygoteInit.java:1358 com.android.internal.os.ZygoteInit.main

@salujaharkirat
Copy link

@hramos still facing this on 0.47.2 on android production applications. Can you re open the issue as it is not yet fixed?

@jasongrishkoff
Copy link

Can confirm that I'm still seeing this issue RN 0.52

@qmegas
Copy link

qmegas commented Apr 16, 2018

Confirm that bag exists on RN 0.54.4
Android 6.0

Caused by java.lang.NullPointerException
Attempt to write to field 'java.util.ArrayList android.animation.AnimatorSet$Node.nodeDependents' on a null object reference

com.facebook.react.views.slider.ReactSlider.<init> (ReactSlider.java:56)
com.facebook.react.views.slider.ReactSliderManager.createViewInstance (ReactSliderManager.java:121)
com.facebook.react.views.slider.ReactSliderManager.createViewInstance (ReactSliderManager.java:39)
com.facebook.react.uimanager.ViewManager.createView (ViewManager.java:44)
com.facebook.react.uimanager.NativeViewHierarchyManager.createView (NativeViewHierarchyManager.java:224)
com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute (UIViewOperationQueue.java:153)
com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations (UIViewOperationQueue.java:1013)
com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded (UIViewOperationQueue.java:984)
com.facebook.react.uimanager.GuardedFrameCallback.doFrame (GuardedFrameCallback.java:31)
com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame (ReactChoreographer.java:136)
com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame (ChoreographerCompat.java:107)

@stale
Copy link

stale bot commented Jul 15, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 15, 2018
@jokober
Copy link

jokober commented Jul 16, 2018

Android 7.0 in production
Huawei (WAS-LX1A)
React-Native 0.55.4

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 16, 2018
@rkbhochalya
Copy link

I can confirm the issue using React-Native version 0.56.0 on Android 7.0 while running release build.

@jayad-aadrit
Copy link

+1
Fatal Exception: java.lang.NullPointerException: Attempt to write to field 'java.util.ArrayList android.animation.AnimatorSet$Node.nodeDependents' on a null object reference
at android.animation.AnimatorSet.clone(AnimatorSet.java:700)
at android.animation.AnimatorSet.clone(AnimatorSet.java:51)
at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:562)
at android.animation.Animator$AnimatorConstantState.newInstance(Animator.java:543)
at android.content.res.ConstantState.newInstance(ConstantState.java:51)
at android.content.res.ConstantState.newInstance(ConstantState.java:59)
at android.content.res.ConfigurationBoundResourceCache.getInstance(ConfigurationBoundResourceCache.java:48)
at android.animation.AnimatorInflater.loadAnimator(AnimatorInflater.java:111)
at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance(AnimatedVectorDrawable.java:567)
at android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators(AnimatedVectorDrawable.java:545)
at android.graphics.drawable.AnimatedVectorDrawable.applyTheme(AnimatedVectorDrawable.java:377)
at android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme(DrawableContainer.java:865)
at android.graphics.drawable.DrawableContainer.applyTheme(DrawableContainer.java:577)
at android.graphics.drawable.StateListDrawable.applyTheme(StateListDrawable.java:370)
at android.graphics.drawable.AnimatedStateListDrawable.applyTheme(AnimatedStateListDrawable.java:391)
at android.content.res.Resources.loadDrawable(Resources.java:4167)
at android.content.res.Resources.loadDrawable(Resources.java:4003)
at android.content.res.TypedArray.getDrawable(TypedArray.java:886)
at android.widget.AbsSeekBar.(AbsSeekBar.java:193)
at android.widget.SeekBar.(SeekBar.java:85)
at android.widget.SeekBar.(SeekBar.java:81)
at com.facebook.react.views.slider.ReactSlider.(ReactSlider.java:54)
at com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode.measure(ReactSliderManager.java:79)
at com.facebook.yoga.YogaNode.measure(YogaNode.java:654)
at com.facebook.yoga.YogaNode.jni_YGNodeCalculateLayout(YogaNode.java)
at com.facebook.yoga.YogaNode.calculateLayout(YogaNode.java:198)
at com.facebook.react.uimanager.ReactShadowNodeImpl.calculateLayout(ReactShadowNodeImpl.java:512)
at com.facebook.react.uimanager.UIImplementation.calculateRootLayout(UIImplementation.java:942)
at com.facebook.react.uimanager.UIImplementation.updateViewHierarchy(UIImplementation.java:694)
at com.facebook.react.uimanager.UIImplementation.dispatchViewUpdates(UIImplementation.java:654)
at com.facebook.react.uimanager.UIManagerModule.onBatchComplete(UIManagerModule.java:665)
at com.facebook.react.bridge.NativeModuleRegistry.onBatchComplete(NativeModuleRegistry.java:134)
at com.facebook.react.bridge.CatalystInstanceImpl$BridgeCallback.onBatchComplete(CatalystInstanceImpl.java:145)
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:148)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)

@ChengLiuShangHai
Copy link

I m also facing the same problem, any one got this issue 's solution ?

@ntnamag
Copy link

ntnamag commented Oct 20, 2018

Same v0.56.1

@levynir
Copy link

levynir commented Oct 21, 2018

Reproduced on 0.57.2 as well (Release Build) :(

@sjsikkema
Copy link

sjsikkema commented Dec 7, 2018

Reproduced on 0.55.2. I think that this is due to a race condition. In our situation we are moving to a next screen when you've set a value using the slider. This causes two things to happen at the same time: indicator/seek button becomes smaller with an animation, but the screen is also rerendering, thus removing the slider. My theory is that the slider is being removed and the animation is called after it, causing the NullPointerException. (It happens rarely though).

Possible workaround could be:

  • Use another Slider
  • Disable the animation (not supported by react-native)
  • Move to the next screen/render the next elements slightly after the slider animation.

Simulator used: Nexus 5X with Android 7.0 and 7.1 and device: API 24 (7.0), 520x960 hdpi

facebook-github-bot pushed a commit that referenced this issue Dec 11, 2018
Summary:
This diff disables the StateListAnimator for the ReactSlider component in Android 6 and 7
This is this is a hack to prevent T37452851 and #9979

Reviewed By: yungsters

Differential Revision: D13404685

fbshipit-source-id: d4c4f8796664c890f6a6b3502d3493370e17c300
@ShaMan123
Copy link

Getting the same error.
Thanks to this issue I now know it's probably related to the Slider component.
Getting this error when orientation is changed.
react-native 0.57.4, DEBUG build

@sjsikkema
Copy link

@ShaMan123 You can try one of the workarounds I provided. It seems like there is a workaround being provided by the React Native team as well, but you might want to wait for a stable release. We used https://github.com/jeanregisser/react-native-slider as a alternative.

@hramos hramos removed the Bug Report label Feb 6, 2019
michalchudziak pushed a commit to michalchudziak/react-native-slider that referenced this issue Feb 8, 2019
Summary:
This diff disables the StateListAnimator for the ReactSlider component in Android 6 and 7
This is this is a hack to prevent T37452851 and facebook/react-native#9979

Reviewed By: yungsters

Differential Revision: D13404685

fbshipit-source-id: d4c4f8796664c890f6a6b3502d3493370e17c300
@cpojer
Copy link
Contributor

cpojer commented Feb 15, 2019

This issue has been moved to callstack/react-native-slider#9.

@ghost
Copy link

ghost commented Jul 10, 2019

Android 7.0 in production
HUAWEI (VNS-L31)
ReactNative 0.58

Caused by: java.lang.NullPointerException Attempt to read from field 'android.animation.Animator android.animation.AnimatorSet$Node.mAnimation' on a null object reference

AnimatorSet.java:725 android.animation.AnimatorSet.clone

AnimatorSet.java:682 android.animation.AnimatorSet.clone

Animator.java:589 android.animation.Animator$AnimatorConstantState.newInstance

Animator.java:588 android.animation.Animator$AnimatorConstantState.newInstance

ConstantState.java:52 android.content.res.ConstantState.newInstance

ConstantState.java:60 android.content.res.ConstantState.newInstance

ConfigurationBoundResourceCache.java:40 android.content.res.ConfigurationBoundResourceCache.getInstance

AnimatorInflater.java:116 android.animation.AnimatorInflater.loadAnimator

AnimatedVectorDrawable.java:666 android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator.newInstance

AnimatedVectorDrawable.java:644 android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState.inflatePendingAnimators

AnimatedVectorDrawable.java:454 android.graphics.drawable.AnimatedVectorDrawable.applyTheme

DrawableContainer.java:960 android.graphics.drawable.DrawableContainer$DrawableContainerState.applyTheme

DrawableContainer.java:611 android.graphics.drawable.DrawableContainer.applyTheme

StateListDrawable.java:371 android.graphics.drawable.StateListDrawable.applyTheme

AnimatedStateListDrawable.java:392 android.graphics.drawable.AnimatedStateListDrawable.applyTheme

ResourcesImpl.java:778 android.content.res.ResourcesImpl.loadDrawable

Resources.java:921 android.content.res.Resources.loadDrawable

TypedArray.java:983 android.content.res.TypedArray.getDrawable

AbsSeekBar.java:110 android.widget.AbsSeekBar.<init>

SeekBar.java:85 android.widget.SeekBar.<init>

SeekBar.java:81 android.widget.SeekBar.<init>

AppCompatSeekBar.java:47 android.support.v7.widget.AppCompatSeekBar.<init>

ReactSlider.java:51 com.facebook.react.views.slider.ReactSlider.<init>

ReactSliderManager.java:66 com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode.measure

YogaNode.java:740 com.facebook.yoga.YogaNode.measure

YogaNode.java:-2 com.facebook.yoga.YogaNode.jni_YGNodeCalculateLayout

YogaNode.java:280 com.facebook.yoga.YogaNode.calculateLayout

ReactShadowNodeImpl.java:421 com.facebook.react.uimanager.ReactShadowNodeImpl.calculateLayout

UIImplementation.java:968 com.facebook.react.uimanager.UIImplementation.calculateRootLayout

UIImplementation.java:710 com.facebook.react.uimanager.UIImplementation.updateViewHierarchy

UIImplementation.java:670 com.facebook.react.uimanager.UIImplementation.dispatchViewUpdates

UIManagerModule.java:761 com.facebook.react.uimanager.UIManagerModule.onBatchComplete

NativeModuleRegistry.java:118 com.facebook.react.bridge.NativeModuleRegistry.onBatchComplete

CatalystInstanceImpl.java:155 com.facebook.react.bridge.CatalystInstanceImpl$BridgeCallback.onBatchComplete

NativeRunnable.java:-2 com.facebook.react.bridge.queue.NativeRunnable.run

Handler.java:761 android.os.Handler.handleCallback

Handler.java:98 android.os.Handler.dispatchMessage

MessageQueueThreadHandler.java:29 com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage

Looper.java:156 android.os.Looper.loop

MessageQueueThreadImpl.java:232 com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run

Thread.java:776 java.lang.Thread.run

@Nahani
Copy link

Nahani commented Jul 16, 2019

Reproduced in RN 0.57.8

@Sugarya
Copy link

Sugarya commented Aug 16, 2019

Reproduced in RN 0.57.8 as well. I tried to use another Slider (https://github.com/jeanregisser/react-native-slider ) as @sjsikkema mentioned , and the problem was solved. It does work!

@sasij
Copy link

sasij commented Nov 26, 2019

Reproduced in RN 0.60.2 for Android devices with API versions 6, 7 and 7.1.1

@facebook facebook locked as resolved and limited conversation to collaborators Feb 15, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Feb 15, 2020
@lunaleaps
Copy link
Contributor

For those experiencing the crash still, you can check out @newyankeecodeshop's workaround here: callstack/react-native-slider#9 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. 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