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

VirtualList debug mode error #24053

Closed
HaloWang opened this issue Mar 20, 2019 · 1 comment
Closed

VirtualList debug mode error #24053

HaloWang opened this issue Mar 20, 2019 · 1 comment
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@HaloWang
Copy link

🐛 Bug Report

Get errors when setting FlatList - debug={true}
Simulator Screen Shot - iPhone 8 - 2019-03-20 at 14 24 55

To Reproduce

cd Destop && react-native init VirtualListDebugDemo && cd VirtualListDebugDemo && react-native run-ios

Expected Behavior

debug mode work fine

Code Example

Edit the App.js:

import React, { Component } from 'react'
import { Text, FlatList } from 'react-native'

export default class App extends Component {
  render() {
    return (
      <FlatList
        //  ❌ Un-commit this line to see error
        // debug={true}
        data={[1, 2, 3, 4, 5, 6]}
        renderItem={_ => {
          return <Text>123</Text>
        }}
        keyExtractor={item => item.toString()}
      />
    )
  }
}

Environment

info 
  React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
      Memory: 817.49 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 11.3.0 - /usr/local/bin/node
      Yarn: 1.13.0 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 19, 23, 25, 26, 27, 28
        Build Tools: 23.0.1, 23.0.3, 25.0.2, 26.0.2, 27.0.3, 28.0.3
        System Images: android-23 | Intel x86 Atom, android-23 | Intel x86 Atom_64, android-23 | Google APIs ARM EABI v7a, android-23 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom_64
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5264788
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.1 => 0.59.1 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-create-library: 3.1.2
      react-native-git-upgrade: 0.2.7
@bartolkaruza
Copy link

Hi there, thanks for reporting this issue! I had a quick look and I found the problem in the VirtualizedList. Once #24058 is merged, this should be fixed.

@cpojer cpojer closed this as completed Mar 20, 2019
facebook-github-bot pushed a commit that referenced this issue Mar 20, 2019
…erlay (#24058)

Summary:
This PR fixes the case where the content a VirtualizedList loads with a contentLength of 0,  causing a crash in the `renderDebugOverlay` function. The result of that crash is a red screen when turning on debug on FlatList and other VirtualizedList components as described in #24053.

[LIST] [FIX] - Fix VirtualizedList debug mode crash
Pull Request resolved: #24058

Differential Revision: D14538317

Pulled By: cpojer

fbshipit-source-id: 7b17bf51c388561c517bab1f775a31200abdc5a9
kelset pushed a commit that referenced this issue Mar 29, 2019
…erlay (#24058)

Summary:
This PR fixes the case where the content a VirtualizedList loads with a contentLength of 0,  causing a crash in the `renderDebugOverlay` function. The result of that crash is a red screen when turning on debug on FlatList and other VirtualizedList components as described in #24053.

[LIST] [FIX] - Fix VirtualizedList debug mode crash
Pull Request resolved: #24058

Differential Revision: D14538317

Pulled By: cpojer

fbshipit-source-id: 7b17bf51c388561c517bab1f775a31200abdc5a9
@facebook facebook locked as resolved and limited conversation to collaborators Mar 20, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants