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.

Display of components with PanGestureHandler crashes on Android

See original GitHub issue

Description

When I display a list of items containing PanGestureHandler, my app crashes most of the time on android (I don’t have the issue on iOS)

Screenshots

Steps To Reproduce

Display a list of items with this component : https://gist.github.com/mlecoq/6974dce3a48559ce8b164f2185d4d074

Expected behavior

Items are displayed and I can drag them

Actual behavior

The app crashes

Snack or minimal code example

https://gist.github.com/mlecoq/6974dce3a48559ce8b164f2185d4d074

Package versions

  • React: 16.14.0
  • React Native: 0.63.4
  • React Native Reanimated: 2.0.0-rc.1
  • NodeJS: 14.5.0

Here is the stacktrace obtained with Sentry:

OS Version: Android 10 (QP1A.190711.020.T720XXU1CTI1)
Report Version: 104

Exception Type: Unknown (SIGABRT)

Application Specific Information:
Abort

Thread 0 Crashed:
0   libc.so                         0x743b1f22a8        abort
1   libfbjni.so                     0x73487c0694        _Unwind_SetGR
2   libfbjni.so                     0x73487bd554        __gxx_personality_v0
3   libhermes.so                    0x733bdb9010        <unknown> + 494925484048
4   libhermes.so                    0x733bdb9518        _Unwind_Resume
5   libhermes.so                    0x733bb7cec4        facebook::hermes::HermesRuntimeImpl::callAsConstructor
6   libreanimated.so                0x7335331788        <unknown> + 494813779848
7   libhermes.so                    0x733bb83b74        facebook::hermes::HermesRuntimeImpl::HFContext::func
8   libhermes.so                    0x733bba30ec        <unknown> + 494923297004
9   libhermes.so                    0x733bba6bbc        <unknown> + 494923312060
10  libhermes.so                    0x733bba43a0        <unknown> + 494923301792
11  libhermes.so                    0x733bb7cd1c        facebook::hermes::HermesRuntimeImpl::call
12  libreanimated.so                0x7335331788        <unknown> + 494813779848
13  libhermes.so                    0x733bb83b74        facebook::hermes::HermesRuntimeImpl::HFContext::func
14  libhermes.so                    0x733bba30ec        <unknown> + 494923297004
15  libhermes.so                    0x733bba6bbc        <unknown> + 494923312060
16  libhermes.so                    0x733bba43a0        <unknown> + 494923301792
17  libhermes.so                    0x733bb7cd1c        facebook::hermes::HermesRuntimeImpl::call
18  libreanimated.so                0x7335331724        <unknown> + 494813779748
19  libhermes.so                    0x733bb83b74        facebook::hermes::HermesRuntimeImpl::HFContext::func
20  libhermes.so                    0x733bb9163c        <unknown> + 494923224636
21  libhermes.so                    0x733bb7cd1c        facebook::hermes::HermesRuntimeImpl::call
22  libreanimated.so                0x733533498c        reanimated::Mapper::execute
23  libreanimated.so                0x7335320dc8        reanimated::MapperRegistry::execute
24  libreanimated.so                0x733531a974        reanimated::NativeReanimatedModule::onRender
25  libreanimated.so                0x7335315b74        facebook::jni::detail::MethodWrapper<T>::dispatch
26  libreanimated.so                0x7335315acc        _ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIN10reanimated22AnimationFrameCallbackENS1_15BaseHybridClassEE8JavaPartENS0_7JObjectEvE11_javaobjectEEEOdEXadL_ZNS1_13MethodWrapperIMS7_FvdEXadL_ZNS7_16onAnimatio...
27  libart.so                       0x73b8146354        <unknown> + 497009582932
28  <unknown>                       0x9c166cc0          <unknown>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
piaskowykcommented, Feb 4, 2021

There are two problems:

  • You use measure() function on the uninitialized object here. indicatorRef can be undefined at this moment because the <Indicator> object can be uninitialized yet during you try to run measure.

  • We caught exceptions in the wrong way and you weren’t able to catch this exception and the application crashed.

Thanks for the well-described issue and for preparing the playground repo - it was helpful 👏

1reaction
mlecoqcommented, Feb 4, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

PanGestureHandler | React Native Gesture Handler
A continuous gesture handler that can recognize a panning (dragging) gesture and track its movement.
Read more >
react-native-gesture-handler
Run yarn android or yarn ios (depending on which platform you want to run the example app on). You will need to have...
Read more >
Swipe Gestures not Working in Android- React Native ...
Problem Statement · Change the Tab screen by swiping right to left or right to left · Swipe out the navigation drawer by...
Read more >
react native gesture handler is not working with Android ...
To get it work on Android you have to wrap the entry point of your app with <GestureHandlerRootView> component and import it from ......
Read more >
2.8.31 - Crash when opening a push notification and app not ...
Regarding 3) - is there a way for me to log messages from inside the production build of my app that would show...
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