-
Notifications
You must be signed in to change notification settings - Fork 270
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
ReactSlider crash on Android release version #9
Comments
any update on this? |
@cinder92 still exist
|
I also have a similar bug with react-native 0.57.8. I use another slider (https://github.com/jeanregisser/react-native-slider) instead of the slider of React Native component, and It does work! |
According to Crashlytics, I just had this |
I also have a similar bug with react-native 0.61.5. any update on this?
|
I believe the crash is caused by the custom Yoga Line 69 in 45c2a54
That code runs on the Yoga layout thread, but it allocates a To prevent this code from executing, I changed the style for our
Hope this helps! P.S. - I don't know enough about Android view drawing and measurement to know how to implement the measure method without allocating a slider view. Maybe the measure could allocate the view on the main thread and block until that finishes? |
This issue was originally created by @ssg-luke as facebook/react-native#9979.
Issue Description
Hard crash randomly and unexpectedly on Android release version only (debug is fine, iOS is fine on both debug and release) when hiding and displaying sliders based on a state variable.
Steps to Reproduce / Code Snippets
We have a number of photo filters in our app which are selected by
<TouchableOpacity>
components and some have a slider to adjust the blur or brightness etc. These sliders are completely separate from each other and are displayed based on a string stored in the components state calledfilter
.Here is one such slider from render():
{filter === 'gamify' && ( <View style={styles.filterSlider}> <Text>How retro do you want to go?</Text> <Slider value={this.state.pixelSize} minimumValue={1} maximumValue={5} onValueChange={value => this.setState({pixelSize: value})} /> </View>)}
Expected Results
No crash when hiding and displaying sliders
Stack Trace
java.lang.NullPointerException: Attempt to write to field 'java.util.ArrayList android.animation.AnimatorSet$Node.nodeDependents' on a null object reference
http://pastebin.com/270Wg6Pu
Additional Information
The text was updated successfully, but these errors were encountered: