App crash on button click in release mode, debugging is fine
See original GitHub issueI am facing this strange issue. When I click on signin button it crashes the app in release mode, works in debugging mode.
- I am not sure it is the issue with react-native-reanimated , react-native-gesture-handler or react-native itself.
- In release apk, I tried hermes enable true and false both. But nothing works. It means, I am sure that issue is with not the hermes-engine.
I have updated all the libraries (react-native-reanimated , react-native-gesture-handler) but still not worked for me.
Here is the some code.
import Animated, {Easing} from 'react-native-reanimated';
import {TapGestureHandler, State} from 'react-native-gesture-handler';
const {
Value,
event,
block,
cond,
eq,
set,
Clock,
startClock,
stopClock,
debug,
timing,
clockRunning,
interpolate,
Extrapolate,
concat,
} = Animated;
this.buttonOpacity = new Value(1);
this.onStateChange = event([
{
nativeEvent: ({state}) =>
block([
cond(
eq(state, State.END),
set(this.buttonOpacity, runTiming(new Clock(), 1, 0)),
),
]),
},
]);
this.buttonY = interpolate(this.buttonOpacity, {
inputRange: [0, 1],
outputRange: [100, 0],
extrapolate: Extrapolate.CLAMP,
});
<TapGestureHandler onHandlerStateChange={this.onStateChange}>
<Animated.View
style={{
...styles.button,
opacity: this.buttonOpacity,
transform: [{translateY: this.buttonY}],
}}>
<Text style={{fontSize: 20, fontWeight: 'bold'}}>SIGN IN</Text>
</Animated.View>
</TapGestureHandler>
"hermes-engine": "^0.2.1",
"react": "16.8.1",
"react-native": "0.61.3",
"react-native-gesture-handler": "^1.5.0",
"react-native-reanimated": "^1.3.0",
There is one thing, If code is wrong then why everything is working in debugging mode as I want it to be work? Just crash in release mode even Hermes enabled or disabled.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Application crashing in debug but running fine in Release mode
I feel that If there is any problem in the code, it shoud not work, it should not work in both release and...
Read more >Crash when run in Release mode? - Qt Forum
Try running your Release executable under debugger. When it crashes inside debugger you still get trace back. If you are lucky, and it...
Read more >UWP Windows 10 app crashes in release mode but works fine ...
My UWP app is crashing in Release mode and works fine in Debug mode but I can't put my finger on what the...
Read more >Plugin crashes on Release mode, works fine in Debug
Hello! I'm creating an audioPlugin with JUCE and something weird happens when I close it. If Visual Studio's compiler is set on Debug...
Read more >UWP App crashes in Debug mode , Kernel Dlls not being ...
The App crashes in debug mode. Works fine in release mode, passes all the windows certification tests. Capture 1 screen shot shows the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Was facing a similar issue, this fixed it - https://github.com/kmagiera/react-native-gesture-handler/issues/320#issuecomment-537945905
I was facing the same issue. It´s something related to the react-native-gesture-handler buttons. I changed all my gesture handler buttons to the default React Button and It worked good.