Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App is crashing when I use with react-navigation-bottom-tabs and native-stack #6222

Closed
RalissonMattias opened this issue Jul 8, 2024 · 3 comments · Fixed by #6286
Closed
Assignees
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@RalissonMattias
Copy link

Description

When I navigate between tabs the application crashes

Screen.Recording.2024-07-07.at.22.19.43.mov

Logs:

0   CoreFoundation                	       0x18049111c __exceptionPreprocess + 160
1   libobjc.A.dylib               	       0x18008412c objc_exception_throw + 56
2   Foundation                    	       0x180d11770 -[NSMutableDictionary(NSMutableDictionary) classForCoder] + 0
3   reanimatedWithBottomTabsTest  	       0x10496cf34 -[RCTViewComponentView unmountChildComponentView:index:] + 560 (RCTViewComponentView.mm:136)
4   reanimatedWithBottomTabsTest  	       0x104341614 -[RNSScreenView unmountChildComponentView:index:] + 244 (RNSScreen.mm:701)
5   reanimatedWithBottomTabsTest  	       0x1048c4f3c RCTPerformMountInstructions(std::__1::vector<facebook::react::ShadowViewMutation, std::__1::allocator<facebook::react::ShadowViewMutation>> const&, RCTComponentViewRegistry*, RCTMountingTransactionObserverCoordinator&, int) + 1344 (RCTMountingManager.mm:101)
6   reanimatedWithBottomTabsTest  	       0x1048c49f0 -[RCTMountingManager performTransaction:]::$_1::operator()(facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) const + 80 (RCTMountingManager.mm:275)
7   reanimatedWithBottomTabsTest  	       0x1048c4994 decltype(std::declval<-[RCTMountingManager performTransaction:]::$_1&>()(std::declval<facebook::react::MountingTransaction const&>(), std::declval<facebook::react::SurfaceTelemetry const&>())) std::__1::__invoke[abi:v160006]<-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&>(-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 40 (invoke.h:394)
8   reanimatedWithBottomTabsTest  	       0x1048c493c void std::__1::__invoke_void_return_wrapper<void, true>::__call<-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&>(-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 40 (invoke.h:488)
9   reanimatedWithBottomTabsTest  	       0x1048c4908 std::__1::__function::__alloc_func<-[RCTMountingManager performTransaction:]::$_1, std::__1::allocator<-[RCTMountingManager performTransaction:]::$_1>, void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)>::operator()[abi:v160006](facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 44 (function.h:185)
10  reanimatedWithBottomTabsTest  	       0x1048c3774 std::__1::__function::__func<-[RCTMountingManager performTransaction:]::$_1, std::__1::allocator<-[RCTMountingManager performTransaction:]::$_1>, void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)>::operator()(facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 44 (function.h:356)
11  reanimatedWithBottomTabsTest  	       0x1046fa2ac std::__1::__function::__value_func<void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)>::operator()[abi:v160006](facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) const + 84 (function.h:510)
12  reanimatedWithBottomTabsTest  	       0x1046f9364 std::__1::function<void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)>::operator()(facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) const + 40 (function.h:1156)
13  reanimatedWithBottomTabsTest  	       0x1046f91c0 facebook::react::TelemetryController::pullTransaction(std::__1::function<void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)> const&, std::__1::function<void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)> const&, std::__1::function<void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)> const&) const + 292 (TelemetryController.cpp:39)
14  reanimatedWithBottomTabsTest  	       0x1048bed38 -[RCTMountingManager performTransaction:] + 480 (RCTMountingManager.mm:267)
15  reanimatedWithBottomTabsTest  	       0x1048beb28 -[RCTMountingManager initiateTransaction:] + 372
16  reanimatedWithBottomTabsTest  	       0x1048be53c __42-[RCTMountingManager scheduleTransaction:]_block_invoke + 324 (RCTMountingManager.mm:209)
17  reanimatedWithBottomTabsTest  	       0x1045053d4 __RCTExecuteOnMainQueue_block_invoke + 40 (RCTUtils.m:280)
18  libdispatch.dylib             	       0x18016b4f4 _dispatch_call_block_and_release + 24
19  libdispatch.dylib             	       0x18016cd3c _dispatch_client_callout + 16
20  libdispatch.dylib             	       0x18017bb24 _dispatch_main_queue_drain + 1272
21  libdispatch.dylib             	       0x18017b61c _dispatch_main_queue_callback_4CF + 40
22  CoreFoundation                	       0x1803f1a30 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
23  CoreFoundation                	       0x1803ec148 __CFRunLoopRun + 1936
24  CoreFoundation                	       0x1803eb5a4 CFRunLoopRunSpecific + 572
25  GraphicsServices              	       0x18e9fbae4 GSEventRunModal + 160
26  UIKitCore                     	       0x1852f02e4 -[UIApplication _run] + 868
27  UIKitCore                     	       0x1852f3f5c UIApplicationMain + 124
28  reanimatedWithBottomTabsTest  	       0x1041290cc main + 96 (main.m:8)
29  dyld_sim                      	       0x10781d544 start_sim + 20
30  dyld                          	       0x10721e0e0 start + 2360
31  ???                           	0x8151000000000000 ???

Steps to reproduce

  1. Click in the tab option to navigate to the screen with Animated.View
  2. Click in another tab

Snack or a link to a repository

https://github.com/RalissonMattias/reanimatedWithBottomTabsTest

Reanimated version

3.13.0

React Native version

0.74.3

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Fabric (New Architecture)

Build type

Debug app & dev bundle

Device

iOS simulator

Device model

Iphone 15 Pro

Acknowledgements

Yes

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snippet of code, snack or repo is provided labels Jul 8, 2024
@szydlovsky
Copy link
Contributor

@RalissonMattias the issue doesn't seem to be connected to reanimated whatsoever - neither the use case, nor the logs.

@RalissonMattias
Copy link
Author

@szydlovsky Please evaluate the problem carefully, when I return to v3.12.1 the problem does not happen.

@szydlovsky szydlovsky reopened this Jul 10, 2024
@chrisnojima
Copy link

I also have the same issue. going to 3.14 to 3.13 it crashes but 3.12.1 works fine

@bartlomiejbloniarz bartlomiejbloniarz self-assigned this Jul 16, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 25, 2024
## Summary

This PR changes the way Remove mutations are parsed in
`LayoutAnimationsProxy::pullTransaction`. Before there was an assumption
that parent removals will be later on the list than removals of their
children. This is not accurate when a view is reparented. This
assumption meant that we could recognize "root" nodes (basically entry
point for exiting animations) while processing them. Now this part of
logic has to be calculated after all Remove mutations are parsed

fixes #6222

## Test plan
Check `[LA]` examples for regresions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants