UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other Game Maker: Studio games!)
GNU General Public License v3.0
1.07k stars 206 forks source link

Non-consistent out of memory exception #573

Closed Grossley closed 1 year ago

Grossley commented 2 years ago

I ran UndertaleModTool 7 times, performing the same operation once in the command box, and then attempted to save, and it only successfully saved once.

Archie-osu commented 2 years ago

What was the operation, what game?

Grossley commented 2 years ago

Deltarune chapter 2, Data.GMS2_2_2_302 = false;

Grossley commented 2 years ago

This appears to only occur on "AnyCPU" when running in Visual Studio

Archie-osu commented 2 years ago

And apparently only occurs for some people, as I've been unable to reproduce it even after two hours of trying.

Grossley commented 2 years ago

Use on real hardware not in VM

DillyzThe1 commented 2 years ago

I can confirm that this is an issue, as I always get this error when saving. And on top of that, I can't even edit or view the decompiled Deltarune Chapter 2 code.

(I'm on Windows 10, running right off the hardware.)

VladiStep commented 1 year ago

It's still relevant.

That's because assemblies for scripts can't be unloaded from memory (at least there's no way that I would aware of), see this issue - https://github.com/dotnet/roslyn/issues/41722

The only way to somehow reduce memory consumption is to call GC.Collect() after every command.

VladiStep commented 1 year ago

Yeah, GC.Collect() seems to work.