From a3bfbda612bf8bacabeab20123dc9c85be5de388 Mon Sep 17 00:00:00 2001 From: Masahiro Kitagawa Date: Sat, 16 Dec 2023 22:41:35 +0900 Subject: [PATCH] fix: Exception caused by null tiles When cache[0] is null, it reaches RuntimeException("Not a Raster instance?") line. --- .../main/java/com/lightcrafts/jai/utils/LCTileScheduler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightcrafts/src/main/java/com/lightcrafts/jai/utils/LCTileScheduler.java b/lightcrafts/src/main/java/com/lightcrafts/jai/utils/LCTileScheduler.java index 583238af..e2258302 100644 --- a/lightcrafts/src/main/java/com/lightcrafts/jai/utils/LCTileScheduler.java +++ b/lightcrafts/src/main/java/com/lightcrafts/jai/utils/LCTileScheduler.java @@ -743,7 +743,7 @@ public Raster scheduleTile(OpImage owner, } else { // Check the cache: a null value indicates computation is // still in progress. - if(cache[0] == null) { + while (cache[0] == null) { // Wait for the computation to complete. try { cache.wait(); // XXX Should there be a timeout?