CleverRaven / CleverRaven/Cataclysm-DDA

Error traceback after finished camp upgrade and character recall (map::unboard_vehicle: vehicle not found)

Open
#43,243 0 comments 0 reactions 0 assignees View on GitHub
<Bug>
Dominant language
C++
Stars
13.2k
Forks
4.6k
Avg merge
2d 1h
Merged PRs (30d)
205

Description

I went to the billboard and recalled a companion who had just finished digging a trench camp enhancement (NE). As I moved away from the board a traceback was generated. I hit space to ignore it, and it happened again, and again. It might be that it's possible to move back to previous locations without triggering the traceback, but moving north in the save triggers it.

A traceback report. I haven't seen anything actually misbehaving apart from that.

# Steps To Reproduce

I can't reproduce the creation of the situation, but the error is present in the save. Just move north.

# Expected behavior

No traceback...

# Screenshots
DEBUG : map::unboard_vehicle: vehicle not found

FUNCTION : void map::unboard_vehicle(const tripoint&, bool)
FILE : src/map.cpp
LINE : 998

# Versions and configuration

- OS: Windows
- OS Version: 10.0 1909
- Game Version: 0.E-2 [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food]
]

# Additional context
[Old Saybrook.zip](https://github.com/CleverRaven/Cataclysm-DDA/files/5129403/Old.Saybrook.zip)

The character save to load within the save is the second (lower) copy (it was duplicated in conjunction with a previous traceback, which has been reported).

[debug.log](https://github.com/CleverRaven/Cataclysm-DDA/files/5129388/debug.log)

It's entirely possible the NPC performing the camp upgrade was tasked with the job while on a vehicle when the order was given (the luxury RV or Craftmobile to the south, if so), although I've tried to assign jobs only to companions not tasked with anything, and thus following the PC around.

Edit: Starting the game (and save) with a debugger indicates that it's possible to get rid of the symptom by changing a variable (in_vehicle, I think it was called) when found to be true after a breakpoint. After that I tried to (laboriously) move the little horde into the luxury RV to the south, which seems to have cured it as well (this done in the "real" game installation).

I still don't know how it happened, and given that the task takes a couple of days, it's not trivial to test it out with game play.
I tend to set the companions to read skill books when not either working on the camp or set to assist the PC with crafting (which so far is essentially the same as cooking). A guess, though is that I might accidentally have ordered the camp task to be performed by a reading companion inside the RV (the light is on there, so reading is possible even when it's dark outside).
At a guess, however, the code teleporting companions away to perform camp tasks should also clear the flag claiming they're in a vehicle (I haven't looked at that code, or even located it, though).

Contributor guide

Open the contributing guide

Research direction

Load the lower character save from Old Saybrook.zip and review debug.log alongside src/map.cpp at line 998, where map::unboard_vehicle reports the missing vehicle. Investigate the camp-upgrade and companion-recall situation described in the issue; done means moving north after the upgrade and recall no longer produces the traceback.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.