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

When traversing the DOM during SetChanged track the depth to avoid StackOverflowException #500

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johnkarbonhq
Copy link

Pretty rough, sorry - just trying to highlight #499

@JonathanMagnan JonathanMagnan self-assigned this May 31, 2023
@JonathanMagnan
Copy link
Member

Hello @johnkarbonhq ,

Thank you for the branch, my developer will look at it as well.

@JonathanMagnan
Copy link
Member

Hello @johnkarbonhq ,

As answered here; #499

We currently cannot reproduce the issue with the example you provided. If you can provide an issue that this code fix, we will surely look at it again.

Best Regards,

Jon

@pleilleur
Copy link

pleilleur commented Jun 7, 2023

Hello Jon,

I also faced this problem, with a HTML file that has some HTML parsing "traps". The file has a lot of information enclosed in angle brackets, which from a HTML perspective are opening tags. However these tags don't make sense, they are not HTML void elements, and with a large number of those in the HTML documents (>10K) you can reach the StackOverflowException.

I have attached a sample I created to reproduce the issue.

SetChanged-StackOverflowException-500.txt

Let me know if I can help,

Laurent

@pleilleur
Copy link

pleilleur commented Jun 12, 2023

I have looked around the files and found the variable OptionMaxNestedChildNodes, which solved the problem for me. I'm not sure how this is different from _maxDepthLevel though ?

@johnkarbonhq Have you tried that ?

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

Successfully merging this pull request may close these issues.

3 participants