HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › Out of memory when ResourceProvider throws an IIOException
- This topic has 4 replies, 2 voices, and was last updated Nov 23, 2016
16:40:19 byPD4ML.
-
AuthorPosts
-
October 28, 2016 at 09:14#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)November 17, 2016 at 08:37November 17, 2016 at 16:14#29944How big is the original image (dimensions, file size)? What are the dimensions after the resizing?
November 22, 2016 at 19:58#29945Problem 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
November 23, 2016 at 16:40#29946Please check my email reply.
-
AuthorPosts
The forum ‘Troubleshooting’ is closed to new topics and replies.
