ID:1714988
 
BYOND Version:507
Operating System:Linux
Web Browser:Firefox 36.0
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
This is something that only seems to happen often on one of our servers; when the compile will randomly spit out a DMB that runs but has all resources swapped randomly.

Today I re-did some of my tooling to work with 32-bit DMBs and ran it against a broken DMB, by the looks of it there are 2 extra bytes added in the middle of the world data right before the resource table resulting in it being read out completely mangled (although this might as well be the result of my tooling not being quite ready yet).

The weird part about this is that it only occurs randomly, recompiling the same code will result in a correct DMB.

This has been happening since at least 506, drop me a PM and I'll send you an example broken DMB.
Strange nobody reported this before, it's been a known issue among SS13 devs for a while (sometimes compiling will cause random icon swapping/absence en masse, fixed by recompiling).
I'd peg it at about 1 in 100 compilations, seemingly at random.
Will start saving the corrupted/clean pairs if it helps.

It's interesting that it's in the DMB, I'd guessed an insertion/deletion error in the resource index but assumed it'd be in the RSC.

Side note, this is often hilarious when it happens on a live server (click for full):

Question: Are you recompiling over a live server?

Volundr mentioned to me recently that there were issues with that sort of thing, because it was assumed that the .rsc was being read into memory at runtime--which it is not. Linux apparently does not lock the file as Windows does, which would prevent this kind of thing.

If this sort of thing were mixed with compilation, it could be that the .dmb is reacting to what it sees in the .rsc at the time that section is being built.
The files are built in a separate directory and copied over. The build winds up "broken" and wont work if the server is restarted, only if its rebuilt.

I can also recall this rarely happening on Windows.
Yeah, I'm on windows myself and seen it happen upon compiling locally, same with others who have run into it.

Possibly something with dream daemon not completely releasing it upon stopping server?
I'm always running Daemon idle during compiles (compile > start server > test > stop server > edit > repeat) if that helps.
I've had similar experiences with this, from what I could gather, it appeared to only happen when something was deleted or renamed and placed into a rsc, hence why I clean compile most of the time when making changes. Been a while since I've seen this.