diff --git a/CHANGELOG.md b/CHANGELOG.md index b51a76a59..0945c949d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. - [#1948] Timeout while deobfuscation did not skip method - [#1948] NullPointerException on Simplify expressions on incrementent/decrement - [#1941] Export when no node is selected after SWF opening +- Exception handling in cache clearing thread ## [18.3.3] - 2023-01-22 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java index 96fa7ded5..267a9143b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java @@ -22,12 +22,15 @@ import java.io.File; import java.io.IOException; import java.lang.ref.WeakReference; import java.util.ArrayList; +import java.util.ConcurrentModificationException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.WeakHashMap; +import java.util.logging.Level; +import java.util.logging.Logger; /** * @@ -86,7 +89,11 @@ public class Cache implements Freed { } catch (InterruptedException ex) { return; } - clearAllOld(); + try { + clearAllOld(); + } catch (Exception cme) { + Logger.getLogger(Cache.class.getSimpleName()).log(Level.SEVERE, "Error during clearing cache thread", cme); + } } } };