JVips
JVips copied to clipboard
Potential memory leak
We are testing JVips as mainly a jpeg thumbnail processor. So far we only pass a java byte[]
array, as we already hold this on the heap.
This is roughly what we do:
byte[] contents = thumb.getBlob();
try (VipsImage image = new VipsImage(contents, contents.length)) {
...
image.colorspace(Srgb)
image.thumbnail(...)
image.autorot();
var output = image.writeJPEGToArray(JPEG_COMPRESSION_QUALITY, true);
return output;
}
But when we enable the JVips processor, several instances are almost immediately going OOM:
![image](https://user-images.githubusercontent.com/105188/228766808-02076373-0c4e-43c7-ad97-8e3ecfc88ed3.png)
Processing with the above code was enabled around 09:17 in the above.
Is this something you have seen with VipsImage or are we using it wrong?
Is there a way I can help track this down?