Skip to content

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

Open

Description

@fukemy

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

Activity

  1. fukemy commented on May 19, 2023

    @fukemy
    Author

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

  2. serp1412 commented on Mar 14, 2024

    @serp1412

    I'm having the same problem. Please help

  3. fukemy commented on Mar 15, 2024

    @fukemy
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions