The problem appears when moving from one dialog to another many times or even when looping in the same dialog. After looping in the same dialog 9 times with many prompts inside it. An error raiesd from "OnTurnError"
value:"The reader's MaxDepth of 64 has been exceeded. Path 'DialogState.dialogStack.$values\[0\].
state.dialogs.dialogStack.$values\[0\].state.dialogs.dialogStack.$values\[0\].state.dialogs.dialogStack.$values\[0\].s
tate.dialogs.dialogStack.$values\[0\].state.dialogs.dialogStack.$values\[0\].state.dialogs.dialogStack.$values\[0\].
state.dialogs.dialogStack.$values\[0\].state.dialogs.dialogStack.$values\[0\].state.dialogs.dialogStack.$values\[0\].
state.dialogs.dialogStack.$values\[0\].state.dialogs.dialogStack.$values\[0\].state.options.Prompt.attachments.$values'."
I tried to empty the stack, change the MaxDepth but nothing changed. Is there any way to manage a long conversation with many prompts without getting this error.
When I pass dialog Id paramter for ReplaceDialogAsync method that starts the loop with InitialDialogId which is equals to nameof(WaterfallDialog) instead of nameof(ReviewSelectionDialog) which is the name of dialog that I want to repeat, the bot runs properly. But I still don't know why the new code works properly!