1. Client (production/canary) and FXServer version:
  • Production (2021-09-04 1:14 AM)
  • FXServer-master SERVER v1.0.0.4162 win32
  1. What you expected to happen
    Restart a resource that contains C# scripts, and it should run normally

  2. What actually happens
    After restarting a resource that contains C# scripts, those scripts make the game stutter at certain intervals (probably Ticks). The more I restart the resource, the worse it gets.
    Using the profiler, it seems to be mostly due to “C# schedule” blocks.

  3. Category of bug (eg. client, server, weapons, peds, native)
    C# runtime (client)

  4. Reproducible steps, preferably with example script(s)

  • install vMenu as an example C# resource (I was able to reproduce it with it, even removing my own C# resources)
  • start and connect to the server
  • measure FPS and performance with resmon and/or profiler
  • restart vMenu
  • measure again
  • restart it several time and watch the game stutters/freezes intesify

Before:


After:

Screenshots from the profiler, showing “C# schedule” taking a lot of empty space


image

1 Like

I couldn’t directly replicate this, but some GC tuning does seem to help with the memory-use-tracking pauses getting longer after restarts.

A canary build later today should hopefully improve this scenario.

3 Likes

with bigger scripts the spikes between each script restart get heavier sooner

Also, on current, try using mono_enableMemoryUsageTracking false to see if it affects any long GC pauses in resmon.

Just wondering - did it help at all?

@Sasino97 Asking again. :upside_down_face:

i tried yesterday restarting the same resource for about 1 afternoon while writing code and it seems it got fixed :thinking: but it can’t be confirmed if i’m alone to say this ahahah

@nta (I also had this problem)
Yes it helped, I did several tests and no freeze occurred: no high CPU usage.

image

1 Like

I confirm it’s not occurring anymore, thanks!

1 Like