ID:262740
 
BYOND Version: Current Beta

Operating System: WindowsXP

Detailed Problem Description:
This is extremely weird, nothing in my code is there to explain this..

Code Snippet to Reproduce Problem:
obj/Infection
icon='Map Files.dmi'
icon_state="Infection"
layer=1
New()
..()
var/R=rand(1,255)
var/G=rand(1,255)
var/B=rand(1,255)
src.icon+=rgb(R,G,B)
src.layer=2
walk_rand(src,10)
spawn()src.Animation()
spawn(1)src.Spawn_Infection()
proc/Animation()
sleep(5)
flick("Infection Cease",src)
src.icon_state="Infection Invisible"
sleep(rand(10,90))
flick("Infection Appear",src)
src.icon_state="Infection"
sleep(rand(5,50))
Animation()
proc/Spawn_Infection()
sleep(rand(1,10000))
var/obj/Infection/I=new(type)
I.loc=locate(src.x,src.y,src.z)

It appears fine for the first few "infections" that are spawned, and then this happens.
(See top left corner, the little squiggley thing, that's how it should look, but then it randomly generates an icon_state, which I find very weird)

Free Image Hosting at www.ImageShack.us
(Click to expand)

Does the problem occur:
Every time? Or how often? Only seen it on Infection
Why do you have animation calling itself? Looks like its infinitely recursing to me. Which is very bad.
You can't call this a BYOND bug until you can prove your code isn't wrong, which you can't do yet. Animation() is calling itself recursively, as Dever noted.

Also, you haven't really adequately described what's supposed to be happening here, how your code effects the result, and what's actually happening. For reference, this is an inadequate description:
It appears fine for the first few "infections" that are spawned, and then this happens.
(See top left corner, the little squiggley thing, that's how it should look, but then it randomly generates an icon_state, which I find very weird)
It's pretty hard to piece out what you're saying, or have any context to put it with. Please be clear, be detailed, and be dead sure there's no more debugging you can do before calling it a bug.

Lummox JR
In response to Lummox JR
Basicly, what animation does, is have it animate between "Infection" "Infection Cease" and then goes to "Infection Appear" rinse and repeat.

Then, after a bunch of them are spawned from eachother, random icon_states seem to appear in place of the actual "Infection"'s icon.