question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crash on button click in release mode, debugging is fine

See original GitHub issue

I am facing this strange issue. When I click on signin button it crashes the app in release mode, works in debugging mode.

  1. I am not sure it is the issue with react-native-reanimated , react-native-gesture-handler or react-native itself.
  2. 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:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
maxbbbcommented, Nov 1, 2019
1reaction
robstermarinhocommented, Nov 2, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found