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

Infinite Loop in ‎TopDownFormatter::FormatOnAreas #185

Open
mnadeem-mercedes-hpp opened this issue Oct 14, 2024 · 1 comment
Open

Infinite Loop in ‎TopDownFormatter::FormatOnAreas #185

mnadeem-mercedes-hpp opened this issue Oct 14, 2024 · 1 comment
Labels
bug Something isn't working investigation Under investigation

Comments

@mnadeem-mercedes-hpp
Copy link

mnadeem-mercedes-hpp commented Oct 14, 2024

The loop in ‎TopDownFormatter::FormatOnAreas has the tendency to become an infinite loop in some cases.

This deadly loop caused our web farm to go down and cause great inconvenience.

Steps to Reproduce the Behavior

Please run the MigraDoc solution
Issue.zip

It would be nice to have a cancellation token in methods with dynamic loops - A cancellation token in this method would have allowed me to detect and stop the infinite loop to save the application on runtime.

I have stopped using this plugin in the application I am currently working on, however I would like to use it again in the future once it gets stable.

@ThomasHoevel ThomasHoevel added bug Something isn't working investigation Under investigation labels Oct 18, 2024
@ThomasHoevel
Copy link
Member

We fixed that infinite loop in the current internal build and fix will be included in the next Preview release.

We will not add a cancellation token in the foreseeable future.

Cause of the problem was a single paragraph with three large images that was too large to fit a single page. While this should not cause an infinite loop, it still is an unusual situation and thus the bug remained unfound for such a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working investigation Under investigation
Projects
None yet
Development

No branches or pull requests

2 participants