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

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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,
    Viktor

    #29929

    Reproduced. The issue processing scheduled to the next week.

    #29930

    Cool, thank you!

    #29931

    Just 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.

    #29932

    I just noticed that the fx2 version is out, we’ll give it a try.

    #29933

    The 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?

    #29934

    The issue is solved with 3100. Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.