Viewing 1 post (of 1 total)
  • Author
    Posts
  • #27204

    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:

    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

Viewing 1 post (of 1 total)

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