diff --git a/CHANGELOG.md b/CHANGELOG.md index f9188ffae..4bbf3af10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ All notable changes to this project will be documented in this file. - [#2486] AS3 skipping label instruction - Highlighter nullpointer - AS3 search slot name Index out of bounds +- AS text search - not being able to cancel search over multiple swf files ### Changed - Icon of "Deobfuscation options" menu from pile of pills to medkit diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java index 4598a4506..664b14cbf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -757,8 +757,10 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { } try { SWF.initPlayer(); - } catch (IOException | InterruptedException ex) { - Logger.getLogger(SWF.class.getName()).log(Level.SEVERE, null, ex); + } catch (IOException ex) { + Logger.getLogger(SWF.class.getName()).log(Level.SEVERE, "IOException during SWF.initplayer", ex); + } catch (InterruptedException ex) { + return new AbcIndexing(); } abcIndex = new AbcIndexing(air ? SWF.getAirGlobalAbcIndex() : SWF.getPlayerGlobalAbcIndex()); for (Tag tag : tags) { @@ -784,7 +786,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { * * @param swfs List of SWFs to set as dependencies */ - public void setAbcIndexDependencies(List swfs) { + public void setAbcIndexDependencies(List swfs) throws InterruptedException { abcIndex = null; getAbcIndex(); for (SWF swf : swfs) { @@ -3998,7 +4000,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { * @param renameType Rename type * @return Number of changes */ - public int deobfuscateAS3Identifiers(RenameType renameType) { + public int deobfuscateAS3Identifiers(RenameType renameType) throws InterruptedException { AbcIndexing ai = getAbcIndex(); Map> stringUsageTypesMap = new HashMap<>(); Map> stringUsagesMap = new HashMap<>(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/search/ActionScriptSearch.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/search/ActionScriptSearch.java index f5e5e6559..fdc648319 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/search/ActionScriptSearch.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/search/ActionScriptSearch.java @@ -128,7 +128,10 @@ public class ActionScriptSearch { } catch (CancellationException ex) { throw new InterruptedException(); } catch (ExecutionException ex) { - Logger.getLogger(ActionScriptSearch.class.getName()).log(Level.SEVERE, null, ex); + if (ex.getCause() instanceof InterruptedException) { + throw (InterruptedException) ex.getCause(); + } + Logger.getLogger(ActionScriptSearch.class.getName()).log(Level.SEVERE, "Execution exception during search", ex); } } } @@ -266,7 +269,10 @@ public class ActionScriptSearch { } catch (CancellationException ex) { throw new InterruptedException(); } catch (ExecutionException ex) { - Logger.getLogger(ActionScriptSearch.class.getName()).log(Level.SEVERE, null, ex); + if (ex.getCause() instanceof InterruptedException) { + throw (InterruptedException) ex.getCause(); + } + Logger.getLogger(ActionScriptSearch.class.getName()).log(Level.SEVERE, "Execution exception during search", ex); } } } catch (InterruptedException ex) {