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

remove_npcs causes ctd without log #62369

Closed
RenechCDDA opened this issue Nov 24, 2022 · 4 comments · Fixed by #62376
Closed

remove_npcs causes ctd without log #62369

RenechCDDA opened this issue Nov 24, 2022 · 4 comments · Fixed by #62376
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` EOC: Effects On Condition Anything concerning Effects On Condition (P3 - Medium) Medium (normal) priority (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@RenechCDDA
Copy link
Member

Describe the bug

See #60938 for a specific occurrence of the issue. Game hangs for a moment or two and then crashes without producing a log. According to investigations by @mqrause this is caused by a combination of the compass sidebar widget trying to update when forced redraw is enabled.

Call stack:
image

Steps to reproduce

http://files.catbox.moe/oevx9t.zip Load this save. Walk north in any build before 18761d7.
(Hosted 3rd party due to filesize of ~41MB. In case of loss, another save is available in #60938)

Expected behavior

Crashing is not desired.

Screenshots

No response

Versions and configuration

http://files.catbox.moe/oevx9t.zip Load this save. Walk north in any build before 18761d7.
(Hosted 3rd party due to filesize of ~41MB. In case of loss, another save is available in #60938)

Additional context

@I-am-Erk suggested applying debug invisibility to the NPC before mapgen removes him. I locally changed the EOC trigger to this:

      "effect": [
        { "u_add_var": "ANCHOR_SELLER_paranormal", "type": "dialogue", "context": "BEM_ANCHOR_SELLER", "value": "yes" },
	{ "npc_add_trait": "DEBUG_CLOAK" },
        { "queue_eocs": ["EOC_BEM_ANCHOR_SELLER_GONE"], "time_in_future": [ "0s", "0s" ] }

It prevents the player from crashing in most instances, but it notably does not work against clairvoyance, which may be acquired with artifacts.
A further suggestion was to change the delay trigger to 1s, like this:

        { "queue_eocs": "EOC_BEM_ANCHOR_SELLER_GONE", "time_in_future": [ "1s", "1s" ] }

This also prevents the crash in all circumstances that were tested. It is unclear to me or anyone involved why. Per @mqrause's discord participation: "[...] I've put up #62362 to fix the crash. But I couldn't figure out what causes the state (he's still visible after completing the dialog) that could lead to the crash in the first place."

@RenechCDDA RenechCDDA added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Nov 24, 2022
@RenechCDDA
Copy link
Member Author

RenechCDDA commented Nov 24, 2022

/confirming my own issue as I was asked to post this so we could keep track of the general issue.

Oh... apparently it doesn't let me abuse the system. Well fine then github! Keep your labels!

@github-actions github-actions bot added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Nov 24, 2022
@I-am-Erk I-am-Erk added (P3 - Medium) Medium (normal) priority <Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` EOC: Effects On Condition Anything concerning Effects On Condition labels Nov 24, 2022
@I-am-Erk
Copy link
Member

I suspect the answer to this lies in the compass rendering code, but what do I know? Not much in this case.

@andrei8l
Copy link
Contributor

Can't reproduce on linux with 8201abd and ASan+UBSan from the Winstead or Pine Ridge saves. Tried with all the compass widgets from the classic/labels/structured layouts. Tried with Force Redraw both on and off.

This might be a mscv-only issue. Any chance you can build with ASan and get a log from it?

@RenechCDDA
Copy link
Member Author

This might be a mscv-only issue. Any chance you can build with ASan and get a log from it?

I passed my IDE's(Visual Studio 2019) compiler an argument of /fsanitize=address which appears to be what you are referring to? I'm not usually on the forefront of this level of debugging. I also passed cataclysm-tiles.exe an argument of set ASAN_SAVE_DUMPS=DumpyMcDump.dmp. After the crash occurs I stepped through the breakpoints, letting it continue until the process terminated. No file by that name could be found. But here's the output window, which might be what you want?

visual studio output during crash.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` EOC: Effects On Condition Anything concerning Effects On Condition (P3 - Medium) Medium (normal) priority (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants