Sometimes, when the server starts up, certain resources seem to get corrupt (but I can't exactly verify this). For instance:
Some hair sprites seem to become off-centered and glitched, with no discernible fix or workaround. This only happens like 1 in 40 times the game server is started - the broken visuals affect all players and cannot be fixed by relogging. The server must be restarted.
But when a player with a broken sprite relogs, because we iterate through all overlays to generate a flat image preview of a player, the server crashes with the following output:
BUG: Crashing due to an illegal operation!
proc name: SaveCharacter (/proc/SaveCharacter)
source file: save&loading.dm,16
usr: Chance!! (/mob/player)
src: null
usr.loc: the road (59,233,1) (/turf/map/road)
call stack:
SaveCharacter(Chance!! (/mob/player), 1)
Chance!! (/mob/player): Logout()
Backtrace for BYOND 509.1318 on Linux:
Generated at Sat Dec 26 09:19:10 2015
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804bb24]
libbyond.so [0xf71cb000, 0x0], 0x2862bd
linux-gate.so.1 [0xf76f3000, 0xf76f3d50], [0xf76f3000, 0xf76f3d50]
libbyond.so [0xf71cb000, 0x0], 0x2862bd
libbyond.so [0xf71cb000, 0x0], 0x1a7032
libbyond.so [0xf71cb000, 0x0], 0x1a791b
libbyond.so [0xf71cb000, 0x0], 0x24540c
libbyond.so [0xf71cb000, 0x0], 0x248fc3
libbyond.so [0xf71cb000, 0x0], 0x249f6b
libbyond.so [0xf71cb000, 0x0], 0x1a7b25
libbyond.so [0xf71cb000, 0x0], 0x1a71e5
libbyond.so [0xf71cb000, 0x0], 0x1a7858
libbyond.so [0xf71cb000, 0x0], 0x24a95f
libbyond.so [0xf71cb000, 0x0], 0x22aa30
libbyond.so [0xf71cb000, 0x0], 0x24082e
libbyond.so [0xf71cb000, 0x0], 0x22e486
libbyond.so [0xf71cb000, 0x0], 0x24082e
libbyond.so [0xf71cb000, 0x0], 0x248eb3
libbyond.so [0xf71cb000, 0x0], 0x249f6b
libbyond.so [0xf71cb000, 0x0], 0x1ac8df
libbyond.so [0xf71cb000, 0x0], 0x266c98
libbyond.so [0xf71cb000, 0x0], 0x266e8c
libbyond.so [0xf71cb000, 0x0], 0x24d7b5
libbyond.so [0xf71cb000, 0x0], 0x258314
libbyond.so [0xf71cb000, 0x0], 0x2de845
libbyond.so 0x2e0970, 0x2e10ed
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804ae34]
libc.so.6 0x19970, 0x19a63 (__libc_start_main)
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a731]
Recent proc calls:
/proc/getFlatIcon
/DBQuery/proc/Close
/DBQuery/proc/Execute
/DBQuery/New
/DBQuery/proc/(init)
/DBConnection/proc/NewQuery
/DBConnection/proc/IsConnected
/DBConnection/proc/IsConnected
/DBConnection/proc/Connect
/DBConnection/New
/proc/grab_mySQL_connection
/proc/SaveCharacter
/proc/tlength
/mob/player/Logout
/mob/npc/creature/proc/boss_loop
/mob/npc/creature/proc/boss_loop
To help the BYOND developers debug this, please send the above trace as part
of a very detailed bug report: http://www.byond.com/members/?command=view_tracker&tracker=1
save&loading.dm:16
// Grab the preview image in Base64
var/savefile/S = new()
var/data[] = getFlatIcon(P, dir = SOUTH)
var/icon/i = data[1]
S << i // 16
var/encoded_preview = S.ExportText()