Raised This Month: $32 Target: $400
 8% 

Dynamic Objects and Properties - v.0.0.32 - [2018.05.08]


Post New Thread Reply   
 
Thread Tools Display Modes
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 11-18-2016 , 19:30   Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Reply With Quote #161

Here is the Collection methodmap.

.Dispose closes the collection handle while .Clear clears the collection.

If you call .Dispose you need to reinitialise the collection.
__________________
Neuro Toxin is offline
dubbeh
Senior Member
Join Date: Jul 2007
Old 11-19-2016 , 03:41   Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Reply With Quote #162

Was looking a bit more into the memory leak today and I honestly don't find anything getting disposed incorrectly.

Especially since caching cvars inside the plugin over each map change. Even doing Collection.Count after each map load and returning:

Code:
L 11/19/2016 - 10:01:47: [SM] Exception reported: Invalid Handle 0 (error: 4)
L 11/19/2016 - 10:01:47: [SM] Blaming: radio.smx
L 11/19/2016 - 10:01:47: [SM] Call stack trace:
L 11/19/2016 - 10:01:47: [SM]   [0] ArrayList.Length.get
L 11/19/2016 - 10:01:47: [SM]   [1] Line 77, C:\Development\SourceMod\include\dynamic/methodmaps/collection.inc::Collection.Count.get
L 11/19/2016 - 10:01:47: [SM]   [2] Line 78, radio/file.inc::GetRadioStationsFromFile
L 11/19/2016 - 10:01:47: [SM]   [3] Line 324, radio.sp::MapInit
L 11/19/2016 - 10:01:47: [SM]   [4] Line 268, radio.sp::OnConfigsExecuted
Which shows everything is working as intended. Need to rush out now and will update this later, if i find anything else.


Small Update: After a few small initial changes to the code, I don't believe Radio/Dynamic is leaking anything without the changes above.

This is the initial server boot handles count - based around loading 500 stations:
http://pastebin.com/3xJVCFBF

This is a followup after 4 map changes - using the same data input:
http://pastebin.com/zZwetvVR

Judging by the handles being identical after map changes, best guess is nothing is leaking. But I'm a bit unsure about the increasing memory footprint (This seems perfectly normal actually).

Going to push another small plugin update later - Related to initialising the g_Genre collection, but not writing any data and calling Dispose (Which is fixed in the local test version).

Small Update 2:
Nvm last comment - everything seems fine.
__________________
SM Plugins - dubbeh.net - Plugin requests are welcome

Last edited by dubbeh; 11-19-2016 at 11:16. Reason: Update
dubbeh is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 11-20-2016 , 23:36   Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Reply With Quote #163

I just had a good run over your code, it all appears fine in the latest version.

Edit:

Just pushed all the latest updates into a new release: v0022

- New include structure
- Implmented DynamicOffset structure
- Major update to KeyValues support
- Started Dynamic Wiki
- Implemented Persistant objects
- Deprecated Get/SetObject*() (use Get/SetDynamic*() instead)
- Introduction of FindByMemberValue(Dynamic params)
- Massive refactor of internal processing chains
- Reset player settings on post disconnect
- Implement .GetName properly
- Implement garbage collection
__________________

Last edited by Neuro Toxin; 11-20-2016 at 23:51.
Neuro Toxin is offline
dubbeh
Senior Member
Join Date: Jul 2007
Old 11-21-2016 , 09:16   Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Reply With Quote #164

Quote:
Originally Posted by Neuro Toxin View Post
I just had a good run over your code, it all appears fine in the latest version.
Thanks for looking into this for me.

If anyone is wondering what the command is to check handles for future reference:

"sm_dump_handles filename.txt" - Dumps SourceMods handle usage inside the base game folder.
__________________
SM Plugins - dubbeh.net - Plugin requests are welcome
dubbeh is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 11-21-2016 , 17:29   Re: Dynamic Objects and Properties - v.0.0.22 - [2016.11.21]
Reply With Quote #165

I've had on the books to add a command that shows dynamic's handle usage along with plugin name/counts of used handles.
__________________
Neuro Toxin is offline
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 11-22-2016 , 20:25   Re: Dynamic Objects and Properties - v.0.0.22 - [2016.11.21]
Reply With Quote #166

Quote:
Originally Posted by Neuro Toxin View Post
I've had on the books to add a command that shows dynamic's handle usage along with plugin name/counts of used handles.
That would be very useful actually, maybe I can then pinpoint my memory leaks
SM9 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 11-22-2016 , 21:02   Re: Dynamic Objects and Properties - v.0.0.22 - [2016.11.21]
Reply With Quote #167

Ill do it sooner rather than later in that case
__________________
Neuro Toxin is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 11-24-2016 , 01:47   Re: Dynamic Objects and Properties - v.0.0.22 - [2016.11.21]
Reply With Quote #168

https://github.com/ntoxin66/Dynamic/...-Usage-Command

I just made this tree for the handle usage command. Can someone check it compiles and test the sm_dynamic_handles command?
__________________
Neuro Toxin is offline
dubbeh
Senior Member
Join Date: Jul 2007
Old 11-24-2016 , 19:39   Re: Dynamic Objects and Properties - v.0.0.22 - [2016.11.21]
Reply With Quote #169

Thanks for this update, Perfect for debugging and testing.

Will test it out tomorrow for sure!
__________________
SM Plugins - dubbeh.net - Plugin requests are welcome
dubbeh is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 11-25-2016 , 01:04   Re: Dynamic Objects and Properties - v.0.0.22 - [2016.11.21]
Reply With Quote #170

I've managed to compile and upload the sm_dynamic_handles plugin version.

Here is the download.

I'll hopefully have time on the weekend to test it.

Anyone who wants to test in the mean time and post the results here the command is: sm_dynamic_handles

You must run the command from your game client while connected to the server.
__________________
Neuro Toxin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode