CleverRaven / Cataclysm-DDA

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

unable to find assign mission target farm_isherwood_2 #47225

Open OromisElf opened 3 years ago

OromisElf commented 3 years ago

Describe the bug

It seems that the game can't find a suitable place for a quest I got from Mr Lapin, Warrener.

Steps To Reproduce

  1. In the save I uploaded, talk with Mr Lapin.
  2. Ask him if he knows anything about the outside world.
  3. Ask him if there's anyone nearby you should meet.
  4. Tell him that seems like a deal to you.
  5. The game will now freeze for some time before giving out the error code in title.
  6. Ignoring that error brings you back to the dialogue, as if you accepted that quest, with no map indicator of where to go and you can take that quest again by repeating steps 1-4.

Expected behavior

After step 4 I expect to get no error code and maybe not even that long of a freeze, before I exit the dialogue and can see on my map where to go. I also expect to not be able to take that quest again.

Screenshots

cdda_error

Versions and configuration

Additional context

This is my save: https://mega.nz/file/BfAQgTwS#sdKMy9k53ri274WLjE_x95GErn8YBffSR9Hr_Juk-Wk

and these (content adding) mods are not shipped with the game: non-shipped mods.zip

actual-nh commented 3 years ago

Ping: @Venera3? I'm just waking up, but it seems odd to me that it's _2.

actual-nh commented 3 years ago

47220 is likely related.

Venera3 commented 3 years ago

I did some preliminary testing (confirming both). The fact that the surrounding area is pretty much explored/revealed by maps plays a role, together with the fact that the farm has problems being placed at the best of times. A fresh game has no trouble generating a farm in a 2-400 tile range, but the mission can't place targets on already generated maps. Raising the search range works, but leads to prohibitive generation times.

I'll see what I can do to reduce the chances of this happening in the future, but for the affected saves debug spawning the farm in seems like the best solution.

Sirbab commented 3 years ago

I did some preliminary testing (confirming both). The fact that the surrounding area is pretty much explored/revealed by maps plays a role, together with the fact that the farm has problems being placed at the best of times. A fresh game has no trouble generating a farm in a 2-400 tile range, but the mission can't place targets on already generated maps. Raising the search range works, but leads to prohibitive generation times.

I'll see what I can do to reduce the chances of this happening in the future, but for the affected saves debug spawning the farm in seems like the best solution.

Thanks venera :) I'll do just that

actual-nh commented 3 years ago

BTW, a bit of an oddity I just noticed: in overmap.cpp, both get_sectors and place_specials_pass are shuffling the sectors.

tsulh commented 3 years ago

I just experienced a similar issue with cs_sex_shop building, below is the error message and the debug log.

DEBUG    : Unable to find and assign mission target cs_sex_shop.
FUNCTION : cata::optional<coords::coord_point<tripoint, (coords::origin)1, (coords::scale)2> > find_or_create_om_terrain(const tripoint_abs_omt&, const mission_target_params&)
 FILE     : src/mission_util.cpp
 LINE     : 252
-----------------------------------------
18:11:43.265 : Starting log.
18:11:43.265 INFO : Cataclysm DDA version 0.E-10026-gfb7f80eb04
18:11:43.265 INFO : [main] C locale set to en_GB.utf8
18:11:43.265 INFO : [main] C++ locale set to en_GB.utf8
18:11:43.265 INFO : SDL version used during compile is 2.0.9
18:11:43.265 INFO : SDL version used during linking and in runtime is 2.0.9
18:11:43.321 WARNING : opendir [lang/mo/] failed with "No such file or directory".
18:11:43.321 INFO : Number of render drivers on your system: 3
18:11:43.321 INFO : Render driver: 0/opengl
18:11:43.321 INFO : Render driver: 1/opengles2
18:11:43.322 INFO : Render driver: 2/software
18:11:43.323 INFO : [options] C locale set to en_GB.utf8
18:11:43.323 INFO : [options] C++ locale set to en_GB.utf8
18:11:43.337 INFO : Active renderer: 2/software
18:11:43.341 INFO : USE_COLOR_MODULATED_TEXTURES is set to 0
18:11:43.403 WARNING : opendir [./mods/] failed with "No such file or directory".
18:11:46.294 WARNING : opendir [./save/Tekonsha/mods] failed with "No such file or directory".
18:11:48.556 INFO : Loaded tileset: ASCIITiles
18:29:04.864 ERROR : (error message will follow backtrace)
    ./cataclysm-tiles(debug_write_backtrace(std::ostream&)+0x31) [0x5568364a3982]
    ./cataclysm-tiles(DebugLog(DebugLevel, DebugClass)+0x19c) [0x5568364a4a29]
    ./cataclysm-tiles(realDebugmsg(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0xac) [0x5568364a4c2c]
    ./cataclysm-tiles(+0xc01071) [0x5568368c6071]
    ./cataclysm-tiles(mission_util::assign_mission_target(mission_target_params const&)+0x2f) [0x5568368c6139]
    ./cataclysm-tiles(+0xc0120a) [0x5568368c620a]
    ./cataclysm-tiles(+0xc00a73) [0x5568368c5a73]
    ./cataclysm-tiles(std::function<void (mission*)>::operator()(mission*) const+0x1d) [0x5568368a7a07]
    ./cataclysm-tiles(mission::assign(avatar&)+0x155) [0x5568368a66b5]
    ./cataclysm-tiles(talk_function::assign_mission(npc&)+0x52) [0x5568369e35a8]
    ./cataclysm-tiles(talk_effect_t::apply(dialogue&) const+0x4a) [0x5568369c87e2]
    ./cataclysm-tiles(dialogue::opt(dialogue_window&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, talk_topic const&)+0xde1) [0x5568369d8c09]
    ./cataclysm-tiles(avatar::talk_to(std::unique_ptr<talker, std::default_delete<talker> >, bool, bool)+0x392) [0x5568369d91e0]
    ./cataclysm-tiles(game::chat()+0x10ca) [0x5568369da608]
    ./cataclysm-tiles(game::handle_action()+0x291c) [0x5568365e50b2]
    ./cataclysm-tiles(game::do_turn()+0x491) [0x55683658d2ff]
    ./cataclysm-tiles(main+0x13cb) [0x5568361b57c7]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f6f2592f09b]
    ./cataclysm-tiles(_start+0x2a) [0x5568362944aa]

    Attempting to repeat stack trace using debug symbols…
    debug_write_backtrace(std::ostream&)
    ??:?
    DebugLog(DebugLevel, DebugClass)
    ??:?
    realDebugmsg(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    ??:?
    find_or_create_om_terrain(coords::coord_point<tripoint, (coords::origin)1, (coords::scale)2> const&, mission_target_params const&)
    mission_util.cpp:?
    mission_util::assign_mission_target(mission_target_params const&)
    ??:?
    std::_Function_handler<void (mission*), mission_util::set_assign_om_target(JsonObject const&, std::vector<std::function<void (mission*)>, std::allocator<std::function<void (mission*)> > >&)::{lambda(mission*)#1}>::_M_invoke(std::_Any_data const&, mission*&&)
    mission_util.cpp:?
    mission_type::parse_funcs(JsonObject const&, std::function<void (mission*)>&)::{lambda(mission*)#1}::operator()(mission*) const
    mission_util.cpp:?
    std::function<void (mission*)>::operator()(mission*) const
    ??:?
    mission::assign(avatar&)
    ??:?
    talk_function::assign_mission(npc&)
    ??:?
    talk_effect_t::apply(dialogue&) const
    ??:?
    dialogue::opt(dialogue_window&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, talk_topic const&)
    ??:?
    avatar::talk_to(std::unique_ptr<talker, std::default_delete<talker> >, bool, bool)
    ??:?
    game::chat()
    ??:?
    game::handle_action()
    ??:?
    game::do_turn()
    ??:?
    main
    ??:?
    __libc_start_main
    /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:342
    _start
    ??:?
Backtrace emission took 1 seconds.
(continued from above) ERROR : src/mission_util.cpp:252 [cata::optional<coords::coord_point<tripoint, (coords::origin)1, (coords::scale)2> > find_or_create_om_terrain(const tripoint_abs_omt&, const mission_target_params&)] Unable to find and assign mission target cs_sex_shop.
- OS: Linux
    - OS Version: Distributor ID: Debian; Description: Debian GNU/Linux 10 (buster); Release: 10; Codename: buster; 
- Game Version: 0.E-10026-gfb7f80eb04 [64-bit]
- Graphics Version: Tiles
- Game Language: System language []
- Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Stats Through Skills [StatsThroughSkills]
]

Update: adding the building to the overmap before I take the quest fixes the issue.