Using += and -= operators on atom.overlays var when the right operand is a list causes Bad Ref and bad list errors.
This bug occurs in 507.1265 and prior versions including 506.
Numbered Steps to Reproduce Problem:
N/A
Code Snippet (if applicable) to Reproduce Problem:
I am unable to determine the conditions under which this occurs, as it is intermittent.
/var/list/test = list()
/var/atom/a = new(locate(1,1,1))
a.overlays += test
// Will throw errors as shown above
a.overlays -= test
// Will also throw errors as show above
Expected Results:
Operation should proceed normally whether the list is empty or contains images/icons
Actual Results:
Case for a.overlays += test:
BUG: Bad ref (f:462963) in IncRefCount(DM human.dm:2952)
runtime error: bad list
proc name: update clothing (/mob/living/carbon/human/update_clothing)
source file: human.dm,2952
BUG: Bad ref (f:462963) in DecRefCount(DM human.dm:2952)
Case for a.overlays -= test:
BUG: Bad ref (f:462963) in IncRefCount(DM human.dm:3397)
runtime error: bad list
proc name: update inhands (/mob/living/carbon/human/update_inhands)
source file: human.dm,3397
BUG: Bad ref (f:462963) in DecRefCount(DM human.dm:3397)
Does the problem occur:
Every time? Or how often?
I am not what the conditions for this are. I haven't been able to create a unit test for it.
In other games?
Unknown
In other user accounts?
N/A
On other computers?
Yes
When does the problem NOT occur?
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
It appears this problem was occurring in 506 as well.
Workarounds:
None