PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: PD4ML hanging forever with "broken" PNG image
   PostPosted: 03 Dec 2018, 13:02 
Hi!

Referring to an older subject pdf-generation-troubleshooting-f4/broken-png-image-file-hangs-pd4ml-generator-forever-t650.html

We see this kind of problems still (or again)?

There is code i PD4ML that gets the size of an image, and if width is < 0, it waits 10 ms and then tries again.

Forever...

In our web app, this happens regularly. Probably this is with a PNG image that Java considers bad in some way.

The code (disassembled obfuscated code) looks like this:

Code:
public final PixelGrabber new(int var1) {
            int var2 = this.Ö00000.getHeight(this.ø00000);
            int var3 = this.Ö00000.getWidth(this.ø00000);

            while(var2 < 0) {
                var2 = this.Ö00000.getHeight(this.ø00000);
                var3 = this.Ö00000.getWidth(this.ø00000);
                if (this.ÒO0000 != null && this.ÒO0000.length() > 4 && this.ÒO0000.substring(0, 5).toLowerCase().equals("data:")) {
                    var2 = 1;
                    var3 = 1;
                    this.Ö00000 = new BufferedImage(1, 1, 2);
                    break;
                }

                try {
                    Thread.sleep(10L);
                } catch (InterruptedException var14) {
                    ;
                }
            }


The inifinte loop here is the problem. I see two problems here, one beeing the infinite loop, the other being that it ignores the InterruptedException.

You should probablty give up here and just add a "broken image" after a number of iterations?

Please advise, can we trust PD4ML to handle this some way, or do we need to change to another library?

Best regards,
Palle Girgensohn



[Reply]     [ 1 post ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share