Cataclysm-dda: Tried to access invalid map position after turning off z-levels

Created on 22 Jan 2020  路  5Comments  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug

Repeated errors like this:

ERROR : src/map.cpp:7814 [size_t map::get_nonant(const tripoint&) const] Tried to access invalid map position at grid (7,-1,-3)

occurring when attempting to leave a circle about 3 overmap tiles in radius surrounding a lab. Probably not by coincidence, the circle is centered on where I was standing when I disabled experimental Z-levels and reloaded the game; other weird things began occurring at the same time.

Steps To Reproduce

I don't know if this will reproduce the error but it's what I did leading up to it:

  1. Start a new game, but forget that experimental z-levels were set to ON by default
  2. Approach a lab and hear all kinds of gunfire and commotion from the activity underground
  3. Go to current world options and turn OFF experimental z-levels
  4. Save game, exit and restart CDDA
  5. Reload game and continue
  6. Wait 5 minutes: underground gunfire continues, but zombie corpses and ammo belts pop up onto the pavement
  7. Walk or ride motorcycle away from the area - get "tried to access invalid map position" errors nonstop as soon as I leave the circle

Expected behavior

Expected game to continue normally with z-levels off, and for everything to stay on its own level. And of course expected no errors. Wasn't expecting the teleporting corpses either, but appreciated the free loot.

Screenshots

Here is the kind of thing I was seeing in the logs with experimental z-levels on. Corpses, ammo casings, and even blood splatters appeared on the ground outside. I have not even entered this lab.

image

I put a few map markers down when I found the edges of the circle. I was standing at @ when I turned off z-levels. Outside the red Es, errors happen on every movement:

image

Versions and configuration


- OS: Linux
- OS Version: LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch; Distributor ID: Ubuntu; Description: Ubuntu 18.04.3 LTS; Release: 18.04; Codename: bionic;
- Game Version: 0.D-11480-gdcdef1eefc [64-bit]
- Graphics Version: Tiles
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Vehicle Additions Pack [blazemod],
Tanks and Other Vehicles [Tanks],
Stats Through Kills [stats_through_kills],
Stats Through Skills [StatsThroughSkills],
Disable Religious Texts [no_religious_Texts]
]

Additional context

Unwilling to be stuck at this lab, I escaped with the following workaround:

  1. Turn experimental z-levels back ON
  2. Save, restart, reload
  3. Go far away from the lab
  4. Turn z-levels back OFF, save, restart etc.
  5. Load game - back to normal, wide travel allowed, no errors

Furthermore, I wasn't able to reproduce the original error by following my original steps at the same lab. Though, on the second try I didn't notice any teleporting items, so perhaps that is what triggered it.

Most helpful comment

Please do not fiddle with world options mid-game - it would lead to unexpected results.

All 5 comments

I don't that this is an issue, I'd expect editing world settings after creating a world to make issues.

Please do not fiddle with world options mid-game - it would lead to unexpected results.

Yeah, for now the "fix" is starting without and not using Z levels if you are worried the extra CPU use/extra interruptions/small bugs, are interfering with gameplay. I like the idea of Z levels, but I'm patient at waiting for the devs to finish it before it becomes integrated into my main playstyle/runthroughs.

Here is the kind of thing I was seeing in the logs with experimental z-levels on. Corpses, ammo casings, and even blood splatters appeared on the ground outside. I have not even entered this lab.

I would suggest re posting this bug as just the faults/errors/bugs from the Z-level game (assuming it had no edits when the bugs happened). That may be the start to fixing the problem, without confusing things by deactivating Z levels at the wrong time in the game options.

@anothersimulacrum @ZhilkinSerg Fair enough; I realize that messing with world options in mid-game is asking for weirdness. I've toggled z-levels in previous games occasionally with no issues, so this was just unexpected. Won't hurt my feelings to close this one.

@TechyBen Regarding the potential side-bug, I misspoke - that weirdness happened only after setting z-levels to "false". I toggled it back on again briefly later, but the teleporting corpses and stuff was with it off.

I also like the idea of z-levels, but prefer to leave it off to keep performance tolerable on my older hardware. I meant to start this game with it off, but somehow I must have turned it on in my world defaults. It's off now for good! I just hope my current game is safe to continue playing with it turned off. Guess I'll find out when I finally enter that lab.

I'm closing this for now, as toggling z-levels mid-game is unsupported.
We probably could also permit doing this only for new worlds.

Was this page helpful?
0 / 5 - 0 ratings