FireScript icon indicating copy to clipboard operation
FireScript copied to clipboard

Memory Leak

Open wills-web opened this issue 6 years ago • 1 comments

A memory leak seems to occur when dismissing fires.

We have found that the fire department contingent of our roleplay community has experienced disconnection, and even memory-protecting system shutdowns.

We performed the following experiment to determine where the leak seems to originate from.

  • Player A is in the FiveM server (following a FireScript restart).
  • Player A starts a fire using startfire 40 10.
  • Player A uses resmon to monitor streaming capacity of the script, which raises to approximately 42MB.
  • Player A extinguishes the flames. After a minute, the streaming capacity is still at 42MB.
  • Player B connects to the server. Bare in mind that Player B has never been in proximity to the fire. Player B's streaming capacity for Fire Script is - (null)
  • Player B teleports to Player A's position (location of the fire), and the streaming capacity remains null for B and 42MB for A.

This suggests that for players who are in range of a fire have a dedicated stream of 42MB (a relatively large proportion), which is not dismissed after the fire is extinguished (and stopallfires & stopallsmoke is run). However, this does not effect new players joining.

Let me know what you think and if you need any further diagnostic information.

wills-web avatar Jun 15 '19 21:06 wills-web

Probably a looped thread that is opened but never properly closed.

Fireant456 avatar Feb 16 '20 18:02 Fireant456