Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompilation Failure using the CLI: System.InvalidOperationException ("Stack empty") in DecompileFromBlock #2054

Closed
yetanotherf0rked opened this issue Mar 7, 2025 · 2 comments
Labels
bug Something isn't working waiting for new decompiler test This needs to be tested with the new Underanalyzer decompiler

Comments

@yetanotherf0rked
Copy link

Describe the bug

When running the following command on Post Void's data.win file:
UndertaleModCli.exe dump data.win --code UMT_DUMP_ALL

some of the files contain this error:

/*
DECOMPILER FAILED!

System.InvalidOperationException: Stack empty.
   at System.Collections.Generic.Stack`1.ThrowForEmptyStack()
   at System.Collections.Generic.Stack`1.Pop()
   at UndertaleModLib.Decompiler.Decompiler.DecompileFromBlock(DecompileContext context, Dictionary`2 blocks, Block block, List`1 tempvars, Stack`1 workQueue) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:line 239
   at UndertaleModLib.Decompiler.Decompiler.DecompileFromBlock(DecompileContext context, Dictionary`2 blocks, Block block) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:line 800
   at UndertaleModLib.Decompiler.Decompiler.Decompile(UndertaleCode code, GlobalDecompileContext globalContext, Action`1 msgDelegate) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:line 1465
   at UndertaleModCli.Program.GetDecompiledText(UndertaleCode code, GlobalDecompileContext context) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLibInherited.cs:line 427
*/

Reproducing steps

  1. Download the bleeding-edge CLI from this commit: 646debd
  2. Run UndertaleModCli.exe dump data.win --code UMT_DUMP_ALL on Post Void game files
  3. Fetch the code files
  4. Some files will contain the provided errors.

Setup Details

OS: Windows 11 Pro
OSVersion: 10.0.26100
WindowsBuildLabEx: 26100.1.amd64fre.ge_release.240331-1435
Game: Post Void (1.4c)
Version: bleeding-edge version ("646debd") downloaded from this release

@yetanotherf0rked yetanotherf0rked added the bug Something isn't working label Mar 7, 2025
@colinator27 colinator27 added the waiting for new decompiler test This needs to be tested with the new Underanalyzer decompiler label Mar 9, 2025
@colinator27
Copy link
Member

You can try out the new decompiler, which you can download from the automated builds at #1862. (And in case the compiler is broken, there's #2056 to try as well.)

@yetanotherf0rked
Copy link
Author

#2056 worked great thank you
closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for new decompiler test This needs to be tested with the new Underanalyzer decompiler
Projects
None yet
Development

No branches or pull requests

2 participants