Skip to content

Exception thrown when trying to open a script that the Catspeak package installs. #2308

@AcrossTheGames

Description

@AcrossTheGames

Describe the bug

To be honest I'm not entirely sure how to name this but, basically I was trying to mod a game to add the Catspeak modding API into it and since UTMT does not have any native way to install packages I tried to install it to a blank GM project and open that up. When I did so via either the current version of GameMaker (2021.14.2.213) or the LTS Version (2022.0.3.85) one of the scripts that Catspeak installed threw this error

/* EXCEPTION!
   Underanalyzer.Decompiler.DecompilerException: Decompiler error during AST building: Data left over on VM stack at end of fragment.
 ---> Underanalyzer.Decompiler.DecompilerException: Data left over on VM stack at end of fragment.
   at Underanalyzer.Decompiler.AST.ASTBuilder.PopFragmentContext() in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\AST\ASTBuilder.cs:line 250
   at Underanalyzer.Decompiler.AST.IFragmentNode.Create(ASTBuilder builder, Fragment fragment) in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\AST\IFragmentNode.cs:line 116
   at Underanalyzer.Decompiler.ControlFlow.Fragment.BuildAST(ASTBuilder builder, List`1 output) in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\ControlFlow\Fragment.cs:line 175
   at Underanalyzer.Decompiler.AST.ASTBuilder.BuildBlock(IControlFlowNode startNode) in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\AST\ASTBuilder.cs:line 104
   at Underanalyzer.Decompiler.AST.IFragmentNode.Create(ASTBuilder builder, Fragment fragment) in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\AST\IFragmentNode.cs:line 33
   at Underanalyzer.Decompiler.ControlFlow.Fragment.BuildAST(ASTBuilder builder, List`1 output) in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\ControlFlow\Fragment.cs:line 175
   at Underanalyzer.Decompiler.AST.ASTBuilder.Build() in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\AST\ASTBuilder.cs:line 66
   at Underanalyzer.Decompiler.DecompileContext.DecompileAST() in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\DecompileContext.cs:line 113
   --- End of inner exception stack trace ---
   at Underanalyzer.Decompiler.DecompileContext.DecompileAST() in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\DecompileContext.cs:line 117
   at Underanalyzer.Decompiler.DecompileContext.DecompileToAST() in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\DecompileContext.cs:line 155
   at Underanalyzer.Decompiler.DecompileContext.DecompileToString() in D:\a\UndertaleModTool\UndertaleModTool\Underanalyzer\Underanalyzer\Decompiler\DecompileContext.cs:line 164
   at UndertaleModTool.UndertaleCodeEditor.<>c__DisplayClass55_0.<DecompileCode>b__1() in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModTool\Editors\UndertaleCodeEditor.xaml.cs:line 739
*/

Catspeak seems to do a lot of things with macros and enums so I suspect that its something to do with those but, I wouldn't actually know.

Reproducing steps

  1. Create a GM game that has the Catspeak package installed
  2. Open game's data.win file in UTMT
  3. Open "gml_GlobalScript_scr_catspeak_compatibility_v3" in the "Code" section

Setup Details

UTMT Version 8.4.1
Windows 10
Custom "game" (specifically the LTS version) as UTMT would not import the scripts if I did so manually (usually something with macros messed it up)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions