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

Unloading sewing kit creates a "none" item #40158

Closed
olanti-p opened this issue May 4, 2020 · 8 comments · Fixed by #40399
Closed

Unloading sewing kit creates a "none" item #40158

olanti-p opened this issue May 4, 2020 · 8 comments · Fixed by #40399
Labels
<Bug> This needs to be fixed Items: Containers Things that hold other things Items: Magazines Ammo holding items and objects.

Comments

@olanti-p
Copy link
Contributor

olanti-p commented May 4, 2020

Describe the bug

Unloading sewing kit creates a "none" item

Steps To Reproduce

  1. Debug spawn sewing kit
  2. Unload your sewing kit (50/200)
  3. Get a debug message (see below)
  4. Open inventory and witness 2 items: sewing kit (0/200) and none

Expected behavior

thread not losing identity

Versions and configuration

  • OS: Linux
    • OS Version: Ubuntu 20.04
  • Game Version: 0.E-1745-gce33f39cfd-dirty [64-bit]
  • Graphics Version: Curses
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Magiclysm [magiclysm]
    ]

Additional context

02:01:22.096 ERROR : (error message will follow backtrace)
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(_Z21debug_write_backtraceRSo+0x23) [0x1bcc763]
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(_Z8DebugLog10DebugLevel10DebugClass+0x106) [0x1bcc1b6]
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(_Z12realDebugmsgPKcS0_S0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x49) [0x1bcbcc9]
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(_Z12realDebugmsgIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvPKcS7_S7_S7_DpOT_+0x43) [0x19085e3]
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(_ZNK6player16item_reload_costERK4itemS2_i+0x388) [0x248e528]
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(_ZN6player6unloadER4item+0xc35) [0x248fc85]
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(_ZN13avatar_action6unloadER6avatar+0x139) [0x19fefa9]
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(_ZN4game13handle_actionEv+0xe33) [0x1d9bd73]
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(_ZN4game7do_turnEv+0x578) [0x1cfa858]
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(main+0xc82) [0x202ff72]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7ffff7a2b0b3]
    /mnt/Data/code/git/Cataclysm-DDA/cataclysm(_start+0x2e) [0x189f89e]

    Attempting to repeat stack trace using debug symbols…
    debug_write_backtrace(std::ostream&)
    …/src/debug.cpp:777
    DebugLog(DebugLevel, DebugClass)
    …/src/debug.cpp:943
    realDebugmsg(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    …/src/debug.cpp:115
    void realDebugmsg<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)
    …/src/debug.h:?
    player::item_reload_cost(item const&, item const&, int) const
    …/src/player.cpp:?
    player::unload(item&)
    …/src/player.cpp:3238
    avatar_action::unload(avatar&)
    …/src/avatar_action.cpp:1292
    game::handle_action()
    …/src/handle_action.cpp:2022
    game::do_turn()
    …/src/game.cpp:1515
    main
    …/src/main.cpp:697
    __libc_start_main
    ??:?
    _start
    ??:?
Backtrace emission took 6 seconds.
src/player.cpp:2894 [int player::item_reload_cost(const item &, const item &, int) const] cannot determine reload cost as none is neither ammo or magazine
@KorGgenT KorGgenT added <Bug> This needs to be fixed Items: Containers Things that hold other things Items: Magazines Ammo holding items and objects. labels May 5, 2020
@ZhilkinSerg
Copy link
Contributor

Related to #40125

@ZhilkinSerg
Copy link
Contributor

Related to #40134

@p-dimi
Copy link

p-dimi commented May 17, 2020

Same thing happens with bone needle - reloading bone needle with thread leaves it at zero charges, but uses the thread.

@EAKugler
Copy link

Ditto for wood needle.

This really needs to get moved to the top of the queue. It breaks the game.

@ZhilkinSerg
Copy link
Contributor

Ditto for wood needle.

This really needs to get moved to the top of the queue. It breaks the game.

There is no queue.

@morthein
Copy link

morthein commented May 21, 2020 via email

@EAKugler
Copy link

Ditto for wood needle.
This really needs to get moved to the top of the queue. It breaks the game.

There is no queue.

Then it needs to move to the top of everyone's queue.

@ZhilkinSerg
Copy link
Contributor

Ditto for wood needle.
This really needs to get moved to the top of the queue. It breaks the game.

There is no queue.

Then it needs to move to the top of everyone's queue.

Nope.

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 Items: Containers Things that hold other things Items: Magazines Ammo holding items and objects.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants