ID:92149
 
BYOND Version:462
Operating System:Windows XP Home
Web Browser:Firefox 3.5.8
Applies to:Dream Maker
Status: Deferred

This issue may be low priority or very difficult to fix, and has been put on the back burner for the time being.
Descriptive Problem Summary:
Dream Maker seems very unstable when compiling large, complex projects if the "Show All Nodes" option on the Object tab is checked. It will often (but not always) crash DM with a windows memory access violation error ('memory could not be "read"') in byondcore.dll or ntdll.dll.

This occurs particularly if a major error is present on compile (e.g. something that screws up the object tree), but can crash when no errors are present also. Both "Compile" and "Clean Compile" show the same crash.

This behaviour is seen reliably when editing the Goonstation version of SpaceStation13 (source available if necessary), which is large and complex. Noticed on all versions of DreamMaker since approx 440 up to 463.1065. Occurs under both XP Home/Pro and Vista Home Premium OSes.

Numbered Steps to Reproduce Problem:
1. Load Goonstation source code in DM.
2. Ensure "Show All Nodes" is checked.
3. (Optional) Introduce an error into the source.
4. Compile with "Compile" or "Clean Compile".
5. Crash.

Code Snippet (if applicable) to Reproduce Problem:
N/A

Expected Results:
No crash
Actual Results:
Crash!

Does the problem occur:
Every time? Or how often?
~75% of the time.
In other games?
Not able to reproduce for other projects, but Goonstation is by far the most complex project I have.
In other user accounts?
Yes.
On other computers?
Yes, 3 systems tried, all produce the crash.

When does the problem NOT occur?
If the "Show All Nodes" option is unchecked.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
Earliest version that has been tested is 440.1016, which shows the error.

Workarounds:
Ensure "Show All Nodes" is unchecked when compiling.
Testing this in my own more complex projects hasn't shown any problems. A sample project known to produce this issue reliably would be needed.

Since you have gotten crash details though, it would help if you could list the offset of the error when you get a crash in byondcore.dll or dreammaker.exe, and the exact build number. With the module and offset I can attempt to trace the error.
Here's a crash using 463.1065:

This is what appears in the "Error Signature" dialogue:

AppName: dreammaker.exe AppVer: 1.0.0.1 ModName: byondcore.dll
ModVer: 0.0.0.0 Offset: 0007258e

Closing this gives a second error dialogue:
AppName: dreammaker.exe AppVer: 1.0.0.1 ModName: byondcore.dll
ModVer: 0.0.0.0 Offset: 00072464

In this particular crash, I don't get the standard "memory could not be 'read'" dialogue after this, but this does happen for some crashes.

If you need any more info, let me know. I can get you the source code if necessary, but I will need to clear it with the other coders.

Something that may be useful: While reproducing this crash, I found I can trigger it by compiling without "Show all nodes" checked (which works fine), then it occurs immediately after checking the "Show all nodes" option (without recompiling). So it appears to me that it's linked to the act of rebuilding the object tree, rather than compiling. (The errors that appear have exactly the same module name, offset, etc., as shown above).
After tracing that information I've determined the problem is that DM is running out of memory during compilation. Unfortunately this is right smack dab in one of the blackboxiest parts of the compiler, so I'm not sure how I'd even have it generate an error message and abort.
I'm having this problem as well, crashing after compiling if "Show All Nodes" is checked, or crashing as soon as it is checked if it was unchecked during an earlier compile.

I have found that invoking dm.exe from the command line and then updating from within dream maker afterwards doesn't have a problem, regardless of whether it is checked or not.