-
Notifications
You must be signed in to change notification settings - Fork 125
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
Can't parse this code, waiting for a long, long time #138
Comments
Another piece of code has the same problem
|
Temporarily use a simple solution to solve this bug |
Here is another example (simplified from a much larger CSS) I just ran into:
Granted, this is malformed because of the missing
My use case is processing crappy HTML embedded in old emails, so I have no choice but to try and deal with this malformed junk. I'm going to try using the ParseAsync version, so I can bail after a few milliseconds if it seems to be stuck. Well, this is disappointing, the ParseAsync gets hung up just like the Parse Function:
For anyone else who just needs to get past this, log the error and keep going, here is a (possibly very bad) way:
My concern with the above is that after the timeout, the Parse task will continue to run in the background forever until your app stops, so use caution, especially if many instances of this task might be spun up and never finish ..... |
It shouldn't run forever given you only have so many stack frames before the process will overflow. Regardless, I'll look at whether the depth guard can be used in this scenario. |
Made a Pull Request that Fixes this Because I experienced it too. |
The text was updated successfully, but these errors were encountered: