Interesting. I have been debating with myself the last few months whether or not to include code to
do that sort of thing with my SwarmSpawner project. (Flush caches, garbage collect every 10-20 min, etc...)
Decided just a few days ago it was pointless mostly. Main issue seems to be the "random" crashes you have also noticed.
My best guess at this point in time is the "randomish" timing differences that happen between server and client, and
ALSO the timing differences that happen between between the player and his local machine,
, are the root cause of
many problems.
I strongly suspect there is also a similar timing issue occurring between the Uscript and the native code.
Every mod, every mutator, every map, every difference in server config will have a slight effect on this I think.
You won't get the same results twice. (If you do, start buying lottery tickets.....)
There are so many variables involved, that it seems unlikely to ever get this exactly 100% in sync.
Brute force attempts to clean things up, will result in seemingly "random" issues/crashes due to whatever
current state the whole game is in at that point in time and some actor or another will not be inclined to be cleaned up at that point....
Best plan is to write any new code, or fixes, so that it accounts for this. Work with the Engine. Don't fight it.
*DISCLAIMER.
I been drinking a few beers to celebrate tonight's successful coding session, and might be rambling a bit.
Correct me if I am wrong/way off base with the above ramblings.......
I do know a bit about making Levels suffer from powerful tweaks.