RasterFormatException: (y + height) is outside raster

This program crashes with RasterFormatException: (y + height) is outside raster

void setup() {
  size(900, 900);
  blendMode(LIGHTEST);
  line(20, 0, 20, 900);
}

Anyone else seeing this behavior? Removing blendMode or in P2D or with values <= 898 in line it works fine.

I can’t seem to be able to replicate the issue, is that your full code?

That’s the full code. It may be related to my system (I’m on ArchLinux, using the Arch Processing package, with Intel graphics, and I think it runs on OpenJDK instead of using Oracle’s Java). Normally it all works :slight_smile:

I’m just looking at old sketches and noticed this, but it’s fine as switching to P2D solves the issue. I wanted to know if it’s a general issue before posting an issue to GitHub. Thanks!

In the Processing IDE, try going to Tools > Install “processing-java”. When you try running your sketch after does the error happen?

I don’t see that option:
tools

Thanks for the tip! I know the Processing team recommends installing Processing from their website. The version I use is not built by the Processing team, so maybe that’s the issue. For me it’s just more convenient because rusning one command (sudo pacman -Syuv) all my programs including Processing get updated, so I will stick to that for now :slight_smile:

Update: I downloaded the official Processing and I got the same issue with it. Maybe it’s something else particular to my system. Maybe someone else could try on Linux or with Intel graphics… @neilcsmith ?

Weird! Sounds like a bug in the custom software composite but surprised it isn’t on all platforms. Be interesting to see the stack trace of that exception.

@hamoid interestingly, this works -

void setup() {
  size(900, 900);
  smooth(0);
  blendMode(LIGHTEST);
  line(20, 0, 20, 900);
}

This seems to be caused by the rendering in Java2D trying to accommodate an extra pixel for anti-aliasing shapes. There are a few bug reports in OpenJDK about it, but nothing referencing the Oracle JDK. The JDK’s are now identical, but in Java 8 the OpenJDK and Oracle JDK have different rendering rasterizers (Pisces vs Ductus - they’re now both using the open-source Marlin)

fyi - https://bugs.openjdk.java.net/browse/JDK-8048782

1 Like