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

Illegal node ID set as an input for Animated.DiffClamp node #11317

Closed
nihgwu opened this issue Dec 6, 2016 · 9 comments
Closed

Illegal node ID set as an input for Animated.DiffClamp node #11317

nihgwu opened this issue Dec 6, 2016 · 9 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@nihgwu
Copy link
Contributor

nihgwu commented Dec 6, 2016

image

After I upgrade to RN0.40RC0( or perhaps it exists in RN0.39 as well, I will test it later) I get this error consistently, the only change is that I'm using native event(AnimatedScrollVIew) now, and it throw the error on both iOS and Android.

I try to comment this line

RCTLogError(@"Illegal node ID set as an input for Animated.DiffClamp node");
and then it works as before.

There no other commits changed this DiffClamp implementation so I guess it's related to AnimatedScrollVIew, so any ideas? @janicduplessis

@magicismight
Copy link
Contributor

0.42.0

    const translateX = Animated.diffClamp(animatedValue, 0, last).interpolate({
      inputRange: [0, 1],
      outputRange: [0, last * 11]
    });

    return (
      <View style={styles.commentIndicator}>
        <View style={styles.commentIndicatorContainer}>
          <Animated.View style={[styles.commentIndicatorDot, styles.commentIndicatorActive, {transform: [{translateX}]}]} />
        </View>
      </View>
    );

@arsen
Copy link

arsen commented Mar 5, 2017

@magicismight, @janicduplessis
Once the component is getting unmounted it is throwing that error. Both android and iOS.

If you are using nativeDriver and Animated.diffClamp

@magicismight
Copy link
Contributor

@arsenghazaryan I'm getting this error when the component is just mounted.

@arsen
Copy link

arsen commented Mar 8, 2017

Mounting works fine for me.
Have you tried to mount the component and then update the styles and set the animation in styles.
e.g.

setTimeout(() => {
this.setState({ useAnimation: true });
}, 1000)

const animStyles = this.state.useAnimation ? { transform ....} : {};

@janicduplessis
Copy link
Contributor

I'll have a look at this issue this week

@arsen
Copy link

arsen commented Mar 13, 2017

Hey @janicduplessis
I was wondering if you had time to take a look into this issue?

Thanks :)

@janicduplessis
Copy link
Contributor

Just did :) #12910

@arsen
Copy link

arsen commented Mar 14, 2017

Thanks a lot !!!

thotegowda pushed a commit to thotegowda/react-native that referenced this issue May 7, 2017
Summary:
There was some missing super.__detach calls in some Animated nodes, we rely on the base class being called to drop the node in the native implementation, not doing so will cause some nodes to leak. It also resulted in a crash when removing certain nodes because they would get updated after being detached.

**Test plan**
Reproduced the crash by unmounting a view that uses a DiffClamp node and made sure this fixes it. Also tested that other native animations still worked properly.

Fixes facebook#11317
Closes facebook#12910

Differential Revision: D4718188

Pulled By: javache

fbshipit-source-id: 179ec1334532152c124a9c0f447f488311925d0a
@melihberberolu
Copy link

@janicduplessis Which version corrected this bug ?

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants