Giter Site home page Giter Site logo

0x104f2f700 -[REAAnimationsManager clearSharedTransitionConfigForTag:] Thread 1: EXC_BAD_ACCESS (code=1, address=0x10) about react-native-reanimated HOT 24 CLOSED

ggnsingh avatar ggnsingh commented on June 11, 2024 6
0x104f2f700 -[REAAnimationsManager clearSharedTransitionConfigForTag:] Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)

from react-native-reanimated.

Comments (24)

dan-trewin avatar dan-trewin commented on June 11, 2024 7

I am also getting this hard crashing issue and agree with the others that this issue started happening with 3.9.0. This is my versions:

"react-native": "0.73.6",
"react-native-reanimated": "3.9.0", (also tried "3.10.0")

I have a feeling this issue could possibly be related to: #5274 (as that was added in 3.9.0) since the crash stack references "shared element transitions". That being said, I tried upgrading the dependency requirements outlined in that PR to their latest versions as well:

"react-native-screens": "^3.31.1",
"react-native-gesture-handler": "^2.16.1",

...and that didn't seem to help matters. Still crashing on certain forward/back navigations (happens 100% of the time when clicking back button in nav header early after app launches).


This is a pretty serious issue! It's worse when you consider that apps that usereact-native-reanimated have to update to at least 3.9.0 by May 1, 2024 to comply with the new Apple privacy requirements: #5819 (this was added in 3.9.0)

Hoping the maintainers recognize this issue and work on a fix ASAP 🤞 . In the meantime, I have downgraded to 3.8.1 (last working version) and applied the following patch-package so that my team is not blocked from releasing app updates due to the new Apple privacy requirements:

diff --git a/node_modules/react-native-reanimated/apple/sensor/ReanimatedSensor.m b/node_modules/react-native-reanimated/apple/sensor/ReanimatedSensor.m
index 863c788..656a27a 100644
--- a/node_modules/react-native-reanimated/apple/sensor/ReanimatedSensor.m
+++ b/node_modules/react-native-reanimated/apple/sensor/ReanimatedSensor.m
@@ -48,7 +48,7 @@ - (bool)initializeGyroscope
   [_motionManager
       startGyroUpdatesToQueue:[NSOperationQueue mainQueue]
                   withHandler:^(CMGyroData *sensorData, NSError *error) {
-                    double currentTime = [[NSProcessInfo processInfo] systemUptime];
+                    double currentTime = CACurrentMediaTime() * 1000;
                     if (currentTime - self->_lastTimestamp < self->_interval) {
                       return;
                     }
@@ -69,7 +69,7 @@ - (bool)initializeAccelerometer
   [_motionManager startAccelerometerUpdates];
   [_motionManager startAccelerometerUpdatesToQueue:[NSOperationQueue mainQueue]
                                        withHandler:^(CMAccelerometerData *sensorData, NSError *error) {
-                                         double currentTime = [[NSProcessInfo processInfo] systemUptime];
+                                         double currentTime = CACurrentMediaTime() * 1000;
                                          if (currentTime - self->_lastTimestamp < self->_interval) {
                                            return;
                                          }
@@ -96,7 +96,7 @@ - (bool)initializeGravity
   [_motionManager
       startDeviceMotionUpdatesToQueue:[NSOperationQueue mainQueue]
                           withHandler:^(CMDeviceMotion *sensorData, NSError *error) {
-                            double currentTime = [[NSProcessInfo processInfo] systemUptime];
+                            double currentTime = CACurrentMediaTime() * 1000;
                             if (currentTime - self->_lastTimestamp < self->_interval) {
                               return;
                             }
@@ -121,7 +121,7 @@ - (bool)initializeMagnetometer
   [_motionManager
       startMagnetometerUpdatesToQueue:[NSOperationQueue mainQueue]
                           withHandler:^(CMMagnetometerData *sensorData, NSError *error) {
-                            double currentTime = [[NSProcessInfo processInfo] systemUptime];
+                            double currentTime = CACurrentMediaTime() * 1000;
                             if (currentTime - self->_lastTimestamp < self->_interval) {
                               return;
                             }
@@ -157,7 +157,7 @@ - (bool)initializeOrientation
   [_motionManager startDeviceMotionUpdatesUsingReferenceFrame:(1 << _referenceFrame)
                                                       toQueue:[NSOperationQueue mainQueue]
                                                   withHandler:^(CMDeviceMotion *sensorData, NSError *error) {
-                                                    double currentTime = [[NSProcessInfo processInfo] systemUptime];
+                                                    double currentTime = CACurrentMediaTime() * 1000;
                                                     if (currentTime - self->_lastTimestamp < self->_interval) {
                                                       return;
                                                     }

from react-native-reanimated.

levancho avatar levancho commented on June 11, 2024 4

@dan-trewin easy boi, this is open source software so instead of ranting open a PR and try to fix the issue.

i dont think he is ranting.. and as opposed to you, who acts like a cyber-judge he at least spent time on research and posted his findings here, and further more, your statment that its opensource means nothing... when library claims
that its "better than native animation " , people trust that and when SHTF like this, you , the author first of all have to take the responsibility, so from that angle he is also correct ... so why dont you, instead of judging people go ahead and open a PR??

from react-native-reanimated.

felixmueller-cnnctvstn avatar felixmueller-cnnctvstn commented on June 11, 2024 3

Same error here... crashes when navigating to other screens. I am not using this library, but its a dependency of react-native-reanimated-carousel, which I am also only using in one component deep down...

react-native-reanimated@^3.8.1:
  version "3.9.0"
image

tmp fix => downgrading to ~3.8.1

from react-native-reanimated.

erez-unitronics avatar erez-unitronics commented on June 11, 2024 3

React native 0.74.1 solved this problem for me.
(with v3.10.0)

from react-native-reanimated.

ferasabufares avatar ferasabufares commented on June 11, 2024 2

same problem !!!

"react-native": "^0.74.0",

so for ios
this will work react-native-reanimated@^3.8.1

and for android
this will work [email protected]

but this is not a solution can someone provide a better solution for this problem please

from react-native-reanimated.

efstathiosntonas avatar efstathiosntonas commented on June 11, 2024 2

@dan-trewin easy boi, this is open source software so instead of ranting open a PR and try to fix the issue.

from react-native-reanimated.

tomekzaw avatar tomekzaw commented on June 11, 2024 2

PR with a temporary fix:

from react-native-reanimated.

levancho avatar levancho commented on June 11, 2024 1

i am also getting same , as soon as user logs into the application app crashes ... same happens if i run from xcode or install it via testflight...

i can not provide access to code since its private project, and obviously its impossible to create reproducible snack, due to complexity of the project.. ..

i used to use 3.6.x version of reanimated, upgraded to latest 3.9 today but still getting same error.

here is the stack :

Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
#0	0x0000000104aa7204 in -[REAAnimationsManager clearSharedTransitionConfigForTag:] at /Users/levancho/dev/xxxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REAAnimationsManager.m:622
#1	0x0000000104aec014 in -[REASharedTransitionManager clearAllSharedConfigsForViewTag:] at /Users/levancho/dev/xxxxxnode_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:743
#2	0x0000000104aec8dc in __51-[REASharedTransitionManager clearConfigForScreen:]_block_invoke at /Users/levancho/dev/xxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:818
#3	0x0000000104aa282c in REANodeFind at /Users/levancho/dev/xxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REAAnimationsManager.m:18
#4	0x0000000104aec850 in -[REASharedTransitionManager clearConfigForScreen:] at /Users/levancho/dev/xxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:817
#5	0x0000000104aeabf0 in -[REASharedTransitionManager runSharedTransitionForSharedViewsOnScreen:isInteractive:withOffsetX:withOffsetY:] at /Users/levancho/dev/xxxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:578
#6	0x0000000104ae9ff0 in -[REASharedTransitionManager screenRemovedFromStack:withOffsetX:withOffsetY:] at /Users/levancho/dev/xxxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:471
#7	0x0000000104ae9d4c in -[REASharedTransitionManager reanimated_viewIsAppearing:] at /Users/levancho/dev/xxxxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:442
#8	0x00000001a17fec38 in -[UIViewController __viewIsAppearing:skipWindowCheck:] ()

from react-native-reanimated.

levancho avatar levancho commented on June 11, 2024 1

downgrading to 2.17 solved the poblem for me.

from react-native-reanimated.

tomekzaw avatar tomekzaw commented on June 11, 2024 1

Workaround: import something from react-native-reanimated so that the library gets initialized correctly

import Animated from 'react-native-reanimated';

console.log(Animated); // make sure to use the imported thing, otherwise the import will be optimized away

from react-native-reanimated.

github-actions avatar github-actions commented on June 11, 2024

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

from react-native-reanimated.

levancho avatar levancho commented on June 11, 2024

more investigative info I have is that, screen that seens to be crashing is using following animation code :

const animated = new Animated.Value(Dimensions.get('window').width);
  const duration = 5000;
  useEffect(() => {
    Animated.timing(animated, {
      toValue: 0,
      duration: 500,
      easing: Easing.linear,
      useNativeDriver: true,
    }).start();

  }, [isNotificationSettingsAdded, isLocationPermissionGranted]);

but this code is very old and we have not touched it for a loooong time.

from react-native-reanimated.

Vladimirrr666 avatar Vladimirrr666 commented on June 11, 2024

same problem

from react-native-reanimated.

KazakovVS avatar KazakovVS commented on June 11, 2024

Having the same problem

Crashed: com.apple.main-thread
0  App                     0x19aa78 -[REAAnimationsManager clearSharedTransitionConfigForTag:] + 622 (REAAnimationsManager.m:622)
1  App                     0x1a627c -[REASharedTransitionManager clearAllSharedConfigsForViewTag:] + 743 (REASharedTransitionManager.m:743)
2  App                     0x1a67b0 __51-[REASharedTransitionManager clearConfigForScreen:]_block_invoke + 818 (REASharedTransitionManager.m:818)
3  App                     0x1980cc REANodeFind + 18 (REAAnimationsManager.m:18)
4  App                     0x1a6774 -[REASharedTransitionManager clearConfigForScreen:] + 821 (REASharedTransitionManager.m:821)
5  App                     0x1a55b4 -[REASharedTransitionManager runSharedTransitionForSharedViewsOnScreen:isInteractive:withOffsetX:withOffsetY:] + 582 (REASharedTransitionManager.m:582)
6  App                     0x1a4ee8 -[REASharedTransitionManager screenRemovedFromStack:withOffsetX:withOffsetY:] + 486 (REASharedTransitionManager.m:486)
7  App                     0x1a4d48 -[REASharedTransitionManager reanimated_viewIsAppearing:] + 442 (REASharedTransitionManager.m:442)
8  UIKitCore                      0x13cd3c -[UIViewController __viewIsAppearing:skipWindowCheck:] + 148
9  UIKitCore                      0x327b8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1076
10 QuartzCore                     0x66aa8 CA::Layer::layout_if_needed(CA::Transaction*) + 500
11 QuartzCore                     0x66630 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144
12 QuartzCore                     0x6cb60 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 464
13 QuartzCore                     0x65e3c CA::Transaction::commit() + 648
14 QuartzCore                     0x65ae4 CA::Transaction::flush_as_runloop_observer(bool) + 88
15 UIKitCore                      0xaaccc _UIApplicationFlushCATransaction + 52
16 UIKitCore                      0xaa7e4 _UIUpdateSequenceRun + 84
17 UIKitCore                      0xa9ed4 schedulerStepScheduledMainSection + 144
18 UIKitCore                      0xa9f90 runloopSourceCallback + 92
19 CoreFoundation                 0x3712c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
20 CoreFoundation                 0x363a8 __CFRunLoopDoSource0 + 176
21 CoreFoundation                 0x34b5c __CFRunLoopDoSources0 + 244
22 CoreFoundation                 0x33898 __CFRunLoopRun + 828
23 CoreFoundation                 0x33478 CFRunLoopRunSpecific + 608
24 GraphicsServices               0x34f8 GSEventRunModal + 164
25 UIKitCore                      0x22c62c -[UIApplication _run] + 888
26 UIKitCore                      0x22bc68 UIApplicationMain + 340
27 App                     0x8184 main + 8 (main.m:8)
28 ???                            0x1bdb92dcc (Missing)

Reanimated version
3.9.0

React Native version
0.74

Platforms
iOS

from react-native-reanimated.

KazakovVS avatar KazakovVS commented on June 11, 2024

Same error here... crashes when navigating to other screens. I am not using this library, but its a dependency of react-native-reanimated-carousel, which I am also only using in one component deep down...

react-native-reanimated@^3.8.1:
  version "3.9.0"
image tmp fix => downgrading to ~3.8.1

Downgrade didn’t work for me, the app is still crashing while navigating.

from react-native-reanimated.

pernestrand avatar pernestrand commented on June 11, 2024

Same error here... crashes when navigating to other screens. I am not using this library, but its a dependency of react-native-reanimated-carousel, which I am also only using in one component deep down...

react-native-reanimated@^3.8.1:
  version "3.9.0"
image tmp fix => downgrading to ~3.8.1

Can confirm downgrading from 3.9.0 => ~3.8.1 worked.

from react-native-reanimated.

felixmueller-cnnctvstn avatar felixmueller-cnnctvstn commented on June 11, 2024

Downgrade didn’t work for me, the app is still crashing while navigating.

@KazakovVS try to remove and add node_modules folder and run bundle exec pod deintegrate && bundle exec pod install --repo-update in ios folder

from react-native-reanimated.

DnEgorWeb avatar DnEgorWeb commented on June 11, 2024

Also happens for 3.10.0
Indeed react-native 0.74.0 is compatible with <=3.8.1 (iOS) and with >=3.9.0 (Android), which basically makes react-native 0.74.0 incompatible with the library

from react-native-reanimated.

SyntaxError843 avatar SyntaxError843 commented on June 11, 2024

doesn't ^3.8.1 also include 3.10.0?

from react-native-reanimated.

jordank195 avatar jordank195 commented on June 11, 2024

I also have the same issue. I'm not using expo, but I tried the suggestion of importing reanimated into index.js; this still didn't fix the problem.

from react-native-reanimated.

ferasabufares avatar ferasabufares commented on June 11, 2024

same problem !!!

"react-native": "^0.74.0",

so for ios this will work react-native-reanimated@^3.8.1

and for android this will work [email protected]

but this is not a solution can someone provide a better solution for this problem please

any update on this ?

also tried "3.10.0" and it is crash on ios

image

from react-native-reanimated.

tomekzaw avatar tomekzaw commented on June 11, 2024

I was able to reproduce this issue on 81c4130.

Recording
Screen.Recording.2024-05-05.at.14.28.27.mov

Steps to reproduce

  1. Install @react-navigation/bottom-tabs:
cd Example
yarn add @react-navigation/bottom-tabs
  1. Paste the following repro in Example/App.tsx:
Example/App.tsx
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import React from 'react';

const Stack = createNativeStackNavigator();

const Tab = createBottomTabNavigator();

function Feed() {
  return null;
}

function Messages() {
  return null;
}

function Profile() {
  return null;
}

function Settings() {
  return null;
}

function Home() {
  return (
    <Tab.Navigator>
      <Tab.Screen name="Feed" component={Feed} />
      <Tab.Screen name="Messages" component={Messages} />
    </Tab.Navigator>
  );
}

export default function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen
          name="Home"
          component={Home}
          options={{headerShown: false}}
        />
        <Stack.Screen name="Profile" component={Profile} />
        <Stack.Screen name="Settings" component={Settings} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}
  1. Navigate to second tab
  2. Navigate back to first tab
  3. Crash

from react-native-reanimated.

tomekzaw avatar tomekzaw commented on June 11, 2024

Bumped Example app to [email protected], still crashing

from react-native-reanimated.

efstathiosntonas avatar efstathiosntonas commented on June 11, 2024

@dan-trewin easy boi, this is open source software so instead of ranting open a PR and try to fix the issue.

i dont think he is ranting.. and as opposed to you, who acts like a cyber-judge he at least spent time on research and posted his findings here, and further more, your statment that its opensource means nothing... when library claims that its "better than native animation " , people trust that and when SHTF like this, you , the author first of all have to take the responsibility, so from that angle he is also correct ... so why dont you, instead of judging people go ahead and open a PR??

@levancho you definitely need to redefine the term open source in your head, specially the last paragraph of the MIT license.

from react-native-reanimated.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.