Descriptive Problem Summary:
I've noticed that objects will occasionally be drawn with the wrong icon. In this image the pickax icon is incorrectly being drawn to represent an object.
The object is of type /obj/water. The icon var of that type is set to 'water.dmi' and is never changed at runtime. water.dmi doesn't have an icon state that's the pickax icon. I'm sure its icon_state is never changed at runtime because:
* the water object only exists for 5 ticks, then is deleted (its loc is set to null)
* it's created and no reference to it is kept
* there's no code that sets an object's icon_state to be the pickax
* there's no unnamed state that's the pickax icon (so it's not the case that the object's icon is being changed and the pickax image is defaulted to because its icon_state doesn't exist in the new icon)
I've also seen this happen in some other projects.
My best guess is that objects are being recycled and their properties are somehow not being updated. Maybe the internal bits that handle this are designed to do things 10 times per second and because of the increased framerate (I've only ever seen this happen in games that use lower-than-default values for world.tick_lag) there's a chance for a glitch to happen when objects get recycled. Or it could just be a problem on the client end. The client retains information even after an object ID has been recycled, so it's applying old information to a new object because the new object has an ID that was previously used.
The reason I suspect this is the case is because the pickax and water icons are used by objects that exist only as visual effects. They only exist for 5-10 ticks, then are deleted (their loc is set to null) so the game will accumulate a lot of these deleted objects. There are other objects used like this, but the pick ax and water objects are the most common, so if the glitch is rare, odds are it would occur this way.
Numbered Steps to Reproduce Problem:
I have no idea how to reproduce this.
Code Snippet (if applicable) to Reproduce Problem:
Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?
When does the problem NOT occur?
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.)
I first saw this problem a while ago. I forget exactly when, but a few months at least.
Copyright © 2015 BYOND. All rights reserved.