While testing some features of 511 I produced the code below (snippet section), I'm aware it's not great/safe (: operator abuse) but it's a simplified version of the code that initially caused the crash, it was simply an attempt at copying an appearance into a mutable appearance (Not sure if there's actually a proper way to do this)
In the snippet section are 4 verbs, the first verb will crash Dream Seeker 100% of the time, the following 3 are variants of the above with certain lines removed or altered (as commented), All 3 of the variant versions work perfectly fine causing no crash.
As shown in the category of the verbs and this thread's title I'm inclined to believe it's tied to BOTH mutable appearances and pixel_w, as pixel_w was the only var I could use to crash it, and even then it has to be obtained from another appearance using :
tl;dr pasting the 4 snippet below into Dream Seeker and testing the verbs should explain it all. (You will have to restart Dream Seeker a minimum of 4 times as 3 of the times remove your verbs preventing you testing the others and the other is an actual crash)
Code Snippet (if applicable) to Reproduce Problem:
/mob/verb/mutapp_crash() //Crashes DreamSeeker
set category = "pixel_w + Mutable Appearances = Crash"
set name = "Crash"
var/mutable_appearance/MA = new()
MA.pixel_w = appearance:pixel_w //variable obtained from src's appearance
for(var/a in MA.vars)
world << "[a] = [MA.vars[a]]"
appearance = MA
/mob/verb/no_mutapp_crash() //Does not crash DreamSeeker
set category = "pixel_w + Mutable Appearances = Crash"
set name = "No Crash - No var dump"
var/mutable_appearance/MA = new()
MA.pixel_w = appearance:pixel_w //variable obtained from src's appearance
appearance = MA
/mob/verb/no_mutapp_crash2() //Does not crash DreamSeeker
set category = "pixel_w + Mutable Appearances = Crash"
set name = "No Crash - Integer pixel_w"
var/mutable_appearance/MA = new()
MA.pixel_w = 32 //A number
for(var/a in MA.vars)
world << "[a] = [MA.vars[a]]"
appearance = MA
/mob/verb/no_mutapp_crash3() //Does not crash DreamSeeker
set category = "pixel_w + Mutable Appearances = Crash"
set name = "No Crash - No Appearance Assignment"
var/mutable_appearance/MA = new()
MA.pixel_w = appearance:pixel_w //variable obtained from src's appearance
for(var/a in MA.vars)
world << "[a] = [MA.vars[a]]"
Expected Results:
Set the pixel_w value of a mutable appearance to the one found in src's appearance using the : operator, output all the variables the mutable appearance has and the variables' values, then assign src's appearance to the mutable appearance.
Actual Results:
Dream Seeker crash.
Does the problem occur:
Every time? Or how often? Every time, without fail
In other games? Any game that uses this snippet of code, I assume
In other user accounts? Assume yes
On other computers? Assume yes
When does the problem NOT occur?
As shown in the examples, it's a very specific bug
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
Prior to 511, obviously, as neither mutable appearances or pixel_w existed