ID:2490385
 
Resolved
The server did not send visual content updates for screen objects when the player's loc was null.
BYOND Version:512.1474
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 75.0.3770.142
Applies to:Dream Daemon
Status: Resolved (512.1476)

This issue has been resolved.
Descriptive Problem Summary:
null loc causes vis_contents to not display properly

Numbered Steps to Reproduce Problem:
Set player's loc to null
Add screen object that has vis_contents
Note that the screen object's vis_contents aren't displayed.

Code Snippet (if applicable) to Reproduce Problem:
world
view = 6
maxx = 13
maxy = 13
maxz = 1

obj
background
icon = 'background.dmi'
screen_loc = "1,1"
plane = 1

New()
..()
vis_contents += new/obj/button

button
icon = 'button.dmi'
screen_loc = "1,1"
plane = 1
layer = OBJ_LAYER + 1

mob
Login()
// lack of ..() or setting loc to a null value results in obj/background vis_contents not displaying
client.screen += new/obj/background


Test Build

Expected Results:
vis_contents to display appropriately.

Actual Results:
vis_contents aren't displayed appropriately.

Does the problem occur:
Every time? Or how often? Every time
In other games? Yes
In other user accounts? Yes
On other computers? Only have one computer

When does the problem NOT occur?
When setting the player's loc to a non-null value, adding everything in vis_contents to client.screen, or outputting vis_contents using <<.

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.) Unsure.

Workarounds:
Set the player's location to a non-null value, adding everything in vis_contents to client.screen, or outputting vis_contents using <<.
Good find. I think I have a rough idea where to begin looking, so I'll get on this. Didn't want to hold up 512.1475 to look for it though.
Thank you, I appreciate it.
Problem: Your test build doesn't have any files in it. If you compile before packaging it should package all the files.
In response to Lummox JR
Lummox JR wrote:
Problem: Your test build doesn't have any files in it. If you compile before packaging it should package all the files.

I've re-uploaded the test build and confirmed it has the right files this time.

On a side note, is it a common issue that packaging through Build -> Package Files -> world source files sometimes results in files not being packaged appropriately?
Yep, it's a known issue. Somewhat on the difficult-to-fix side so I haven't much dealt with it yet. I think it'd at least make sense to put in a warning or something.
Lummox JR changed status to 'Verified'
Well, I've discovered this issue is a doozy to fix.

So here's the problem: Every map tick, the server looks at movables in each player's viewing range and updates a list of which ones have moved, appeared or disappeared, changed appearances, changed visual contents, etc. It also goes through client.screen, turfs already in visual contents that are known to the user, and images. It sends out updates for the objs and mobs that have changed.

Those update messages are only valid, and only sent, when the user has a valid virtual_eye. In other words, the player has to be somewhere on the map or have client.eye there. On the server end I can have the lists update when the player is not on the map, but there's no way, currently, to send the update messages because those include some important map coord info.

It looks like I might be able to figure out how to still use the existing messages, and if so then I should be all set, but it'll take some study to work all that out. If I'm wrong, then I'll have to add new messages or new ways of using the old ones (which is better).
Lummox JR resolved issue with message:
The server did not send visual content updates for screen objects when the player's loc was null.