ID:1832594
 
BYOND Version:507.1276
Operating System:Linux
Web Browser:Chrome 41.0.2272.118
Applies to:Dream Daemon
Status: Unverified

Thus far we've been unable to verify or reproduce this bug. Or, it has been observed but it cannot be triggered with a reliable test case. You can help us out by editing your report or adding a comment with more information.
Descriptive Problem Summary:Dream Daemon crashed after we spawned a bunch of NPCs to fight some players.
CPU/RAM usage was nominal though.

The BYOND hub reports that port 8000 is reachable.
BUG: Finished erasure with refcount=1 (ref=3:605) DM (items.dm:1742)
BUG: Sequence number FF78 expected but 81 received
BUG: Sequence number 631B expected but 81 received
BUG: Unexpected hub certificate (5)
BUG: Unexpected hub certificate (65535)
BUG: Unexpected message 26,52
BUG: Finished erasure with refcount=1 (ref=3:667) DM (items.dm:1742)
BUG: Unexpected hub certificate (65535)
BUG: Finished erasure with refcount=1 (ref=3:606) DM (items.dm:1742)
BUG: Unexpected certificate (2)
BUG: Crashing due to an illegal operation!

Backtrace for BYOND 507.1276 on Linux:
Generated at Tue Apr 14 20:32:44 2015

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804bb74]
libbyond.so [0xf7243000, 0x0], 0x1bf76b
[0xf7758000, 0xf7758410], [0xf7758000, 0xf7758410]
libbyond.so [0xf7243000, 0x0], 0x1bf76b
libbyond.so [0xf7243000, 0x0], 0x20a4d8
libbyond.so [0xf7243000, 0x0], 0x20bbf5
libbyond.so [0xf7243000, 0x0], 0x2362c6
libbyond.so [0xf7243000, 0x0], 0x21b09b
libbyond.so [0xf7243000, 0x0], 0x22d4be
libbyond.so [0xf7243000, 0x0], 0x235b83
libbyond.so [0xf7243000, 0x0], 0x2372ab
libbyond.so [0xf7243000, 0x0], 0x1a7f7e
libbyond.so [0xf7243000, 0x0], 0x230077
libbyond.so [0xf7243000, 0x0], 0x235c93
libbyond.so [0xf7243000, 0x0], 0x2372ab
libbyond.so [0xf7243000, 0x0], 0x1a3b98
libbyond.so [0xf7243000, 0x0], 0x1a3e3d
libbyond.so [0xf7243000, 0x0], 0x27c59a
libbyond.so [0xf7243000, 0x0], 0x21e7df
libbyond.so [0xf7243000, 0x0], 0x22d4be
libbyond.so [0xf7243000, 0x0], 0x235b83
libbyond.so [0xf7243000, 0x0], 0x2364f0
libbyond.so [0xf7243000, 0x0], 0x21b5b6
libbyond.so [0xf7243000, 0x0], 0x2146ef
libbyond.so [0xf7243000, 0x0], 0x22d28c
libbyond.so [0xf7243000, 0x0], 0x22ea25
libbyond.so [0xf7243000, 0x0], 0x1f6e23
libbyond.so 0x305050, 0x30519a
libbyond.so 0x2d3800, 0x2d3a02
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804af24]
libc.so.6 0x19990, 0x19a83 (__libc_start_main)
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a7b1]

Recent proc calls:
/turf/Enter
/mob/NPC/Enemies/proc/Wander
/mob/NPC/Enemies/proc/state
/atom/movable/SteppedOn
/turf/Entered
/turf/Exited
/turf/Enter
/mob/NPC/Enemies/proc/Wander
/mob/NPC/Enemies/proc/state
/atom/movable/SteppedOn
/atom/movable/SteppedOn
/turf/Entered
/turf/Exited
/turf/Enter
/mob/NPC/Enemies/proc/Wander
/mob/NPC/Enemies/proc/state
/atom/movable/SteppedOn
/turf/Entered
/atom/movable/SteppedOff
/atom/movable/SteppedOff
/turf/Exited
/turf/Enter

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


Does the problem occur:
Every time? Or how often? This is the first time it's occurred for us.

Related? http://www.byond.com/forum/?post=1425239
This was the error that occurred before the crash...

Waddiwasi (/obj/projectile): Bump(Troll (/mob/NPC/Enemies/Troll))
Tue Apr 14 20:32:44 2015
proc name: Enter (/turf/Enter)
source file: Cronicles.dm,15
usr: Floating Eye (/mob/NPC/Enemies/Floating_Eye)
src: Sea Floor (11,91,4) (/turf/Sea_Floor)
call stack:
Sea Floor (11,91,4) (/turf/Sea_Floor): Enter(Floating Eye (/mob/NPC/Enemies/Floating_Eye), Sea Floor (12,90,4) (/turf/Sea_Floor))
Floating Eye (/mob/NPC/Enemies/Floating_Eye): Wander()
Floating Eye (/mob/NPC/Enemies/Floating_Eye): state()
Floating Eye (/mob/NPC/Enemies/Floating_Eye): New(the sand (21,70,4) (/turf/sand))


The line in question is if(flyblock==2):
turf
Enter(atom/movable/O)
if(ismob(o))
if(flyblock==2)
for(var/atom/A in src)
if(A.density) return 0
return ..()
if(!density) return ..()
if(O:Gm && !O:flying) return ..()
if(!O:key) return ..()
else if(density&&flyblock)
return 0
return ..()
Crashed again, shortly after:

Tue Apr 14 20:36:29 2015
Auto-safety mode: safe (working directory access)
World opened on network port 8000.
Welcome BYOND! (5.0 Beta Version 507.1276)

Or this code can be embedded:
<iframe src="http://www.byond.com/play/embed/74.91.122.249:8000" width=640 height=480></iframe>

The BYOND hub reports that port 8000 is reachable.
*** Error in `DreamDaemon': double free or corruption (!prev): 0x099d89f8 ***
In your runtime error I don't actually see what the runtime error was, only the stack trace. I'm wondering if the runtime error itself might have a clue here. (I should also point out you have a typo in your code near the line in question: a lowercase O instead of uppercase.)

Some kind of heap corruption seems to be in play here though. Although 507.1276 is now out of date, I suspect the same issue would be present in a newer build.

Do you have source I could test this with, and a set of instructions that could reproduce a crash reliably? (If it crashes on startup sometimes, it's possible I might be able to get it to trigger just in the debugger.)
Your first trace shows it's a corrupted vars list, and crashes when the var is being read. So heap corruption is definitely involved.
In response to Lummox JR
Lummox JR wrote:
In your runtime error I don't actually see what the runtime error was, only the stack trace.
Yeah it was weird. There was no runtime error listed...

Do you have source I could test this with, and a set of instructions that could reproduce a crash reliably?
I can't reproduce it. :(


The developer said the game kept crashing over and over, then they re-clean-compiled and it fixed it. :/
All right, I'll mark this Unverified but if any new info comes up, please let me know.
Lummox JR changed status to 'Unverified'