Exiled-Team / EXILED

A high-level plugin framework for SCP: Secret Laboratory servers. It offers an event system for developers to hook in order to manipulate or change game code, or implement their own functions.
https://www.exiled.to/
Other
274 stars 180 forks source link

Suggestion for improvement. #1151

Closed Tamago4a closed 2 years ago

Tamago4a commented 2 years ago

Perhaps I will write something that is impossible to implement. But I run into the problem of RAM leak quite often. To do this, you have to remove half of the plugins and look for the cause. But it also happens that 2 plugins can fail at once. Or the leak may occur infrequently, for example, once every couple of days. Then the search for a problem stretches for a month.

Is it possible to do something about this at the EXILED code level? Perhaps my suggestion is not feasible, but it would be cool if after each action, even the smallest one, there was some information about the used RAM in the console.

joker-119 commented 2 years ago

A memory profiler isn't something that falls into what EXILED itself should be doing. You can make a plugin for it but all it can do is tell you x memory is being used, not where it's being used or what objects.

There's at least 2 basegame memory leaks we are aware of, none have been attributed to EXILED, but you need to attach a debugger to the server process that logs what object types are using how much memory etc.

Tamago4a commented 2 years ago

It's a pity. Do I understand correctly that without the intervention of the game developers, I will not be able to build this debugger into the server?

joker-119 commented 2 years ago

No, you just need to attach a c# debugger to the server process once it's started, there's plenty of tools to do this, it's just not necessary to put into EXILED directly, nor does it make sense to rebuild those tools from scratch.

Tamago4a commented 2 years ago

Are you talking about this? But SCPSL uses a non-hacked version of unity... https://github.com/dnSpy/dnSpy-Unity-mono https://github.com/0xd4d/dnSpy

joker-119 commented 2 years ago

Neither of those are anywhere close to what you need. You can use dotnet to create a memory dump of the process, go learn how to google.