ID:121904
 
BYOND Version:493
Operating System:Windows XP Pro
Web Browser:Firefox 8.0.1
Applies to:Dream Maker
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.
Build: 492 & 493.1117
Repro Steps:
- Open a new instance of dreammaker
- Select File -> New Environment and give any name
- Click OK for default name (or specify, doesn't matter)
- paste this in below the template (below step_size)
turf
icon = 'icon.dmi'
icon_state = "grass"

- Select File, New, Select "Map File (.dmm)" from the DDL
- Specify "map" for the Name: input and click OK

Expected:
No map errors and map loads fine (but blank) given this scenario

Actual:
Alert dialog pops up with: "Due to compliation errors, the object tree cannot be trusted for map generation. These error must be corrected before editing the map."

After clicking OK, you get another alert dialog with: "Unable to read map.dmm" and you can click OK.

Notes:
I'm left with artifacts because my .dm code is showing in the map window since BYOND did not repaint that window. As a new user, I could get pretty confused and scared off with such behavior. The workaround wasn't to add an icon with a grass state but to delete the "bad" map and add a new one. If you do these steps in just about any different order, you don't run into the issue so it is isolated and could be considered a corner case although, adding a turf as the first thing you do couldn't be that much of a stretch.
Attempting to reproduce this failed for me, or at least didn't produce what I was expecting. I didn't use the icon lines you mentioned because I didn't have an icon handy to use (you also didn't include in your steps that this would be required). Setting text for the icon worked fine; a map was created without incident. Using the icon/state lines with the icon that doesn't exist, and/or using the lack of indentation above (I'm not sure if that was intended), causes the map creation to fail as you described but it's not a corrupt map because fixing the code makes the map accessible.
Lummox JR changed status to 'Unverified'
added dm tags to repro steps. follow steps exactly and make no assumptions.
Okay, then that clarifies the issue for me but it's also something I tried. I redid the whole thing to confirm.

The map is not in a corrupt state; the code is. Fixing the code by supplying the missing icon or removing the icon.dmi reference allows the code to be recompiled and the map to be opened.
actually, adding icon.dmi, with a grass icon does not fix problem. you have to delete the map and add new one. new users would be clueless and when asking for help, other folks may also get stumped. if no forum posts, perhaps its not worth the time to address.
fyi: typing with on-screen keyboard.
Does recompiling fix it though? When I removed the offending icon line and recompiled, I was able to access the map. Since the error message mentions compilation errors I'd think that would be straightforward enough for most users.

Kudos for managing the <dm> tags and tabs on a mobile keyboard. I'm beginning to wonder if having some basic HTML buttons in the editor here would be worthwhile.
recompiling results in more of the same errors which is why this is more of an issue.

removing lines that look andare in fact valid (after adding icon) is not what most poeple would do.

not so much a corrupt map but instead a corrupt DM state that isn't too hard to get into.

Well I mean recompiling after fixing the errors. That ought to always work.
I did add the icon.dmi file and the grass icon. That should technically fix the problems after clean compiling but it doesn't. You have to delete the map or delete the valid code, compile, and then re-add whichever you deleted.

That's more of an unexpected workaround than anything. :)

Technically speaking, there were never any errors introduced by the user. I should be able to add code and a map file without ever experiencing any errors until I compile or try to open the map. In this scenario, this problem surfaces the moment you add the map. If the initial errors didn't present themselves then this is what I would expect.

If I compile in this scenario, I expect a compile time error about a missing icon.dmi file.

If I try to view the map in this state, I would expect no errors and to simply get a black screen with no available icons. Another option would be to get an error or warning message about a missing icon.dmi file.
I followed the steps, then commented out the icon definition and tried to include the map and got this:

loading my-test-environment.dme
my-test-environment.dme:17:error: unable to open "map.dmm".
my-test-environment.dmb - 1 error, 0 warnings (double-click on an error to jump to it)

Without the map file included the code does compile. With the map file included I get that error and cannot edit the map. Since I wasn't even asked for the map size it wouldn't be a problem if Dream Maker just deleted the map file.

PopLava wrote:
As a new user, I could get pretty confused and scared off with such behavior.

As a new user, you wouldn't have declared a turf and set its icon to a file you haven't created yet.
In response to Forum_account (#10)
Forum_account wrote:
As a new user, you wouldn't have declared a turf and set its icon to a file you haven't created yet.

It's an easy to reproduce scenario when you copy code from an existing project into a new project and then go to create the icon and map files. The repro is trivial and has probably been hit by a fair number of people who didn't know what to do with it.