Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Refactor native logic
- Split internal logic code and native code to define an edge between them - No internal code uses native calls anymore - Fixed some bugs with Handles and Strings in the process This update was to stop internal Dynamic calls from using it's own Natives. The benchmark has speed up again on add/read/update members. |
Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Massive refactor with lots of changes
- Refactored all type code (Lots of small bugs fixed in the process) - Added property OwnerPlugin - Added Reset(bool disposemembers=true, int blocksize=0, int startsize=0) - Added sm_dynamic_selftest command to ensure all Dynamic methods work as expected - Finished partially completed type conversion between types Vector and String |
Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
New update works fine. I only get the following error each mapchange.
Code:
L 08/25/2016 - 10:24:03: Error log file session closed. |
Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Steps towards FindByMemberValue(Dynamic params)
- Fixed .Push* methods not storing membernames correctly - Fixed .CompareString/ByOffset - Some more tests added to SelfTest - First version of .FindByMemberValue - Add garbage collection to OnLibraryRemoved forward - Reset player settings on post disconnect - Implement .Reset - Implement .GetName properly - Fix SelfTest reporting errors for Vector conversions Quote:
Also update to the latest Dynamic master branch download as I had recently fixed a similar bug around Handles. |
Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
So I've been having an issue with setting some properties. dynamic.smx throws an exception basically.
The relevant part of my object's constructor: Code:
public BClient(char steamid[64], int Client, bool loadFromDB = true) Code:
property int UsingVendor Code:
player.UsingVendor = 0; Code:
L 08/26/2016 - 21:15:25: [SM] Exception reported: Invalid index 1 (count: 0) |
Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
It appears .Membercount does not decrement when a child is disposed. I believe this is the cause of my loops getting slower + possibly memory leaks with stack constantly increasing?
|
Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Quote:
Please download / install / update your plugins to the current unreleased version. Please also refer to this new methodmap structure. The offsets have been removed to avoid corruption with non uniform objects. It also cleans up your methodmaps and makes them easier to manage. |
Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Quote:
You need to reuse members or use .Reset(*) to clean its members. You may be after a collection which allows you to remove objects. Edit: You can also override a collections Items function to return your own methodmap. |
Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
I suspected that there may have been updates to your plugin, so I downloaded the latest version. This didn't fix the problem.
The constructor initializes every single member. Even if it doesn't, I know for certain that I initialized the one class member that is shown in my post. How long does it take for your plugin to initialize a dynamic object once the constructor is called? Because in this case that object was a client object. BClient is created when a player joins the game. This error occurred a couple minutes later. How does the efficiency compare between the new methodmap structure and the old one? I have thousands of lines worth of classes coded with the older methodmap structure. What I find really odd is that other members do work, but some also don't work. I have checked many times to make sure I didn't misspell the member name in the constructor or property. |
Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
To confirm. The index out of bounds error is saying your dynamic object is invalid. It doesnt relate to the member your trying to access.
Maybe add a check like .IsValid just before your error line. Dynamic objects are initialised instantly. The "class" method your using is like .01 faster over 100K member iterations which is nothing really. The class code is safe if noone accesses the dynamic object from outside your class. By removing the offsets and doing methodmaps based on the last post to you: you should remove those pesky and hard to debug issues when your checking the member names in the initialiser and properties. It also makes the code heaps easier to manage. Imo, this outweighs the ever so slight performance boost. When i get weird issues with members. I dump the object using .WriteKeyValues. This is the best way to check your data is right. |
All times are GMT -4. The time now is 00:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.