Appearances arn't being cleaned up when no longer in use.
Numbered Steps to Reproduce Problem:
Run in Dream Daemon, connect a mob to the world, and watch the appearance count grow out of control.
Code Snippet (if applicable) to Reproduce Problem:
mob
Login()
..()
bugproof()
proc
bugproof()
set waitfor = 0
while(src)
color = rgb(rand(0,255),rand(0,255),rand(0,255))
sleep(world.tick_lag)
Open the link > Top right Download button.
Test case 1 - https://www.dropbox.com/s/rv0qs8tvbw9rf9n/ ApperanceBug.rar?dl=0 - Ter's Test case.
Test case 2 - https://www.dropbox.com/s/p3bikqy97u7ia7y/ AnimateTest.rar?dl=0 - My own Test case.
Test case 3 - https://www.dropbox.com/s/gqmnsl5n9484lhe/ ApperanceBug2.rar?dl=0 - Luber's Test case(It's not realiable and instnatly reproducable, since we don't know yet what exactly is triggering it, mostly playing around with 2 verbs and checking appearance counts + changing the appearance when you move), also using older version, results my differ on current version.
Expected Results:
Memory being freed up
Actual Results:
Memory explodes and crashes your DD, if you leave it out of control.
Disconnecting from DD as a user, will not free up memory either.
Does the problem occur:
Every time? Or how often?
Every Time
In other games?
Probably all are effected
In other user accounts?
Sure
On other computers?
Sure
When does the problem NOT occur?
Always occures
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Haven't tested beyond versions 512.1470 and 512.1475
Workarounds:
Don't think there is one.
One more thing i want to add, even though those memory usages seem low on the test cases, it's quite different and massive on larger projects, as to where you'd start a server with 100mb usage, with only 1 to 5 players, it went up to 600mb in less then 24 hours.
It's possible the GC changes in an earlier 512 build caused this. Did 511 have this problem?
Worth adding: I don't know if the appearance bag will reclaim memory used by lower ID numbers if the chunks it allocated are no longer needed. I think it might, but I'm not sure. If it doesn't, then under proper GC conditions the memory would be expected to plateau. Sounds like this is still exceeding proper conditions however.