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

BUG CRASH: Maximum call stack size exceeded (native stack depth) #278

Open
fukemy opened this issue May 19, 2023 · 3 comments
Open

BUG CRASH: Maximum call stack size exceeded (native stack depth) #278

fukemy opened this issue May 19, 2023 · 3 comments

Comments

@fukemy
Copy link

fukemy commented May 19, 2023

Hi, I have nested navigator like this:

const PollStack = () => {
    return <Stack.Navigator>
      <Stack.Screen name='PollScreen' component={PollScreen} options={{ ...defaultNavProps }}/>
      <Stack.Screen name='CreatePollConfig' component={CreatePollConfigScreen} options={{ ...defaultNavProps }}/>
    </Stack.Navigator>
  }

here is main navigator:

<NavigationContainer ref={RootNavigation.navigationRef}
                          onReady={() => {
                            SplashScreen.hide()
                            RootNavigation.isReadyRef.current = true
                          }}>
                          <Host>
                            <Stack.Navigator>
                                <>
                                  <Stack.Screen name='PollStack' component={PollStack}
                                    options={{
                                      ...defaultNavProps,
                                      presentation: 'fullScreenModal',
                                      headerShown: false
                                    }} />
                                <>
                            </Stack.Navigator>
                          </Host>
</NavigationContainer>

here is navigation call method:

 RootNavigation.push('MyNoteStack', {
          screen: 'MyNoteScreen'
        })

=> navigationRef.current.dispatch(StackActions.push(name, params)) //RootNavigation

then I got crash:

 ERROR  RangeError: Maximum call stack size exceeded (native stack depth)

This error is located at:
    in SharedElementSceneView (at SceneView.tsx:132)
    in StaticContainer
    in EnsureSingleNavigator (at SceneView.tsx:124)
    in SceneView (at useDescriptors.tsx:217)
    in RCTView (at View.js:32)
    in View (at DebugContainer.native.tsx:27)
    in DebugContainer (at NativeStackView.native.tsx:76)
    in MaybeNestedStack (at NativeStackView.native.tsx:247)
    in RNSScreen (at createAnimatedComponent.js:211)
    in AnimatedComponent (at createAnimatedComponent.js:264)
    in AnimatedComponentWrapper (at src/index.native.tsx:281)
    in MaybeFreeze (at src/index.native.tsx:280)

...

Please help

@fukemy
Copy link
Author

fukemy commented May 19, 2023

when revert back to const Stack = createNativeStackNavigator(), everything work ok

@serp1412
Copy link

I'm having the same problem. Please help

@fukemy
Copy link
Author

fukemy commented Mar 15, 2024

I'm having the same problem. Please help

remove this dead lib then use reanimated-shared-element

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants