CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.62k stars 4.17k forks source link

Mapgen error: tried to generate map for omtype (PR 8029) #26143

Closed evankimori closed 1 year ago

evankimori commented 6 years ago

Describe the bug
DEBUG : Error: tried to generate map for omtype , "nothing" (id_mapgen )

FUNCTION : void map::draw_map(oter_id, oter_id, oter_id, oter_id, oter_id, oter_id, oter_id, oter_id, oter_id, oter_id, oter_id, const time_point&, float, int, const regional_settings*) FILE : src/mapgen.cpp LINE : 6519

To Reproduce
Savegame attached for reproduction. Overmap shows "%nothing" generated as a point. On attempting to approach: the above error is produced when reaching close to the site. Screenshot below shows the result. No building is generated aside from the wooden floor and an over-shadow. Tiles count as floor but no roof.

Expected behavior

Screenshots
weird

Versions and configuration(please complete the following information): Game PR 8029 version.

MODLIST: "dda", "craftgp", "safeautodoc", "brightnights", "makeshift", "More_Survival_Tools", "modular_turrets", "Salvaged_Robots", "crazy_cataclysm", "alt_map_key", "Mining_Mod", "boats", "deoxymod", "necromancy", "no_rivtech_guns", "no_olg_guns", "no_flaming_weapons", "no_medieval_items", "more_classes_scenarios", "manualbionicinstall", "sleepdeprivation", "StatsThroughSkills"

Additional context
Crazy Test 2.0.zip

ralreegorganon commented 5 years ago

I think this is basically a non-issue / working as intended.

What is happening here is that an overmap was generated which included a particular overmap_terrain type, and then subsequent to that but prior to entering the vicinity of that overmap terrain location, that overmap_terrain definition was removed.

When the game attempts to load the overmap, it will provide an error message of the form Loaded bad ter! ter **name_of_overmap_terrain**, which is its indication that this has occurred. It will then treat that entry as the nothing overmap_terrain.

Later, when the player gets close enough to the location to cause mapgen to occur, the game will attempt to do mapgen for the nothing entry, which triggers the error listed in this bug report: DEBUG : Error: tried to generate map for omtype , "nothing" (id_mapgen ).

This is all functioning as expected, and the actual issue here is the removal of an overmap terrain which was included in the overmap at generation--the most common source of that being removing or updating mods for an existing save game: even seemingly innocuous changes like a mod renaming one of its existing overmap terrain ids to fix a typo will cause errors for existing save games that have references to it.

kevingranade commented 5 years ago

That sounds right, and I can't think of another trigger for this other than catastrophic failures like filesystem or memory corruption.

As such I'm removing it as a 0.D blocker, but it's still worth considering whether we can trigger a better fallback, at least in some situations.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

Night-Pryanik commented 1 year ago

Closing as stale, since stalebot can't do this by itself.