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

Lost target item of ACT_MOVE_ITEMS when hauling an item that is rotting away #52426

Closed
NetSysFire opened this issue Oct 24, 2021 · 2 comments · Fixed by #69827
Closed

Lost target item of ACT_MOVE_ITEMS when hauling an item that is rotting away #52426

NetSysFire opened this issue Oct 24, 2021 · 2 comments · Fixed by #69827
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` Items / Item Actions / Item Qualities Items and how they work and interact

Comments

@NetSysFire
Copy link
Member

Describe the bug

See description.

Steps To Reproduce

  1. Let something rot and wait until it is on the verge of just vanishing on the ground.
  2. Haul it until you get the error.
 DEBUG    : Lost target item of ACT_MOVE_ITEMS

 FUNCTION : virtual void move_items_activity_actor::do_turn(player_activity&, Character&)
 FILE     : src/activity_actor.cpp
 LINE     : 1814
 VERSION  : 0.F

Alternatively, I prepared a save for you. Just move somewhere, the character is already hauling and slow, so it will rot away and you will get that error.

save.zip

If you alt+f4 the window while the stuff is being hauled along the ground, you will get some errors on the stdout, too (probably unrelated but still):

This option is not available. Please see --help for all possible usages.
/usr/include/c++/11.1.0/bits/regex_executor.tcc:537: void std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_M_dfs(std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_Match_mode, std::__detail::_StateIdT) [with _BiIter = const char*; _Alloc = std::allocator<std::__cxx11::sub_match<const char*> >; _TraitsT = std::__cxx11::regex_traits<char>;bool __dfs_mode = true; std::__detail::_StateIdT = long int]: Assertion 'false' failed.
This option is not available. Please see --help for all possible usages.
/usr/include/c++/11.1.0/bits/regex_executor.tcc:537: void std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_M_dfs(std::__detail::_Executor< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>, <anonymous> >::_Match_mode, std::__detail::_StateIdT) [with _BiIter = const char*; _Alloc = std::allocator<std::__cxx11::sub_match<const char*> >; _TraitsT = std::__cxx11::regex_traits<char>;bool __dfs_mode = true; std::__detail::_StateIdT = long int]: Assertion 'false' failed.

Expected behavior

It does not display that error.

If you put the butchery refuse (in that save) in your inventory instead and wait a bit, it does not rot away, but this is probably out of scope.

Screenshots

No response

Versions and configuration

  • OS: Linux
    • OS Version: LSB Version: 1.4; Distributor ID: Arch; Description: Arch Linux; Release: rolling; Codename: n/a;
  • Game Version: 0.F [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    No Fungal Growth [no_fungal_growth],
    Bionic Professions [package_bionic_professions]
    ]

(experimental)

Additional context

No response

@wapcaplet wapcaplet added <Bug> This needs to be fixed Items / Item Actions / Item Qualities Items and how they work and interact labels Nov 10, 2021
@NetSysFire NetSysFire added the [C++] Changes (can be) made in C++. Previously named `Code` label Jan 8, 2022
@NetSysFire
Copy link
Member Author

The cause is in here, it needs some sort of handling for rotting items:

if( !target ) {
debugmsg( "Lost target item of ACT_MOVE_ITEMS" );
continue;
}

@mqrause
Copy link
Contributor

mqrause commented Oct 27, 2022

I don't think there's an easy solution to this. The activity has a list of items to move and handles a few of them every turn. Item processing happens separately of this (I think also every turn). If processing removes an item that's in the list of the activity, the activity doesn't really have a way of knowing what happened to it.

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` Items / Item Actions / Item Qualities Items and how they work and interact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants