Hey, everyone.
After a long day trying to find out what was leaking on my app, I discovered it was something on RNN.
I removed the entire logic and the bug is reproducible on playground.
static options on Playground's OptionsScreen with this:static options() {
return {
topBar: {
leftButtons: {
id: BUTTON_LEFT,
testID: BUTTON_LEFT,
icon: require('../../img/navicon_add.png'),
text: 'Left',
color: 'purple'
},
rightButtons: [
{
id: CUSTOM_BUTTON2,
testID: CUSTOM_BUTTON2,
component: {
name: 'CustomRoundedButton',
passProps: {
title: 'Two'
}
}
},
{
id: BUTTON_ONE,
testID: BUTTON_ONE,
text: 'One',
fontFamily: 'HelveticaNeue-Italic',
fontSize: 28,
color: 'red'
}
],
}
}
}
01-28 18:57:19.775 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentDidMount'
01-28 18:57:19.779 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentDidAppear'
01-28 18:57:20.108 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentDidDisappear'
01-28 18:57:20.394 11610-11610/com.reactnativenavigation.playground D/ReactNative: ReactInstanceManager.detachViewFromInstance()
01-28 18:57:20.397 11610-11610/com.reactnativenavigation.playground D/ReactNative: ReactInstanceManager.detachViewFromInstance()
01-28 18:57:20.398 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentWillUnmount'
01-28 18:57:20.620 11610-11610/com.reactnativenavigation.playground D/ReactNative: ReactInstanceManager.attachRootViewToInstance()
01-28 18:57:20.623 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: Running application "navigation.playground.OptionsScreen" with appParams: {"initialProps":{"componentId":"Component133"},"rootTag":531}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
01-28 18:57:20.646 11610-11610/com.reactnativenavigation.playground D/ReactNative: ReactInstanceManager.attachRootViewToInstance()
01-28 18:57:20.719 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: Running application "CustomRoundedButton" with appParams: {"initialProps":{"componentId":"CustomComponent134"},"rootTag":541}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
01-28 18:57:20.731 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentDidMount'
01-28 18:57:20.735 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentDidAppear'
01-28 18:57:21.080 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentDidDisappear'
01-28 18:57:21.363 11610-11610/com.reactnativenavigation.playground D/ReactNative: ReactInstanceManager.detachViewFromInstance()
01-28 18:57:21.366 11610-11610/com.reactnativenavigation.playground D/ReactNative: ReactInstanceManager.detachViewFromInstance()
01-28 18:57:21.366 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentWillUnmount'
01-28 18:57:21.566 11610-11610/com.reactnativenavigation.playground D/ReactNative: ReactInstanceManager.attachRootViewToInstance()
01-28 18:57:21.568 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: Running application "navigation.playground.OptionsScreen" with appParams: {"initialProps":{"componentId":"Component138"},"rootTag":551}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
01-28 18:57:21.600 11610-11610/com.reactnativenavigation.playground D/ReactNative: ReactInstanceManager.attachRootViewToInstance()
01-28 18:57:21.685 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: Running application "CustomRoundedButton" with appParams: {"initialProps":{"componentId":"CustomComponent139"},"rootTag":561}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
01-28 18:57:21.698 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentDidMount'
01-28 18:57:21.703 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentDidAppear'
01-28 18:57:22.044 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentDidDisappear'
01-28 18:57:22.332 11610-11610/com.reactnativenavigation.playground D/ReactNative: ReactInstanceManager.detachViewFromInstance()
01-28 18:57:22.335 11610-11610/com.reactnativenavigation.playground D/ReactNative: ReactInstanceManager.detachViewFromInstance()
01-28 18:57:22.338 11610-11648/com.reactnativenavigation.playground I/ReactNativeJS: 'RNN', 'CRB.componentWillUnmount'
01-28 18:57:22.479 11610-11648/com.reactnativenavigation.playground A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x1 in tid 11648 (mqt_js), pid 11610 (tion.playground)
I've debugged RNN code trying to find out what's causing this, but no luck.
Can you help, @guyca?
Thanks :)
Hey there, thanks for reporting. I see your project uses a different jsc build, actually the same revision the playground app uses. When I switched the playground app to use the jsc shipped with RN, I wasn't able to repro the crash.
Are you positive the crash is related to TopBar buttons? I've managed to reproduce it by pushing a screen with a single text button, a button without a react component.
Hope to report with more info soon.
Seems like the crash doesn't reproduce on older jsc revisions, like 225067.
btw the "problematic" revision will be shipped by default in RN 0.59 🤷♂️
@guyca That's odd. I'm not sure that it's related to TopBar buttons, because I couldn't find where it's crashing.
What I can say is adding the code above the error is triggered, and without it, it isn't.
I'll try with different jsc revisions then.
@diegolmello So without any static options - the app doesn't crash? 🤔
@guyca I'll try today and keep you updated.
Just to make sure, I tested on iOS during lunch without any crash.
I'll test on Android now.
Closing as this is a jsc issue. Progress can be tracked here https://github.com/react-native-community/jsc-android-buildscripts/issues/84
@guyca Great job tracking it to jsc 👊
@guyca thanks for debugging this! I know it's a JSC issue, but do you know what calls RNN is making in order for the JSC issue to cause the crash?
@diegolmello Hi sir did you fix it. Can you help me. I have the same issue in react native 0.59.3
Most helpful comment
Closing as this is a jsc issue. Progress can be tracked here https://github.com/react-native-community/jsc-android-buildscripts/issues/84