Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Segfault when complete NECC mission "Investigate the Center"

Open cknight828 opened this issue 1 year ago • 1 comments

Describe the bug

I got segfault when wait for finishing the activity "interacting with the NPC" after completing Investigate the Center. Canceling the activity prevents segfault. I experienced this crash also in 0.G. crash.log

Attach save file

necc-trimmed.tar.gz

Steps to reproduce

  1. Complete Investigate the Center
  2. Wait interacting with the NPC
  3. Crash

Expected behavior

No crash

Screenshots

No response

Versions and configuration

  • OS: Linux
    • OS Version: Distributor ID: Debian; Description: Debian GNU/Linux 12 (bookworm); Release: 12; Codename: bookworm;
  • Game Version: cdda-experimental-2024-08-24-0612 ae2b99e [64-bit]
  • Graphics Version: Tiles
  • Game Language: 日本語 <color_dark_gray>(99.8%) [ja]
  • Mods loaded: [ コア - Dark Days Ahead [dda], 削除 - NPCの欲求 [no_npc_food], 変更 - NPCに無害なポータル嵐 [personal_portal_storms], 変更 - 真菌増殖抑制 [no_fungal_growth] ]

Additional context

debug.log

cknight828 avatar Aug 24 '24 12:08 cknight828

/Confirmed I think... Talking to the first set of Chinese glyphs wasn't it. Talking to the second set of glyphs allowed for a report of success of some unspecified mission followed by a couple of error messages about Stylish inconsistencies and a large floating point value processing and then an access violation in string_formatter.h class string_formatter operation read_conversion case 's'. It seems to try to parse "%s finishes with you...".

That string isn't found in JSON, but IS found in activity_handlers.cpp liine 3117 as you->add_msg_if_player(_("%s finishes with you..."), act->str_values[0]); and str_values is empty in activity_handlers.cpp operation activity_handlers::wait_npc_finish in the call stack. The activity doesn't provide any info allowing me to determine what it is supposed to be.

Edit: It's caused by the MISSION_GODCO_HELENA_VISIT_MERCHANTS mission in godco_missions.json. Removing the line { "u_assign_activity": "ACT_WAIT_NPC", "duration": "30 minutes" } causes the crash to not appear. I don't know what this is supposed to do, but a guess is that it's intended to waste time cooped up in a report meeting, but then crashing because there is nothing specifying who you're meeting with (it just happens to be triggered by talking so a specific person, but this part of the JSON can probably not access that info). I suspect the syntax shouldn't allow for the NPC subject not to be provided, but leave the solution of this to people who actually understand how this stuff is supposed to work.

PatrikLundell avatar Aug 25 '24 09:08 PatrikLundell