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

divide by 0 crash when trading with more than 7 npcs #3293

Closed
scarf005 opened this issue Sep 27, 2023 · 2 comments · Fixed by #3368
Closed

divide by 0 crash when trading with more than 7 npcs #3293

scarf005 opened this issue Sep 27, 2023 · 2 comments · Fixed by #3368
Labels
bug crash Game crashes or softlocks
Milestone

Comments

@scarf005
Copy link
Member

Describe the bug

attempting to trade with 7+ npcs nearby crashes the game.

Steps To Reproduce

  1. spawn 8 npcs, debug them into friendly
  2. select e: let's trade items
  3. divide by 0 error caused from item::ideal_ranged_dps

Screenshots

image

reload_cost /= magazine_integral() ? 1 : ammo_capacity() / mode.qty;

npcmove cpp - Cataclysm - Visual Studio Code_01

Versions and configuration

  • OS: Linux
    • OS Version: Distributor ID: Ubuntu; Description: Ubuntu 23.04; Release: 23.04; Codename: lunar;
  • Game Version: 8f34053 [64-bit]
  • Graphics Version: Tiles
  • LAPI Version: 1
  • Game Language: English [en_US]
  • Mods loaded: [
    Bright Nights [bn],
    Disable NPC Needs [no_npc_food],
    Simplified Nutrition [novitamins],
    No Rail Stations [No_Rail_Stations],
    Elevated bridges [elevated_bridges]
    ]

Additional context

crash.log
debug.log

Default.tar.gz

@scarf005 scarf005 added the bug label Sep 27, 2023
@scarf005
Copy link
Member Author

cc @OrenAudeles could this be related to #3283?

@scarf005
Copy link
Member Author

scarf005 commented Sep 27, 2023

no wait, it's ancient, this is reproducible since 1efef0f (and who knows how long have this bug been staying around)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crash Game crashes or softlocks
Projects
None yet
2 participants