View Issue Details

IDProjectCategoryView StatusLast Update
0005750Multi Theft Auto : San AndreasSynchronizationpublic2011-06-05 10:20
ReporterrydenAssigned Toryden 
PrioritynormalSeveritymajorReproducibilityN/A
Status resolvedResolutionfixed 
Product Version 
Target Version1.1Fixed in Version1.1 
Summary0005750: Solve the problem of stacked element ids reusal causing issues with poorly coded scripts
Description

Either use a queue or provide some orphaned expiration system.
If a queue is used, provide a good method for bandwidth saving.

See http://code.google.com/p/mtasa-blue/source/detail?r=2208 comments for more information.

TagsNo tags attached.

Activities

izstas

2011-01-13 10:13

developer   ~~0012544

r2208 is reverted: http://code.google.com/p/mtasa-blue/source/detail?r=2288

Does this issue still need a fix?

ryden

2011-01-13 11:49

manager   ~~0012545

Yes.

lil_Toady

2011-01-27 18:26

administrator   ~~0012786

That's a drawback from our poor lua structure.

When a userdata has lost all the lua references a __gc metamethod is fired for it, that might be a way to control the number of references left. With this we may throw a debugscript warning if we still have references to an element left when we destroy it (Or we may nil the references ourselves but that would be inefficient)

lil_Toady

2011-01-27 19:19

administrator   ~~0012787

Another thing which could be done is creating heavy userdata which has a reference to the light userdatas we use at this moment, then we have a weak table in our registry which stores the relation between them. Scripts have access to the heavy userdata and once we destroy the element the reference to light userdata in that is NULL'd. Since we have the weak table in the registry we can see what references are still alive and not use those IDs for new elements.

Issue History

Date Modified Username Field Change