ID:2642497
 
Not a bug
BYOND Version:513.1537
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 87.0.4280.101
Applies to:Dream Seeker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
If you set images with winset escaped, that are on subfolders and that are already set on skin, they fail

Numbered Steps to Reproduce Problem:
Set images on subfolders on the skin file
winset the same images directly, properly escaped
see them fail

Code Snippet (if applicable) to Reproduce Problem:
var/tmp/list/imagelist=('A.png','B.png','C.png','D.png')
winset(src, control, "image=\"[imagelist[1]]\"")


Expected Results:
Images on subfolders don't fail to be winsetted escaped just because they are being used on the skin

Actual Results:
Images on subfolders fail to be winsetted escaped just because they are being used on the skin

Does the problem occur:
Every time? Or how often? Very often
In other games? Yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur?Never


Workarounds:
Winset the image using the ref:
winset(src, control, "image=\ref[fcopy_rsc('file.png')]")

or winset the image directly (making image w spaces on the path fail)
winset(src, control, "image='A.png'")

or don't have images manually set on the skin if you're going to use them again
For obvious reasons, I need a test project for this.
I don't think that's the right file. I see nothing about winset() with an image in there.
In response to Lummox JR
My bad, uploaded the wrong file. Here is the correct one:
https://mega.nz/file/ sEoUGKIL#U5Fd6nDb8SoogjzijEEZT_M8Sn9CMYAgIB9Panrlv1Y
Got it, thanks. I'll take a look tomorrow and see what's up.
Okay, I took a look a this and was able to see a something, but after spending a lot of time debugging I found that the demo actually does not contain a bug; your winsets are wrong.

So to explain what's wrong with the test case I'll go through it step by step. First, you have three labels with images: one using A.png, one with B.png, and one with D.png. After you do winsets on all of them at login, you expected them to change to B.png, C.png, and the last one stay the same at D.png. Instead only the first image changes, the second one does not change to C.png, and the third stays on D.png as expected.

Here's the problem: C.png is defined nowhere in your resource file. Because it's not part of the skin, and you do not have a single-quoted reference to it anywhere, it was never compiled in. You've surrounded C.png in single quotes in your larger winset string only, so the compiler only sees the string you're sending to winset and has no idea—nor should it be expected to—that the 'C.png' inside of that double-quoted string should be a file reference. Remember, the compiler sees any double-quoted string only as text.

There are several ways to fix this, one of which is to just have a list() of file references that you might use with the skin. Another way is to change your winset strings so they have an embedded expression, replacing "image='C.png'" with "image=\ref['C.png']". The embedded expression is of course not raw text, so the compiler will act on what's inside and now sees the single-quoted file ref and will include it in the .rsc accordingly.

The reason the winset works on the first image (and also on the third, but it doesn't do anything) is that when the image param is given a name to work with, it tries to find the right named file in the cache. If it can't find that file, it asks the server to clarify what cache entry goes with it. In the case of C.png, the server responds with a message that says it has no file in its cache by that name. Therefore your middle label control is not changing because the winset you sent it points to an invalid filename.
Lummox JR resolved issue (Not a bug)
In response to Lummox JR
So apparently there is a bug happening but I hadn't narrowed it down at the time of the bug report. Because of user error, like you mentioned, I thought it was happening on the testcase I've sent.

I've since narrowed it down thanks to SSX's help: The files need to be on a subfolder and the winset needs to be escaped. Then, the bug will show itself.

I've updated the thread. Here is a correct test case: https://mega.nz/file/ gBgUFKpI#eucGWiDIRv2FY0QNvhFHVBRcxcdx-jiOTVQP9_jAZ1Y

Sorry to make you chase ghosts before.
Per the conversation in Discord, the code in the new demo is incorrect because it's embedding a file reference directly into a string without using the \ref macro.