From 7c798e63645108a913352abf29fe640bf7c7e5d6 Mon Sep 17 00:00:00 2001 From: Luis Uguina Date: Thu, 29 Oct 2020 21:01:24 +1100 Subject: [PATCH] fix: showLastRender method randomly breaks upload queue The method img.getScaledInstance returns null under some conditions (some images cannot be properly managed by Java Runtime), breaking the upload process and reducing the upload queue size in 1. The process can potentially consume the three concurrent upload slots and hence leaving the client in a zombie state. --- src/com/sheepit/client/standalone/swing/activity/Working.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/sheepit/client/standalone/swing/activity/Working.java b/src/com/sheepit/client/standalone/swing/activity/Working.java index 64dc367..4d62977 100644 --- a/src/com/sheepit/client/standalone/swing/activity/Working.java +++ b/src/com/sheepit/client/standalone/swing/activity/Working.java @@ -404,9 +404,9 @@ public class Working implements Activity { } icon = new ImageIcon(img.getScaledInstance((int) (width * factor), (int) (height * factor), Image.SCALE_FAST)); } - catch (IOException e) { + catch (Exception e) { log.error(String.format("Working::showLastRender() Unable to load/preview rendered frame [%s]. Exception %s", - lastJob.getOutputImagePath(), e.getMessage())); + lastJob.getOutputImagePath(), e.getMessage())); } }