ID:97859
 
This issue has been marked as a duplicate of id:95158
BYOND Version:470
Operating System:Linux
Web Browser:
Applies to:Dream Daemon
Status: Duplicate

This issue has been marked as a duplicate of id:95158
Descriptive Problem Summary:

Numbered Steps to Reproduce Problem:

Code Snippet (if applicable) to Reproduce Problem:
BUG: Fmem block size at 39 is 54179/53248 with type 1.
BUG: Error reading file memory structureFile offset: 39
Real position: 44/53248
BUG: Ccorrupt or invalid savefile '/home/byondsrv/.byond/cache/359C7E0F'
BUG: Attempting auto-recovery of '/home/byondsrv/.byond/cache/359C7E0F'
BUG: Failed to backup savefile; aborting
BUG: Aborted restoration
BUG: Crashing due to an illegal operation!
proc name: safe load (/proc/safe_load)
usr: null
src: null
call stack:
safe load( (/savefile))
Jupiter845 (/client): Load()
Jupiter845 (/client): New()

Backtrace for BYOND 470.1075 on Linux:
Generated at Thu Jul 1 01:46:11 2010

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a458]
libbyond.so [0x3c7000, 0x0], 0x156ceb
[0x7de000, 0x7de40c], [0x7de000, 0x7de40c]
libbyond.so [0x3c7000, 0x0], 0x156ceb
libbyond.so [0x3c7000, 0x0], 0x15f031
libbyond.so [0x3c7000, 0x0], 0x16273e
libbyond.so [0x3c7000, 0x0], 0x1dc290
libbyond.so [0x3c7000, 0x0], 0x1d57cd
libbyond.so [0x3c7000, 0x0], 0x1d6969
libbyond.so [0x3c7000, 0x0], 0x1c7e5a
libbyond.so [0x3c7000, 0x0], 0x1d55d0
libbyond.so [0x3c7000, 0x0], 0x1c3c19
libbyond.so [0x3c7000, 0x0], 0x1b9ea5
libbyond.so [0x3c7000, 0x0], 0x1d40ab
libbyond.so 0x24c410, 0x24c56c
libbyond.so 0x2204f0, 0x220726
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x8049f54]
libc.so.6 0x16be0, 0x16cc6 (__libc_start_main)
DreamDaemon [0x8048000, 0x8049954], [0x8048000, 0x8049a61]


proc/safe_load(var/savefile/F)

var/text = F.ExportText("file")
if(copytext(text,1,14) != ". = filedata(")
return null

var/savefile/F2 = new(F["file"])

var/check = F.ExportText("hash")
var/hash = make_hash(text)
if(check != {". = "[hash]"\n"})
return null

return F2


Expected Results:
At the most, for it to error, and not totally crash out the server.

Actual Results:
Certain users are using this "bug" to crash game servers. I do have a copy of the Save File they are using which has been confirmed to cause this issue. I can provide it to BYOND staff (but obviously not going to post it publically here....)

Does the problem occur:
Every time? Or how often? Everytime someone uses the malformed save file.
In other games? Probably. This is from Garthor's Safe_Save lib.
In other user accounts? Yes.
On other computers? Yes.

When does the problem NOT occur?
Under all other normal conditions.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? It's happened in the past, and is still happening. Probably the same user, and the keys in question associated with the crashing tend to be ones just created. No doubt since the others have been banned.

Workarounds:

To remove the safe_save protection? This issue was reported once before and it was suggested that ExportText() was the cause.
You can send the savefile to me at [email protected]. Depending on the contents I may also need game source to test the issue.