ID:2107172
 
BYOND Version:510
Operating System:Windows 10 Enterprise 64-bit
Web Browser:Firefox 47.0
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:

For some reason, images on a specific z level aren't displayed to the player.

Numbered Steps to Reproduce Problem:

Unsure. Seems to happen at random, but heavy processing seems to exacerbate the issue.


I can replicate it fairly often in my project, and to prove that the images simply aren't displaying I've set up a verb which creates and object, places it at the same position as the image, and copies it's appearance. The object then appears as the image should. As well, it makes sure to send the images to the player (even though they've already been sent).

For all intents and purposes, the image should be displayed, especially when all visual and positional variables between the object and the image are identical.

Workarounds:

It seems that I can wipe the client.images variable and then reload all images in the world manually by cycling through all the images and then sending them to the player:

client.images=null
for(var/image/i in world) src<<i


I believe this implies that the images are in client.images, and as such can't be added again, but for some reason the client can't see them. Not sure exactly what causes it.

I have a list called "images" that is a world variable which includes all the images in the world.

To add to this list I use:

image
New()
images.Add(src)
..()


I also have ..() before images.Add() and it results in the same fashion.

I attempted to reload the images by clearing the client.images and then adding images or client.images+images

This gives me the error: "runtime error: wrong type of value for list"

I'm wondering if, for some reason, when images are getting added to the images list, they're getting screwed up somehow.

This happens with both normal sized and large images.

TL;DR:
It seems that sometimes when adding images to a list, the item within the list is corrupt. It still reads as the image, so attempting to add it again or display it to the player again does nothing. Clearing client.images completely and then cycling through the world's images all over from scratch seems to work, but any list containing the corrupt images will have issue moving items to other lists.

This may be an issue with lists in general and not specifically images.
I need a test project that shows this in action.
I'll see what I can do but it's a very difficult bug to replicate. I've been searching for what triggers it and so far all I've been able to discover is that heavy cpu usage will case it. I'm thinking that initializing hundreds of objects at once is somehow causing them to trip over the image() proc. I'll have to do more testing to confirm though.
I seem to have been able to alleviate the issue by throwing a spawn into the New() for images, this way it only adds images to the list and displays them after waiting for other stuff to finish.

This may not be a bug, it may just be me pushing BYOND too hard in too short a timeframe, and the computer just can't keep up so it borks the list.Add()