UndertaleModTool icon indicating copy to clipboard operation
UndertaleModTool copied to clipboard

Replacing the disassembly of "gml_Script_scr_ease_out" with the following causes UMT to crash with a stack overflow exception

Open Grossley opened this issue 3 years ago • 3 comments

.localvar 2 arguments
.localvar 6238 $$$$temp$$$$ 3226

:[0]
b [29]

> gml_Script_scr_ease_out (locals=1, argc=2)
:[29]
push.i gml_Script_scr_ease_out
conv.i.v
pushi.e -1
conv.i.v
call.i method(argc=2)
dup.v 0
pushi.e -1
pop.v.v [stacktop]self.scr_ease_out
popz.v

:[end]

Grossley avatar Oct 02 '21 04:10 Grossley

image

Grossley avatar Oct 02 '21 04:10 Grossley

It seems that, immediately prior to this crash, the tool is producing a TempVarAssignmentStatement followed by an AssignmentStatement, both with a Value is FunctionDefinition. I suspect that the lack of a ret or exit in the assembly is causing it to detect the function assignment recursively, but I don't know where to look for the block definition to prevent that from happening.

Jacky720 avatar Jan 23 '22 20:01 Jacky720

Is this completely resolved now?

Jacky720 avatar May 17 '22 18:05 Jacky720

This now produces a "name mismatch" exception that does not crash the tool. Closing; the tool should not be expected to decompile an invalid constructed function.

Jacky720 avatar Feb 19 '24 22:02 Jacky720