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

NPC reading activity segfault #35352

Closed
Vollinger opened this issue Nov 6, 2019 · 1 comment · Fixed by #35538
Closed

NPC reading activity segfault #35352

Vollinger opened this issue Nov 6, 2019 · 1 comment · Fixed by #35538
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. Mechanics: Character / Player Character / Player mechanics NPC / Factions NPCs, AI, Speech, Factions, Ownership (S2 - Confirmed) Bug that's been confirmed to exist
Milestone

Comments

@Vollinger
Copy link
Contributor

Describe the bug

NPC follower that was asked to read a book will crash the game if you take the book from his inventory or save/load occurs before he finishes reading a chapter.

Steps To Reproduce

  1. Recruited starting NPC with raw charisma.
  2. Asked him to read about High Explosives.
  3. Saved and quit.
  4. Load the attached world, wait about five minutes, game crashes with:
    src/item_location.cpp:97 [void item_location::impl::ensure_unpacked() const] item_location lost its target item during a save/load cycle

Alternatively
4. Load the attached world, ask him to stop his current activity.
5. Ask him to read about High Explosives again.
6. Trade the High Explosives book off him using the trade dialog.
7. Wait ten minutes, game crashes, no debug message this time.

Expected behavior

NPCs should keep proper track of their books in savefiles and cuss out shifty players who try to take books they're currently reading.

Screenshots

Versions and configuration

  • OS: Windows
    • OS Version: 10.0 1903
  • Game Version: 8a44139 [64-bit]
  • Graphics Version: Tiles
  • Mods loaded: [
    Dark Days Ahead [dda]
    ]

Additional context

save.zip
Doesn't seem to be a recent bug, all of my mystery builds from 2-3 weeks ago also segfault.

@Night-Pryanik Night-Pryanik added (S1 - Need confirmation) Report waiting on confirmation of reproducibility <Crash / Freeze> Fatal bug that results in hangs or crashes. Mechanics: Character / Player Character / Player mechanics NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Nov 6, 2019
@ghost ghost self-assigned this Nov 6, 2019
@ifreund ifreund added this to the 0.E milestone Nov 6, 2019
@ifreund ifreund added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Nov 6, 2019
@ghost
Copy link

ghost commented Nov 6, 2019

I can stop it crashing, I can make the NPC bail out of the activity if the item_location goes missing ( through trading etc )
What I cannot do is stop the debugmsg or the failure to re-find the item_location after a save/load cycle, @ifreund may have some insights into that area when they have some time, but other than that, im stumped on it tbh, item_location stuff is .... beyond me I think.

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. Mechanics: Character / Player Character / Player mechanics NPC / Factions NPCs, AI, Speech, Factions, Ownership (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants