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

[Animated] crashes on Android when toValue is non Number and using NativeDrivers #23810

Closed
andrew-schenk opened this issue Mar 7, 2019 · 1 comment
Labels
API: Animated Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@andrew-schenk
Copy link

andrew-schenk commented Mar 7, 2019

🐛 Bug Report

The Animated library crashes on Android, RN v0.58.6 when using a non number toValue and native drivers.

To Reproduce

This Snack shows an example. Run it on Android and adjust toValue from a number to a null or string.
https://snack.expo.io/ry8tHCRLN

Expected Behavior

Supplying a toValue of the improper type should fallback to toValue: 0 just like the javascript and iOS drivers do.

Code Example

This Snack shows an example. Run it on Android and adjust toValue from a number to a null or string.
https://snack.expo.io/ry8tHCRLN

Environment

React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
Memory: 20.31 GB / 48.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.0.0 - /usr/local/bin/node
npm: 6.8.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: 22, 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 23.0.2, 24.0.1, 25.0.1, 26.0.1, 26.0.2, 26.0.3, 27.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 Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.1 AI-173.4720617
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.58.6 => 0.58.6
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-create-library: 3.1.2
react-native-git-upgrade: 0.2.7

facebook-github-bot pushed a commit that referenced this issue Mar 13, 2019
#23812)

Summary:
…ake sure Android does not crash from bad params when using useNativeDriver

Android apps crash when using Animated useNativeDriver: true and the toValue is not a number.  See issue here with test case.  [Issue](#23810)

[Android] [fixed] - Fix crash when using Animated with useNativeDriver and a non Number toValue
Pull Request resolved: #23812

Differential Revision: D14436113

Pulled By: cpojer

fbshipit-source-id: 89fb3180c08cc5ffb817b3984dacda0a80b4f703
@elicwhite
Copy link
Member

Looks like your PR for this got merged. Closing the issue! Thanks!

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

No branches or pull requests

3 participants