Pathfinding Memory Leakage

PC Info Windows 11
Date First Experienced : 10/04/2023
Date Last Experienced: Still an ongoing issue

Sometimes this bug crashes the servers and sometimes it doesnt because it will have random memory usage ranging from 2kmb up to 6kmb but often 4-6kmb and when it gets around 5.4k mb it crashes the server

video showcasing bug:

Reproduction steps: This bug is so seemingly convoluted that im not sure how to reproduced it, I still dont even know what makes it happen because sometimes the game is perfectly fine (less often). In the reprofile1.rbxl i was experiencing the memory spikes to go beyond 6gb and then crash the server, on roblox in the game server list it said my account was still in the server but it wasnt because the server crashed, but anyways in the first repro file this bug was happening the second the wave starts and enemies start spawning in but sometimes it would work perfectly fine, but from what i observed in the initial repro file was that if i dont use the wavescript and i just manually place the enemies it never spiked, but in the second repro file it spikes with the enemies being manually put in…

THINGS TO NOTE:

  1. sometimes the memory spike will be in untracked memory and sometimes it will be in navigation memory (once again seems random to me)
  2. ReproFileOne file currently uses a pathfinding controller script to control all enemies but you can also turn that off and just enable the pathfinding scripts inside the enemies
  3. when you kill the enemies and they are destroyed from the workspace, the memory does not go down
  4. wave system is in the script named “wavescript” in serverscriptservice
    5.enemies folder with enemies inside is located in replicated storage

THINGS I TRIED (span over 2 weeks)

  1. I tried disconnecting all events and going through the variables and tables to see if anything was being created a bunch of times
  2. I tried creating a controller for the pathfinding so one script controlled all the enemies
  3. i tried using 5 completely seperate pathfinding modules/scripts i found online and in toolbox
  4. I tried editing a bunch of stuff with the pathfinding scripts
  5. i tried making the wavescript itself do the pathfinding
  6. out of desperation and panic i started doing random stuff like moving spawn closer and changing the scripts to server instead of legacy

EXPECTED BEHAVIOR: it should start the wave and spawn the enemies without crashing the server

I have come to the conclusion after all of this plus the fact that the memory shows up as untracked sometimes, that this is a roblox engine bug,
I really dont know whats happening but ive saved up money for ads and I have been working on this game by myself for the past 3 months and its a bit scary to not be able to fix this bug because the trend im going after is going to die down soon.

WARNING: sorry about my bad code

Reproduction files were attached to the internal ticket by a Roblox Staff (@Focia19), at the request of the developer, will not be shared publicly!

1 Like

We’ve filed a ticket into our internal database for this issue, and we will update you when we have further information!

Thanks for the report!

2 Likes

We have recently fixed an unbound pathfinding allocation. Can you verify if you are still experiencing this problem?