I originally posted this http://www.byond.com/members/ BYONDHelp?command=view_tracker_issue&tracker_issue=3014
But they told me I gave too much information. So I'll give less.
Steps to Reproduce Problem:
Copy and paste the code below and use the verb. In a few hours, it'll crash. The verb, not Dream Daemon. DD won't even report an error. I gave code that crashed much, much sooner than that, but you didn't like it because it wasn't what I actually used, even though it does do what I described, and I tested it to make sure it did. So here's what I actually use. At the moment. I've switched between like six different ways of doing it and they all crashed and I mentioned that, but you only wanted the one I use right exactly now. So compile it, run it, hit the verb, and find something else to do until it crashes. The command is called "Restart" because the proc is initially called by a loop in world/New(), but it crashes after I restart it with the verb, too.
Code Snippet (if applicable) to Reproduce Problem:
mob/var/status
mob/verb/RestartStatusThing()
set hidden = 1
spawn() while(1)
sleep(20)
StatusUpdater()
proc/StatusUpdater()
for(var/mob/M in world) if(M.client)
var/bar = winget(M, "MainWindow.input", "text")
if(bar == "" || bar == "Say \"" || bar == "Emote \"") M.status = ""
else if(findtext(bar,"Say",1,4) || findtext(bar,"Emote",1,6) ) M.status = "Typing..."
else M.status = ""
if(M.client.inactivity >= 6000) M.status = "Idle"
Expected Results:
It loops forever.
Actual Results:
It loops for a few hours and then crashes silently. Dream Daemon does not crash or report the error, but the proc stops getting called.
Does the problem occur:
Every time.
In other games?
I can't back this up because you won't let me use the code that I've tested in other places.
In other user accounts?
I imagine, but untested.
On other computers?
I imagine, but untested.
When does the problem NOT occur?
It always occurs.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
I'd say it's been doing this for at least five versions.
Workarounds:
What I posted is my workaround: A hidden admin verb to restart the loops after they crash.