ID:1774884
 
Resolved
BYOND Version:506
Operating System:Windows 7 Pro
Web Browser:Firefox 31.0
Applies to:Dream Daemon
Status: Resolved

This issue has been resolved.
While testing some stuff locally a completely unrelated and unaltered object and file spat out runtimes on world start about writing to a read only variable. The live server running the code has never had this occur.

runtime error: writing to read-only variable
proc name:
source file: supermatter.dm,68
usr: null
src: Supermatter Shard (/obj/machinery/power/supermatter/shard)
call stack:
Supermatter Shard (/obj/machinery/power/supermatter/shard): ()
Supermatter Shard Crate (/obj/structure/closet/crate/secure/large/reinforced/shard): New(the floor (100,59,1) (/turf/simulated/floor))


--Starting source--
/obj/structure/closet/crate/secure/large/reinforced/shard
name = "Supermatter Shard Crate"
New()
..()
sleep(2)
new /obj/machinery/power/supermatter/shard(src)


supermatter.dm
line 68 doesn't even point to a read only variable.
related id:1613720
I don't believe this is related since locally I haven't added any new procs just have been trying to figure out an unrelated bug.
Mostly related because of the error it suggests:

runtime error: writing to read-only variable

One would think they'd have the same circumstances due to it being SS13.
Fair enough.
Seems this runtime goes away with 507 which is why ive not seen it on the live server. I guess i downgraded my local client to 506 for some reason and thought i was still on 507.
This one looks like it's screwing with the VM at runtime (instruction stream corruption?), since the following logs show random garbage errors soon after this one.

Examples (courtesy of Angelite)
[...] indicates expected debug output (regarding the database, jukebox, genetics, and instance profiling).
[END] indicates end of log: dream daemon crashed at this point.

[...]
runtime error: writing to read-only variable
proc name:
source file: supermatter.dm,68
usr: null
src: Supermatter Shard (/obj/machinery/power/supermatter/shard)
call stack:
Supermatter Shard (/obj/machinery/power/supermatter/shard): ()
Supermatter Shard Crate (/obj/structure/closet/crate/secure/large/reinforced/shard): New(the floor (100,59,1) (/turf/simulated/floor))
[...]
runtime error: BYOND Error: bad instruction: 318
proc name: follow tube (/obj/structure/transit_tube_pod/proc/follow_tube)
source file: transit_tubes.dm,317
usr: null
src: the transit tube pod (/obj/structure/transit_tube_pod)
call stack:
[END]


[...]
runtime error: writing to read-only variable
proc name:
source file: supermatter.dm,68
usr: null
src: Supermatter Shard (/obj/machinery/power/supermatter/shard)
call stack:
Supermatter Shard (/obj/machinery/power/supermatter/shard): ()
Supermatter Shard (/datum/supply_packs/supermatter_shard): New()
supply shuttle (/datum/controller/process/supplyShuttle): setup()
/datum/controller/processSched... (/datum/controller/processScheduler): addProcess(supply shuttle (/datum/controller/process/supplyShuttle))
/datum/controller/processSched... (/datum/controller/processScheduler): setup()
: New()
[...]
runtime error: Cannot read null.turf
proc name: Del (/atom/movable/Del)
source file: atoms_movable.dm,49
usr: null
src:
call stack:
Del()
/datum/effect/effect/system/tr... (/datum/effect/effect/system/trail/space_trail): start()
the floor (177,118,1) (/turf/simulated/floor): build lighting area("/area/science/roboticssd_L5#0f...", 5, 2)
the floor (177,118,1) (/turf/simulated/floor): shift to subarea()
lighting (/datum/controller/process/lighting): doWork()
lighting (/datum/controller/process/lighting): process()
/datum/controller/processSched... (/datum/controller/processScheduler): runProcess(lighting (/datum/controller/process/lighting))
[END]

Here's the (ir)relevant section of supermatter.dm (line numbers on left):

 [...]
15 | /obj/machinery/power/supermatter
16 | name = "Supermatter Crystal"
[...]
67 | //Add types to this list so it doesn't make a message or get desroyed by the Supermatter on touch.
68 | var/list/message_exclusions = list(/obj/effect/effect/sparks)

As you can see, the var shouldn't be read-only, and that's the final line in the definition (the following section defines the .../shard subtype).

Angelite reported that upgrading to BYOND version 507 resolved the issue.

May be related to this bug as well:
http://www.byond.com/forum/?post=1704068
(cause still unknown, likely due to some internal compiler limitations fixed by Lummox in 507).
Lummox JR resolved issue