Garbage helper - player tool

Discussions about Coding and Scripting
Post Reply
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Garbage helper - player tool

Post by sektor2111 »

Regarding to some research for playing ON-Line I could see that if you don't have files loaded in client game, chance to get a mismatch technically doesn't exist. However, after disconnecting properly from a server A and sorting other server B having different files, even if you don't have wild stuff in client you can get a mismatch based on file previously loaded in memory. Actually with losing list you can restart UT in order to get clean session. If this is not the best ever thing for you then I have a menu extension which is able to clean client using 2 mouse clicks:
[attachment=2]Select_Tool.png[/attachment]
And the result in console
[attachment=1]Cleaned.png[/attachment]
And result in LOG:

Code: Select all

Log: Startup time: 2.562143 seconds
DevMusic: Load music: Music utmenu23.utmenu23
ScriptLog: Creating root window: umenu.UMenuRootWindow
Log: Collecting garbage
Log: Purging garbage
Log: 0.0ms Unloading: Package MultiMesh
Log: 0.0ms Unloading: Package EpicCustomModels
Log: 0.0ms Unloading: Package Pinata
Log: 0.0ms Unloading: Package AT
Log: 0.0ms Unloading: Package olroot
Log: 0.0ms Unloading: Package UTBrowser
Log: 0.0ms Unloading: Package MGP2
Log: 0.0ms Unloading: Package NWCoreV3
Log: 0.0ms Unloading: Package genfluid
Log: 0.0ms Unloading: Package MoreBloodOS
Log: 0.0ms Unloading: Package oldskool
Log: 0.0ms Unloading: Package olweapons
Log: 0.0ms Unloading: Package GrbCollect
Log: 0.0ms Unloading: Package USpaceBrowser
Log: 0.0ms Unloading: Package NWUltraGoreSSEa
Log: 0.0ms Unloading: Package AdjustoBots
Log: Garbage: objects: 24644->20863; refs: 237667
As you can see, all things loaded according to INT files are simply removed out. It doesn't affect list with servers previously opened - you can select Next one after cleaning memory.
This is the tool which goes to System Folder by extracting those 2 files from ZIP archive:
[attachment=0]GrbCollect.zip[/attachment]
I repeat, it works if you don't add any wild file, more exactly if mismatch doesn't come from non-stock stuff added, it is addressing cache-based users. Menu is automatically created without editing anything.
Attachments
GrbCollect.zip
(1.06 KiB) Downloaded 74 times
Cleaned.png
Select_Tool.png
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: Garbage helper - player tool

Post by Chamberly »

Downloaded, def gonna take a look at this. :mrgreen:
Image
Image
Image Edit: Why does my sig not work anymore?
Chris
Experienced
Posts: 134
Joined: Mon Nov 24, 2014 9:27 am

Re: Garbage helper - player tool

Post by Chris »

Personally I think that the engine should do garbage collection more regularly... but oh well...
That's a good tool to have, and if you don't have it you can just type in "obj garbage" in the console.

Regards, Chris
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Garbage helper - player tool

Post by JackGriffin »

Do understand that it's not actually doing garbage collection. It's actually flagging things to go through the process but that only occurs on a map change, server travel, or server reset. Wormbo and Anth did some really in-depth articles on this that are worth reading.
So long, and thanks for all the fish
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Garbage helper - player tool

Post by sektor2111 »

A mismatch might occur if you travel from a server using MH504 to MH503 or MH500. If you can collect garbage (sometimes might crash depending on stuff loaded) then next server won't return any error.

Alternate solution: Disconnect from server A, Start from Menu Tournament stuff (near practice session), do nothing then just press ESC, Now join to server B, I'll bet mismatch will be gone. These are not speculations or discussions, are tested. Player unload any stuff when starts a Local game (except transient craps crashing). While I did these tests I even studied client LOG, is visible even a default garbage collection when such Level-Change occurs. That tool is not the best as long as null references or whatever object will be causing a game-crash (client in cause), but menu switch way seems to work like a charm - keep in mind that I don't have empty menu-s from any kind. So for me mismatch related problems except stock stuff are history.

Last resort in case of evilized problems is RESTARTING client. That thing won't fail - and is about using only and ONLY Cache - NO Wild stuff loaded.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Garbage helper - player tool

Post by JackGriffin »

I'm sorry I should have been more specific. I meant it from the perspective of the server, not the client. It doesn't surprise me at all that the engine retains things between maps or even servers as long as you don't reload the game. I wonder if the client is just unloading the mods with your tool or if it actually does true collection and disposal. I'd bet it's just unloading them but if it works then woot for everyone. This used to be a serious problem when the different versions of Nexgen were floating around. I remember it really irritating me that I had to restart between servers and it was why I quit roaming around them.
So long, and thanks for all the fish
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Garbage helper - player tool

Post by sektor2111 »

For server... ummm I figured a few things, I'm not in charge to post tutorials for these servers (I let new blood to copy-paste great knowledge). However doing a sort of random map start tool I could see a few things like in a fog.
GetURLmap() return crap in PreBeginPlay, PostBeginPlay - simply that data doesn't exist even if Level is primary thing loaded. I had to setup a dirty Timer in order to wait all initializations. Later you can deliver map-name (file used) right from that call. I don't know why the heck it doesn't work earlier, not even in PostBeginPlay - I found even a remark in a coop game but I was interested to check if information is valid. That's all about Server, Indeed I was using a Garbage Collector but that thing won't really save server against evilized null bytes accessed locking engine. I ran custom stuff in a week-end using Default Bot and default ScriptedPawn - after 12 hours of constant action (automatic game start) server was out of response - What Garbage did that thing ? I don't know and probably I won't be able to answer neither in next 2 years - I recoded other stuff and quitting idea for any constant battle taking hours...
Post Reply