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

Error "index=4 count=3" with LayoutAnimation.easeInEaseOut() on Android #17113

Closed
jer-sen opened this issue Dec 7, 2017 · 4 comments
Closed
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@jer-sen
Copy link

jer-sen commented Dec 7, 2017

On Android, updating a specific (but very simple) component tree after calling LayoutAnimation.easeInEaseOut() leads to an error :

index=4 count=3
addInArray
    ViewGroup.java:3971
addViewInner
    ViewGroup.java:3902
addView
    ViewGroup.java:3733
addView
    ViewGroup.java:3678
addView
    ViewGroupManager.java:47
manageChildren
    NativeViewHierarchyManager.java:401
execute
    UIViewOperationQueue.java:180
run
    UIViewOperationQueue.java:819
flushPendingBatches
    UIViewOperationQueue.java:926
access$2100
    UIViewOperationQueue.java:47
doFrameGuarded
    UIViewOperationQueue.java:986
doFrame
    GuardedFrameCallback.java:31
doFrame
    ReactChoreographer.java:136
doFrame
    ChoreographerCompat.java:107
run
    Choreographer.java:765
doCallbacks
    Choreographer.java:580
doFrame
    Choreographer.java:549
run
    Choreographer.java:753
handleCallback
    Handler.java:739
dispatchMessage
    Handler.java:95
loop
    Looper.java:135
main
    ActivityThread.java:5221
invoke
    Method.java
invoke
    Method.java:372
run
    ZygoteInit.java:899
main
    ZygoteInit.java:694

Here is a repro : https://snack.expo.io/H1H0AbDZM
Just click 2 times on the top text component to see the app crash.

This bug has been there for several months and is still there with react-native@0.51.0.

Thanks in advance for your help.

@react-native-bot
Copy link
Collaborator

@facebook-github-bot no-template

@facebook-github-bot
Copy link
Contributor

Hey @Jay1337, thanks for posting this! It looks like your issue is missing some required information. Can you please add all the details specified in the Issue Template? This is necessary for people to be able to understand and reproduce your issue. I am going to close this, but please feel free to open a new issue with the additional information provided. Thanks!

How to ContributeWhat to Expect from Maintainers

@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Dec 7, 2017
@MwirabuaTimothy
Copy link

MwirabuaTimothy commented Feb 26, 2018

Same issue here. Test the template below. Trying to toggle some views using a button.
Throws the error "index=4 count=3" after a few toggles.

import React, { Component } from 'react';

import { 
  View, 
  Text, 
  LayoutAnimation, 
  Button } from 'react-native';


export default class Testing extends Component {
  state = {
    showOthers: false
  }
  componentWillUpdate(){
    LayoutAnimation.easeInEaseOut()
  }
  showOthers = () => {
    this.setState({ showOthers: !this.state.showOthers })
  }
  render() {

    const { showOthers } = this.state

    return (
        <View>

          {showOthers && 
            <View>
              <Text>One</Text>
              <Text>Two</Text>
            </View>
          }
          
          <Text>Three</Text>
          <Text>Four</Text>

          {showOthers && 
            <Text>Five</Text>
          }

          <Button onPress={this.showOthers} title={showOthers ? 'Hide Others' : 'Show Others' } />

      </View>
    );
  }
}

Using:

"react": "16.2.0",
"react-native": "0.53.0",

@psg2
Copy link

psg2 commented Mar 14, 2018

I'm facing the same problem.

@facebook facebook locked as resolved and limited conversation to collaborators Dec 7, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Dec 7, 2018
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