diff --git a/CHANGELOG.md b/CHANGELOG.md index 967f13189..d087e4e99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file. - [#2116] Limit maximum number of box blur pixels - [#2122] `-header` command did not support negative integers for displayrect - AS3 direct editation - namespaces were initialized in class initializers +- Debugging - do not invoke getter when there is none - avoid freezing ## [20.0.0] - 2023-11-05 diff --git a/lib/flashdebugger.jar b/lib/flashdebugger.jar index 84b21f3d5..6cf1d97be 100644 Binary files a/lib/flashdebugger.jar and b/lib/flashdebugger.jar differ diff --git a/src/com/jpexs/decompiler/flash/gui/DebuggerHandler.java b/src/com/jpexs/decompiler/flash/gui/DebuggerHandler.java index c8fa1828f..57db4ef5a 100644 --- a/src/com/jpexs/decompiler/flash/gui/DebuggerHandler.java +++ b/src/com/jpexs/decompiler/flash/gui/DebuggerHandler.java @@ -158,9 +158,9 @@ public class DebuggerHandler implements DebugConnectionListener { return stackLines; } - public InGetVariable getVariable(long parentId, String varName, boolean children) { + public InGetVariable getVariable(long parentId, String varName, boolean children, boolean useGetter) { try { - return commands.getVariable(parentId, varName, true, children); + return commands.getVariable(parentId, varName, useGetter, children); } catch (IOException ex) { return null; } @@ -913,7 +913,7 @@ public class DebuggerHandler implements DebugConnectionListener { } public synchronized InCallFunction callMethod(String object, String methodName, List args) throws ActionScriptException { - InGetVariable igv = getVariable(0, object, false); + InGetVariable igv = getVariable(0, object, false, false); return callMethod(igv.parent, methodName, args); } diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index c87f7f766..0a5da4050 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -301,7 +301,7 @@ public class Main { if ((v.vType == VariableType.OBJECT || v.vType == VariableType.MOVIECLIP)) { objectId = (Long) v.value; } - Object oldPos = getDebugHandler().getVariable(objectId, "position", true).parent.value; + Object oldPos = getDebugHandler().getVariable(objectId, "position", true, true).parent.value; getDebugHandler().setVariable(objectId, "position", VariableType.NUMBER, 0); icf = getDebugHandler().callFunction(false, "readUTF", v, new ArrayList<>()); System.out.println("Result=" + icf.variables.get(0).value); diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 3e28fb235..b62f76aa5 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -350,15 +350,17 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener 0; if (parentObjectId == 0 && objectId != 0) { - igv = Main.getDebugHandler().getVariable(objectId, "", true); + igv = Main.getDebugHandler().getVariable(objectId, "", true, useGetter); } else { - igv = Main.getDebugHandler().getVariable(parentObjectId, var.name, true); + igv = Main.getDebugHandler().getVariable(parentObjectId, var.name, true, useGetter); } //current var is getter function - set it to value really got