Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basecamp expansion Workshop 2 Saltwater pipe crash #66318

Closed
PatrikLundell opened this issue Jun 19, 2023 · 4 comments · Fixed by #68619
Closed

Basecamp expansion Workshop 2 Saltwater pipe crash #66318

PatrikLundell opened this issue Jun 19, 2023 · 4 comments · Fixed by #68619
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! Map / Mapgen Overmap, Mapgen, Map extras, Map display Player Faction Base / Camp All about the player faction base/camp/site (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@PatrikLundell
Copy link
Contributor

Describe the bug

When trying to construct the first phase of a saltwater pipe the game terminates.

Callstack when debugging:
cataclysm-tiles.exe!std::string::size() Line 4276 C++
cataclysm-tiles.exe!std::hashstd::string::_Do_hash(const std::string & _Keyval) Line 5312 C++
cataclysm-tiles.exe!std::_Conditionally_enabled_hashstd::string,1::operator()(const std::string & _Keyval) Line 2170 C++
cataclysm-tiles.exe!cata::hash_combine<std::string,std::hashstd::string>(unsigned __int64 & seed, const std::string & v, const std::hashstd::string & hash) Line 21 C++
cataclysm-tiles.exe!cata::tuple_hash::operator()<std::string const ,cata_variant>(const std::pair<std::string const ,cata_variant> & v) Line 58 C++
cataclysm-tiles.exe!cata::hash_combine<std::pair<std::string const ,cata_variant>,cata::auto_hash<std::pair<std::string const ,cata_variant>>>(unsigned __int64 & seed, const std::pair<std::string const ,cata_variant> & v, const cata::auto_hash<std::pair<std::string const ,cata_variant>> & hash) Line 21 C++
cataclysm-tiles.exe!cata::range_hash::operator()<std::unordered_map<std::string,cata_variant,std::hashstd::string,std::equal_tostd::string,std::allocator<std::pair<std::string const ,cata_variant>>>>(const std::unordered_map<std::string,cata_variant,std::hashstd::string,std::equal_tostd::string,std::allocator<std::pair<std::string const ,cata_variant>>> & range) Line 76 C++
cataclysm-tiles.exe!std::hash<mapgen_arguments>::operator()(const mapgen_arguments & args) Line 35 C++
[External Code]

cataclysm-tiles.exe!basecamp_action_components::choose_components() Line 856 C++
cataclysm-tiles.exe!basecamp::common_salt_water_pipe_construction(const mission_id & miss_id, expansion_salt_water_pipe * pipe, int segment_number) Line 2662 C++
cataclysm-tiles.exe!basecamp::start_salt_water_pipe(const mission_id & miss_id) Line 2849 C++
cataclysm-tiles.exe!basecamp::start_upgrade(const mission_id & miss_id) Line 1826 C++
cataclysm-tiles.exe!basecamp::handle_mission(const ui_mission_id & miss_id) Line 1521 C++
cataclysm-tiles.exe!iexamine::bulletin_board(Character & you, const tripoint & examp) Line 1931 C++
cataclysm-tiles.exe!map_data_common_t::examine(Character & you, const tripoint & examp) Line 578 C++
cataclysm-tiles.exe!game::examine(const tripoint & examp, bool with_pickup) Line 6084 C++
cataclysm-tiles.exe!game::examine(bool with_pickup) Line 5940 C++
cataclysm-tiles.exe!game::do_regular_action(action_id & act, avatar & player_character, const std::optional & mouse_target) Line 2220 C++
cataclysm-tiles.exe!game::handle_action() Line 3014 C++
cataclysm-tiles.exe!do_turn() Line 538 C++
cataclysm-tiles.exe!WinMain(HINSTANCE__ * formal, HINSTANCE * __formal, char * __formal, int __formal) Line 826 C++
[External Code]

The last sane part of the call chain (before the hash juggling mumbo jumbo) was:
cataclysm-tiles.exe!basecamp_action_components::choose_components() Line 856
There args_ has the value of {map= {size=0}}, which doesn't seem reasonable, and is probably what causes the code to blow up (although the "find" function should have handled such a situation).

Attach save file

N/A

Steps to reproduce

  1. Create the workshop version 2 expansion (in a location reasonably close to a swamp, allowing for a pipe to be constructed).
  2. Spawn the equipment for making the saltwater pipe.
  3. Order the pipe to be constructed and verify that you accept that X additional jobs are required to finish it.
  4. Have the game terminate (or caught on an exception if debugging (at least when compiled with debugging: haven't tested debugging release mode))

Expected behavior

It would still work...

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.3086 (22H2)
  • Game Version: 0.G-2494-g22e9c95c2c [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Bionic Professions [package_bionic_professions]
    ]

Additional context

I think someone recently modified things to use maps rather than lists, and this may be a case that wasn't covered or tested properly.

@PatrikLundell PatrikLundell added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Jun 19, 2023
@Maleclypse Maleclypse added Map / Mapgen Overmap, Mapgen, Map extras, Map display Player Faction Base / Camp All about the player faction base/camp/site labels Jun 20, 2023
@PatrikLundell
Copy link
Contributor Author

I suspect #62498 to be the cause of this. Could someone knowledgeable (e.g. @mqrause ) please have a look at whether that's the case?

@mqrause
Copy link
Contributor

mqrause commented Jun 22, 2023

A quick glance at the code tells me it's likely not caused by #62498 because that only affects item components, but the issue here seems to be recipe requirements.

@PatrikLundell
Copy link
Contributor Author

Thanks for checking, and sorry to bother you.

@mqrause
Copy link
Contributor

mqrause commented Jun 22, 2023

It's not a bother, but I can't assist further with the issue currently.

@Maleclypse Maleclypse added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Jun 24, 2023
@NetSysFire NetSysFire added <Crash / Freeze> Fatal bug that results in hangs or crashes. Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! labels Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! Map / Mapgen Overmap, Mapgen, Map extras, Map display Player Faction Base / Camp All about the player faction base/camp/site (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants