ID:731560
 
Keywords: crash, dreammaker
Resolved
Games with lots of objects could crash DM during the object-tree generation.
BYOND Version:493
Operating System:Windows 7 Pro 64-bit
Web Browser:Firefox 12.0
Applies to:Dream Maker
Status: Resolved (499.1183)

This issue has been resolved.
Descriptive Problem Summary:
The Dream Maker IDE crashes when attempting to view all Object nodes for Space Station 13 game. Here is the detailed description from the Action Center -> Problem Details control panel:

Faulting application name: dreammaker.exe, version: 1.0.0.1, time stamp: 0x4e8ba0ba
Faulting module name: byondcore.dll, version: 0.0.0.0, time stamp: 0x4e8ba08f
Exception code: 0xc0000005
Fault offset: 0x000783cb
Faulting process id: 0x3628
Faulting application start time: 0x01cd2c80942d75cd
Faulting application path: C:\Program Files (x86)\BYOND\bin\dreammaker.exe
Faulting module path: C:\Program Files (x86)\BYOND\bin\byondcore.dll
Report Id: 4b1aa1f2-9875-11e1-b880-cc52af81b095

Numbered Steps to Reproduce Problem:
1. Download the complete Space Station 13 code from one of the github repositories. We've created our own fork which is what I've been testing with: https://github.com/ss13-daedalus/daedalus

2. Start DreamMaker and open daedallus.dme

3. Switch to "Object" tab and check "Show all nodes"

Does the problem occur:
Problem recreates every single time when "Show all nodes" is checked with this code. The code itself compiles and runs juts fine.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
Unknown. Version 493 is the first one I've started using.
I just discovered that the command line dm.exe compiler will also crash when run on this code with the "-o" switch.
When you click "Show all nodes" in the project that I'm working on, Dream Maker crashes. I don't know if this happens in all projects or just this one. I've made a copy of the source-code where I can easily reproduce it just in case.
In response to JBoer
This doesn't happen in my test project so we'll have to schedule a debug session, unless you can get your source code to us securely (eg, posting it somewhere with a pwd and paging or emailing us a pass).
In response to JBoer
You can just send it to [email protected].
In response to JBoer
Did you figure this out? It happens with tg station source code, which can be downloaded from google code repository:
svn checkout http://tgstation13.googlecode.com/svn/trunk/
In response to JBoer
A friend of mine and I are curious about what's going on with this too. In my testing, I noticed that only larger games with a lot of code that would generate a very high amount of nodes crash.
In response to JBoer
Well, there's your answer TheLionsRoar ;)

My assumption is that your project is producing a lot of nodes and that's why DreamMaker stops responding. This can happen for many reasons but what generally happens is that DreamMaker will start working again, eventually. Next time give it a couple of minutes and it should start working again.
<3 <3 <3 -- been back-and-forth with you for a while on this one, glad you finally nailed it down :)
Well, we'll see. The issue was with worlds with over 2^16 defined nodes (which is basically any path in your tree, so objects, object vars, etc); this is way more than we thought would be possible. Technically we haven't increased the limit but it should sort of silently ignore those nodes beyond the limit and hopefully work. It at least works for the SS13 source I tested, which wasn't actually hitting the limit but was close enough to cause problems.
If SS13 isn't causing problems I doubt anything current will :)
Bah, this is still causing some problems. I'll try to fix for the next version.
To be clear, this is only "sort of" resolved. I believe I have got the crash fixed but some objects in the tree may not show up due to the way this fix works. Essentially the problem is that there are too many objects for the var (a short) we're using, but changing that up will screw up too much internally so it'll require a longer investigation. This code was written in 1996 when we had no idea people would make games this big. Oops.
In response to Tom
Tom wrote:
To be clear, this is only "sort of" resolved. I believe I have got the crash fixed but some objects in the tree may not show up due to the way this fix works. Essentially the problem is that there are too many objects for the var (a short) we're using, but changing that up will screw up too much internally so it'll require a longer investigation. This code was written in 1996 when we had no idea people would make games this big. Oops.

facepalm
Well, practically speaking, it should be OK. It just means that you can't really use the "show all nodes" for extremely big games. It won't affect compilation and it shouldn't crash as it did before.
Tom resolved issue with message:
Games with lots of objects could crash DM during the object-tree generation.
Should have a proper fix now, with no hackery. 1182 was still crashing in some cases.