-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
rendering a w3cdom document : infinite loop creation of TableCellBox #466
Comments
Hi @AlexisCothenet, This bug is very concerning as it involves text breaking. I was able, after much trial and error, to reduce your test case to the following (no Jsoup needed): <table style="width: 3px;table-layout: fixed;">
<tr>
<td colspan="2"></td>
<td style="word-wrap: break-word;">ABC</td>
</tr>
</table> Now I have narrowed it down to fixed table layout with colspan (or rowspan) and break-word, I'll try to find the root cause and fix it. As always, thanks for reporting. |
hi @danfickle , it continue to loop inside https://github.com/danfickle/openhtmltopdf/blob/open-dev-v1/openhtmltopdf-core/src/main/java/com/openhtmltopdf/layout/InlineBoxing.java#L160 . It continue to try to handle the "ABC" string.
|
Well, this is embarrassing... It turns out that replicating is simple as:
Ie. Any zero width box with content and And yes, I should have tested this edge case when implementing Thanks everyone. |
Hello @danfickle , Is a release is planned soon for this problem ? |
Hello,
I found an OOM but cannot understand the reason. It seems there is a cascade of TableCellBox created using this html (i tried to keep it small but i seems the number of td inside the first tr is mandatory and the 2 others tr as well...) :
The version of htmltopdf used is 1.0.2 (jsoup 1.13.1).
Here is the snapshot of the profiler heap dump analysis.

The text was updated successfully, but these errors were encountered: