ID:2068838
 
Resolved
Changing client.mouse_pointer_icon, color, or pixel offsets on the same tick as a HUD refresh could prevent a HUD refresh for several ticks.
BYOND Version:509
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 49.0.2623.112
Applies to:Dream Seeker
Status: Resolved (510.1339)

This issue has been resolved.
Descriptive Problem Summary:
Changing the value of the client var mouse_pointer_icon causes a significant delay when it happens at the same time that screen objects are removed from client.screen. It doesn't seem like a general lag spike (but I can't be sure), but instead it seems as if changing client.mouse_pointer_icon forces any other changes to client.screen to wait until the next server tick. Changes to client.images don't seem to be impacted by this glitch.

This problem affects the Dream Seeker, and I've managed to pinpoint that it first started happening in build 509.1313. The issue is present in every build since 509.1313 as well.


Numbered Steps to Reproduce Problem:
1) Add screen objects to client.screen and store the objects in a list.
2) Draw images on top of those screen objects (to make seeing the problem easier)
3) Within the same proc: Remove the list of objects from client.screen, and delete client.images as well. On the next line change client.mouse_pointer_icon to a new value.
4) When the command to remove the objects/images from the screen is called in the DS, you should see the images disappear first, and then the screen objects shortly thereafter. Sometimes this (apparently) depends upon the timing of the next server tick, so the length of the delay is variable.

I'm assuming that this is enough information to go on, but I can create a demo if you need one.


Workarounds:
Even breaking the change to client.mouse_pointer_icon out of the current process with a spawn() doesn't work reliably. Whenever the change to the mouse pointer happens, it will freeze everything else happening with client.screen. Using spawn(1) usually works, assuming that there aren't more changes happening to client.screen on the next tick.
Dang. This just missed the window to get investigated today for 510.1338. I'll look at it tomorrow.
A simple comparison from 509.1312 to 1313 showed me the problem. It was a really stupid mistake when resetting one of the client dirty_flags used by the server.
Lummox JR resolved issue with message:
Changing client.mouse_pointer_icon, color, or pixel offsets on the same tick as a HUD refresh could prevent a HUD refresh for several ticks.
Right on! I'm glad that it was something simple.