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

Call of Chernobyl 1.4.22: NPC sound play crash #1799

Open
Nullpoint56 opened this issue Mar 3, 2025 · 1 comment
Open

Call of Chernobyl 1.4.22: NPC sound play crash #1799

Nullpoint56 opened this issue Mar 3, 2025 · 1 comment
Labels
Bug The issue in the run-time. Call of Chernobyl This can affect Call of Chernobyl compatibility, or related to it.

Comments

@Nullpoint56
Copy link

Nullpoint56 commented Mar 3, 2025

Describe the bug
A crash happens to the bug reporting screen randomly. I suspect it is related to NPCs playing music instruments or speaking.

To Reproduce
Steps to reproduce the behavior:

  1. Start a new game with population factor as high as possible (so you won't wait for eternity to it to happen)
  2. Go to a campfire or stand in one place (couldn't see a difference)
  3. Wait for the bug to happen.

BugTrap error report
NPC sound play crash.zip

Desktop (please complete the following information):

  • OS: Windows 11
  • OpenXRay Custom build from commit[2212842] branch[dev]
@Nullpoint56 Nullpoint56 added the Bug The issue in the run-time. label Mar 3, 2025
@Nullpoint56 Nullpoint56 changed the title COC 1.4.22. NPC sound play bug Call of Chernobyl 1.4.22. NPC sound play bug Mar 3, 2025
@Nullpoint56 Nullpoint56 changed the title Call of Chernobyl 1.4.22. NPC sound play bug Call of Chernobyl 1.4.22. NPC sound play crash Mar 3, 2025
@Nullpoint56 Nullpoint56 changed the title Call of Chernobyl 1.4.22. NPC sound play crash Call of Chernobyl 1.4.22: NPC sound play crash Mar 3, 2025
@Nullpoint56
Copy link
Author

A quick and dirty way to avoid crashing (not solve it). I edited sound_theme.script at npc_sound:play() function to check if played_id is not a nill before doing anything with it.
gamedata.zip

@Xottab-DUTY Xottab-DUTY added the Call of Chernobyl This can affect Call of Chernobyl compatibility, or related to it. label Mar 3, 2025
@Xottab-DUTY Xottab-DUTY moved this to To do in Roadmap Mar 3, 2025
@Xottab-DUTY Xottab-DUTY added Lua External (3rd party) This issue is related to external component used by our project. labels Mar 3, 2025
Xottab-DUTY added a commit that referenced this issue Mar 16, 2025
Don't read out of bounds. If id is bigger than the number of elements,
just select random sound just like if -1 is being passed
@Xottab-DUTY Xottab-DUTY removed Lua External (3rd party) This issue is related to external component used by our project. labels Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug The issue in the run-time. Call of Chernobyl This can affect Call of Chernobyl compatibility, or related to it.
Projects
Status: To do
Development

No branches or pull requests

2 participants