ID:2229337
 
Resolved
Attempting list operations on some bad overlay lists could cause a crash.
BYOND Version:511.1378
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 56.0.2924.87
Applies to:Dream Daemon
Status: Resolved (511.1379)

This issue has been resolved.
Descriptive Problem Summary:
My server keeps crashing. The round ends just fine, but somewhere during the reboot/startup something goes horribly wrong and the entire dreamdaemon crashes without warning or logs of anything.
The only thing I could get from it was this:
Unhandled exception at 0x5281FCAF (byondcore.dll) in dreamdaemon.exe: 0xC0000005: Access violation reading location 0x0000003C. If there is a handler for this exception, the program may be safely continued.


So I'm not sure if you have any idea what that may mean, or what I could try to get an idea of what it is, that could work too. But for the moment I am unsure what this means or why it happens.


Do you have the crash details from the Windows event viewer?
Faulting application name: dreamdaemon.exe, version: 5.0.511.1378, time stamp: 0x58d544d6
Faulting module name: byondcore.dll, version: 5.0.511.1378, time stamp: 0x58d5446b
Exception code: 0xc0000005
Fault offset: 0x000dfcaf
Faulting process id: 0x23e4
Faulting application start time: 0x01d2a70838ef7838
Faulting application path: C:\Program Files (x86)\BYOND\bin\dreamdaemon.exe
Faulting module path: C:\Program Files (x86)\BYOND\bin\byondcore.dll
Report Id: c5e53ee8-9be5-473e-96f6-77a84c11cf72
Faulting package full name:
Faulting package-relative application ID:


AND

Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: dreamdaemon.exe
P2: 5.0.511.1378
P3: 58d544d6
P4: byondcore.dll
P5: 5.0.511.1378
P6: 58d5446b
P7: c0000005
P8: 000dfcaf
P9:
P10:



Thats all I can find in the event viewer.
You listed the wrong version in the bug report information. That isn't 510.
I wasn't able to select beta/511, I would have if it was included. But it's latest beta yeah.
There's an Other... option in the dropdown. With beta versions you should put in the full version number including minor build. "511 latest" also isn't a good choice because "latest" isn't a meaningful term with the beta; new releases come out too often.
Alright, understandable. version was 511.1378
I found the spot where this was crashing but not the reason. Apparently you tried to access the overlays list of something that didn't have a proper appearance set. That shouldn't happen, though, so I'm a little confused on that. However, I was able to add a sanity check against further crashes in that routine and a few others like it.
Lummox JR resolved issue with message:
Attempting list operations on some bad overlay lists could cause a crash.
To come back on this, do you have any idea what object/type/whatever is crashing the server so I can look into it? It's still crashing 3-4 times per day, after multiple reboots it starts to function again until eventually it breaks again.
No, there's no indication of which object type is causing the crash. All I can tell you is that you're doing something like overlays[n] or maybe copying the overlays list (or looping through it, which also creates a copy), and that's the point where the crash is happening.
Crashes are still persistent at roughly the same time. Also world.cpu seems to rise to 65524 some times and gets stuck in some kind of loop. I tried to message you but not to my suprise there was no answer.

Event log crash dump:

Log Name: Application
Source: Application Error
Date: 8-4-2017 22:57:44
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: DESKTOP-90L1P0L
Description:
Faulting application name: dreamdaemon.exe, version: 5.0.511.1379, time stamp: 0x58e7bb52
Faulting module name: byondcore.dll, version: 5.0.511.1379, time stamp: 0x58e7baea
Exception code: 0xc0000005
Fault offset: 0x00151dd1
Faulting process id: 0xf2c
Faulting application start time: 0x01d2b0940333104c
Faulting application path: C:\Program Files (x86)\BYOND\bin\dreamdaemon.exe
Faulting module path: C:\Program Files (x86)\BYOND\bin\byondcore.dll
Report Id: c7031bf2-51d7-432d-8013-395ff854f011
Faulting package full name:
Faulting package-relative application ID:
Event Xml:



1000
2
100
0x80000000000000

2803
Application
DESKTOP-90L1P0L



dreamdaemon.exe
5.0.511.1379
58e7bb52
byondcore.dll
5.0.511.1379
58e7baea
c0000005
00151dd1
f2c
01d2b0940333104c
C:\Program Files (x86)\BYOND\bin\dreamdaemon.exe
C:\Program Files (x86)\BYOND\bin\byondcore.dll
c7031bf2-51d7-432d-8013-395ff854f011






Problem likely solved, no need for further help.
It looks like this crash is a similar one, but in a different place. I believe it's happening when you're adding to an overlays list that isn't valid.

Are you by any chance keeping a reference to an overlays list somewhere, and working with that instead of something like atom.overlays directly? That is, does anything in your code follow this pattern?

var/olay_list = object.overlays
...
olay_list += something

I can throw in more sanity checks, but it seems likely that there's something amiss in the code causing this, and I'd like to get to the bottom of what that is so I can make sure there aren't any other potential gotchas.
I recieved a runtime error for the first time ever, it was related to overlays.Cut() but i am unsure if it was that or somehing unrelated. error says list index out of bounds.
Is Cut() even valid on overlays?
Correction, the error was on underlays.Cut(), The help screen says it's valid to use. I'll add some checks to see if that helps at all.
I'm really curious how you're using Cut() for those lists, there's not a ton of instances where I know of that using it is helpful on underlays/overlays and I'd like to learn one :)
If you want to shoot over a link to your code via PM I'd like to take a look. Mainly I want to know what it is your code is doing that triggers this class of issues, and therefore how I can get ahead of similar issues.