HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › ClassCastException with endless loop in PDF page generation
- This topic has 6 replies, 2 voices, and was last updated Dec 14, 2016
08:51:22 by vk_iconparc.
-
AuthorPosts
-
September 28, 2016 at 07:56#27099
Hello,
we have experienced a problem with an endless loop occurring on specific HTML (see below). Eventually the thread dies on memory exhaustion.Please find the trigger/symptom description below. We would be grateful for a quick fix as the problem is currently affecting us on our live system.
Causing versions: from 3.9.9. Version 3.9.8fx5 does not exhibit that behavior yet.
The triggering HTML is as follows:
<br /> <html lang="de"><br /> <body><br /> <table><br /> <tr><br /> <td><br /> <span style="display:none;"><br /> <a style="display:block;" ><br /> <span style="float: left;"></span><br /> </a><br /> </span><br /> <span style="display:none;"><br /> </span><br /> </td><br /> <td><br /> </td><br /> </tr><br /> </table><br /> </body><br /> </html><br />
In the endless loop situation, the code position seems to be this one:
<br /> java.util.zip.Deflater.deflateBytes(Native Method)<br /> java.util.zip.Deflater.deflate(Deflater.java:444)<br /> java.util.zip.Deflater.deflate(Deflater.java:385)<br /> org.zefer.pd4ml.pdf.f.o00000(Unknown Source)<br /> org.zefer.pd4ml.pdf.c.õO0000(Unknown Source)<br /> org.zefer.pd4ml.pdf.c.ÓÓ0000(Unknown Source)<br /> org.zefer.pd4ml.pdf.PD4Device.startNewPage(Unknown Source)<br /> org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> ...<br />
Before the endless loop begins, the following messages come in the console log:
<br /> TableCellElement(td) {display=table-cell}<br /> <br /> java.lang.ClassCastException: org.zefer.html.doc.b cannot be cast to org.zefer.html.doc.o<br /> at org.zefer.html.doc.r.ôØ0000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.öØ0000(Unknown Source)<br /> at org.zefer.html.doc.o.Ò00000(Unknown Source)<br /> at org.zefer.html.doc.o.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.Document.layout(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> ...<br /> TableCellElement(td) {display=table-cell}<br /> ContentElement(pd4content) [ ] {line-height=scale (1.2000000476837158), display=table-cell}<br /> <br /> java.lang.ClassCastException: org.zefer.html.doc.b cannot be cast to org.zefer.html.doc.o<br /> at org.zefer.html.doc.r.ôO0000(Unknown Source)<br /> at org.zefer.html.doc.q.o00000(Unknown Source)<br /> at org.zefer.html.doc.q.Öo0000(Unknown Source)<br /> at org.zefer.html.doc.q.float(Unknown Source)<br /> at org.zefer.html.doc.view.d.Ó00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.öØ0000(Unknown Source)<br /> at org.zefer.html.doc.o.Ò00000(Unknown Source)<br /> at org.zefer.html.doc.o.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.Document.layout(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> ...<br /> TableCellElement(td) {display=table-cell}<br /> <br /> java.lang.ClassCastException: org.zefer.html.doc.b cannot be cast to org.zefer.html.doc.o<br /> at org.zefer.html.doc.r.ôØ0000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.Object(Unknown Source)<br /> at org.zefer.html.doc.o.Ò00000(Unknown Source)<br /> at org.zefer.html.doc.o.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.Document.layout(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> ...<br /> TableCellElement(td) {display=table-cell}<br /> ContentElement(pd4content) [ ] {line-height=scale (1.2000000476837158), display=table-cell}<br /> <br /> java.lang.ClassCastException: org.zefer.html.doc.b cannot be cast to org.zefer.html.doc.o<br /> at org.zefer.html.doc.r.ôO0000(Unknown Source)<br /> at org.zefer.html.doc.q.o00000(Unknown Source)<br /> at org.zefer.html.doc.q.Öo0000(Unknown Source)<br /> at org.zefer.html.doc.q.float(Unknown Source)<br /> at org.zefer.html.doc.view.d.Ó00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.Object(Unknown Source)<br /> at org.zefer.html.doc.o.Ò00000(Unknown Source)<br /> at org.zefer.html.doc.o.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.Document.layout(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> ...<br /> TableCellElement(td) {display=table-cell}<br /> <br /> java.lang.ClassCastException: org.zefer.html.doc.b cannot be cast to org.zefer.html.doc.o<br /> at org.zefer.html.doc.r.ôØ0000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.o00000(Unknown Source)<br /> at org.zefer.html.doc.o.Ò00000(Unknown Source)<br /> at org.zefer.html.doc.o.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.Document.layout(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> ...<br /> TableCellElement(td) {display=table-cell}<br /> ContentElement(pd4content) [ ] {line-height=scale (1.2000000476837158), display=table-cell}<br /> <br /> java.lang.ClassCastException: org.zefer.html.doc.b cannot be cast to org.zefer.html.doc.o<br /> at org.zefer.html.doc.r.ôO0000(Unknown Source)<br /> at org.zefer.html.doc.q.o00000(Unknown Source)<br /> at org.zefer.html.doc.q.Öo0000(Unknown Source)<br /> at org.zefer.html.doc.q.float(Unknown Source)<br /> at org.zefer.html.doc.view.d.Ó00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.r.o00000(Unknown Source)<br /> at org.zefer.html.doc.o.Ò00000(Unknown Source)<br /> at org.zefer.html.doc.o.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.view.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.db.o00000(Unknown Source)<br /> at org.zefer.html.doc.Document.layout(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> ...<br />
Thank you, best regards,
ViktorSeptember 30, 2016 at 11:38#29929Reproduced. The issue processing scheduled to the next week.
October 5, 2016 at 09:17#29930Cool, thank you!
October 5, 2016 at 15:55#29931Just finished a testing. The issue has been fixed in the DEV build. If everything goes fine with QA, we’ll publish a maintenance version on Friday.
October 14, 2016 at 10:23#29932I just noticed that the fx2 version is out, we’ll give it a try.
November 7, 2016 at 13:45#29933The original problem seems gone now, but we have notice a very similar one, during the simplification of the HTML for another exception (I’ll post that one separately).
I have a HTML that causes an endless loop around the following stacktrace:
<br /> java.util.zip.Deflater.deflateBytes(Native Method)<br /> java.util.zip.Deflater.deflate(Deflater.java:444)<br /> java.util.zip.Deflater.deflate(Deflater.java:385)<br /> org.zefer.pd4ml.pdf.f.o00000(Unknown Source)<br /> org.zefer.pd4ml.pdf.c.õO0000(Unknown Source)<br /> org.zefer.pd4ml.pdf.c.ÓÓ0000(Unknown Source)<br /> org.zefer.pd4ml.pdf.PD4Device.startNewPage(Unknown Source)<br /> org.zefer.pd4ml.PD4ML.super(Unknown Source)<br /> org.zefer.pd4ml.PD4ML.render(Unknown Source)<br />
-> Since the simplification of the HTML is a time consuming task and multiple different exceptions occur at different simplification stages, I would much prefer to send you the HTML in a less stripped-down form without publishing the entire load.
Is there somewhere I could send you the HTML causing this problem?December 14, 2016 at 08:51#29934The issue is solved with 3100. Thank you!
-
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.