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

Multiple nested images in a <Text> causes ANR #22038

Closed
2 of 3 tasks
enahum opened this issue Oct 31, 2018 · 3 comments
Closed
2 of 3 tasks

Multiple nested images in a <Text> causes ANR #22038

enahum opened this issue Oct 31, 2018 · 3 comments
Labels
Bug Component: Image Component: Text Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@enahum
Copy link
Contributor

enahum commented Oct 31, 2018

Environment

React Native Environment Info:
    System:
      OS: macOS 10.14
      CPU: x64 Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
      Memory: 408.56 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.11.0 - ~/.nvm/versions/node/v10.11.0/bin/node
      npm: 6.4.1 - ~/.nvm/versions/node/v10.11.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
      Android SDK:
        Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 27.0.3, 28.0.0, 28.0.2
        API Levels: 23, 24, 25, 26, 27, 28
    IDEs:
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.1 => 16.5.1 
      react-native: 0.57.1 => 0.57.1 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

Android: when adding multiple images as children to a the app becomes unresponsive as in the UI gets totally blocked and after a short while android reports the app as ANR, it can happen after adding 30+ images, in our case is to display emoji's in a sentence like this one: "trying to render multiple emojis in a text 👍 👍 ...." this obviously also happens with any type of inline images.

I'm not a java developer but perhaps something to do with ReactTextInlineImageShadowNode

This is part of the markdown implementation that we have in our app https://github.com/mattermost/mattermost-mobile/blob/master/app/components/markdown/markdown.js#L252

If we remove the wrapper then the images are all displayed and the app is totally responsive, this issue is Android only as iOS works just fine no matter the amount of nested images

Reproducible Demo

https://github.com/mattermost/mattermost-mobile/blob/master/app/components/markdown/markdown.js#L252

@shermdog
Copy link

shermdog commented Jan 4, 2019

@stale
Copy link

stale bot commented Aug 2, 2019

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 a "Discussion" or add it to the "Backlog" 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 Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: Image Component: Text Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

4 participants