HTML to PDF / DOCX / RTF Java converter library Forums PD4ML v3 Archived Forums (Read Only) Troubleshooting Out of memory when ResourceProvider throws an IIOException

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27105

    We implemented a custom ResourceProvider that load images then resize them to fit our required size

    In some special use case, when resize failed a javax.imageio.IIOException is thrown then it causes PD4ML to run into Out Of Memory (Tested with JVM 2Gb)

    It seems due to an infinite loop

    Dump shows millions of instances org.zefer.html.doc.view.b

    Thread stack is :
    at java.util.Arrays.copyOf([Ljava/lang/Object;I)[Ljava/lang/Object; (Arrays.java:3181)
    at java.util.ArrayList.toArray()[Ljava/lang/Object; (ArrayList.java:376)
    at org.zefer.html.doc.view.i$_b.o00000(I)I (Unknown Source)
    at org.zefer.html.doc.view.i.Õ00000(I)I (Unknown Source)
    at org.zefer.html.doc.db.o00000(IZ)I (Unknown Source)
    at org.zefer.html.doc.db.ÖÒ0000(I)I (Unknown Source)
    at org.zefer.html.doc.db.o00000(ILorg/zefer/html/doc/view/b;)Lorg/zefer/html/doc/view/b; (Unknown Source)
    at org.zefer.html.doc.db.o00000(Lorg/zefer/html/util/d;I)V (Unknown Source)
    at org.zefer.html.doc.view.d.o00000(Lorg/zefer/html/doc/h;Lorg/zefer/html/util/d;I)V (Unknown Source)
    at org.zefer.html.doc.db.o00000(Lorg/zefer/html/util/d;I)V (Unknown Source)
    at org.zefer.html.doc.view.d.o00000(Lorg/zefer/html/doc/h;Lorg/zefer/html/util/d;I)V (Unknown Source)
    at org.zefer.html.doc.db.o00000(Lorg/zefer/html/util/d;I)V (Unknown Source)
    at org.zefer.html.doc.view.d.o00000(Lorg/zefer/html/doc/h;Lorg/zefer/html/util/d;I)V (Unknown Source)
    at org.zefer.html.doc.db.o00000(Lorg/zefer/html/util/d;I)V (Unknown Source)
    at org.zefer.html.doc.Document.layout(I)V (Unknown Source)
    at org.zefer.pd4ml.PD4ML.o00000()V (Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Ljava/io/StringReader;Ljava/io/OutputStream;)V (Unknown Source)

    #29943

    Hi,
    do you have some news ?

    Thanks

    #29944

    How big is the original image (dimensions, file size)? What are the dimensions after the resizing?

    #29945

    Problem is not with the resize part: in fact the resize failed because source is not found for example. But the problem occurs after that: when our custom code throws an exception, then PD4ML code runs into out of memory

    #29946

    Please check my email reply.

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

The forum ‘Troubleshooting’ is closed to new topics and replies.