View Issue Details

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

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

See comments for more information.

TagsNo tags attached.



2011-01-13 10:13

developer   ~~0012544

r2208 is reverted:

Does this issue still need a fix?


2011-01-13 11:49

manager   ~~0012545



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)


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