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

err while looting litter (rotten) in advanced inventory #50714

Open
Brambor opened this issue Aug 12, 2021 · 10 comments
Open

err while looting litter (rotten) in advanced inventory #50714

Brambor opened this issue Aug 12, 2021 · 10 comments
Labels
Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Items / Item Actions / Item Qualities Items and how they work and interact (S2 - Confirmed) Bug that's been confirmed to exist Time / Turns / Duration / Date Issues concerning any activities being too fast or too slow. Also issues about time and date ingame

Comments

@Brambor
Copy link
Contributor

Brambor commented Aug 12, 2021

Describe the bug

I have friendly turkeys, they litter all over the place (yeah!). I tried to pick up the litter and this bug showed up. Probably the litter rot into nothing while I was picking it up?

Steps To Reproduce

  1. Make a player and lots of friendly turkeys.
  2. Let them litter, until litter is (rot)
  3. Go to advanced inventory (press /) and list all around (press a) while lots of litter is in reach.
  4. Loot all (press ,).
  5. Observe error, probably only if it rots just in time.

Having large torso encumbrance probably helps, if it lowers picking speed.

Expected behavior

No bug, maybe something in log ideas:
"You tried to pick up X, but it rots away before you pick it up." - Nicely specific, should be commented in code.
"You tried to pick up X, but it is no longer there." - Vaguely generic, easier to implement.

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0 2009
  • Game Version: 0f8bd78 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Bionic Professions [package_bionic_professions]
    ]

Additional context

bird litter probably lost

debug.log:

15:22:40.082 : Starting log.
15:22:40.082 INFO : Cataclysm DDA version 0f8bd78
15:22:40.097 INFO : [main] C locale set to C
15:22:40.097 INFO : [main] C++ locale set to C
15:22:40.097 INFO : SDL version used during compile is 2.0.14
15:22:40.097 INFO : SDL version used during linking and in runtime is 2.0.14
15:22:40.269 INFO : Number of render drivers on your system: 5
15:22:40.269 INFO : Render driver: 0/direct3d
15:22:40.269 INFO : Render driver: 1/direct3d11
15:22:40.269 INFO : Render driver: 2/opengl
15:22:40.269 INFO : Render driver: 3/opengles2
15:22:40.269 INFO : Render driver: 4/software
15:22:40.276 INFO : [options] C locale set to C
15:22:40.276 INFO : [options] C++ locale set to C
15:22:40.276 INFO : Setting language to: 'en'
15:22:40.276 INFO : Language is set to: 'en'
15:22:40.277 INFO : [translations] C locale set to English_United Kingdom.1252
15:22:40.277 INFO : [translations] C++ locale set to C
15:22:40.529 INFO : Active renderer: 0/direct3d
15:22:41.585 INFO : USE_COLOR_MODULATED_TEXTURES is set to 0
15:22:41.801 INFO : Setting language to: 'en'
15:22:41.801 INFO : Language is set to: 'en'
15:22:41.801 INFO : [translations] C locale set to English_United Kingdom.1252
15:22:41.801 INFO : [translations] C++ locale set to C
15:22:42.221 WARNING : opendir [./mods/] failed with "No such file or directory".
15:22:49.906 WARNING : opendir [./save/Middle Earth/mods] failed with "No such file or directory".
15:22:58.668 INFO : Loaded tileset: UltimateCataclysm
15:41:57.837 INFO : npc::set_omt_destination - new goal for NPC [Steve Hightower] with [need_weapon] is [fema_1_3] in (102,173,0).
15:56:40.562 ERROR SDL : src/sdlsound.cpp:583: Failed to play sound effect: Tried to play a chunk with a bad frame
16:13:30.775 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:13:34.818 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:13:36.238 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:13:36.605 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:13:36.906 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:13:37.216 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:13:54.836 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:13:55.211 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:13:55.447 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:13:55.613 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:14:00.720 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:14:24.617 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:14:25.140 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:14:25.351 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:14:25.652 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:14:25.950 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:14:26.237 ERROR : src/pickup.cpp:422 [bool Pickup::do_pickup(std::vector<item_location>&, std::vector<int>&, bool)] lost target item of ACT_PICKUP
16:14:35.103 : Log shutdown.
@actual-nh actual-nh added (S1 - Need confirmation) Report waiting on confirmation of reproducibility Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Items / Item Actions / Item Qualities Items and how they work and interact labels Aug 12, 2021
@hexagonrecursion
Copy link
Contributor

If you can reproduce this please post a save file right before opening the AIM and pressing ,

@stale
Copy link

stale bot commented Apr 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Apr 28, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2022
@Brambor
Copy link
Contributor Author

Brambor commented Jun 6, 2024

save:
Winter Beach-trimmed.tar.gz

info:

  • OS: Windows
    • OS Version: 10.0.19045.4412 (22H2)
  • Game Version: 0.G-10037-g0c962bb250 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

@Brambor Brambor reopened this Jun 6, 2024
@Brambor
Copy link
Contributor Author

Brambor commented Jun 6, 2024

I remembered this. The fix will not be as easy as I thought. This is likely not getting fixed unless a lot changes.

@Brambor Brambor added the Time / Turns / Duration / Date Issues concerning any activities being too fast or too slow. Also issues about time and date ingame label Jun 6, 2024
@NetSysFire
Copy link
Member

This also looks somewhat related to the fixed

There is probably a bunch of things that are upset when items rot away when being actively used.

@github-actions github-actions bot removed the stale Closed for lack of activity, but still valid. label Jun 6, 2024
@TealcOneill
Copy link
Contributor

/confirm Brambor's save can reliably replicate this.

  • OS: Windows
    • OS Version: 10.0.19045.4412 (22H2)
  • Game Version: cdda-experimental-2024-06-10-0401 62b7550 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

@github-actions github-actions bot added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Jun 10, 2024
@Brambor
Copy link
Contributor Author

Brambor commented Jun 10, 2024

The fix will not be as easy as I thought. This is likely not getting fixed unless a lot changes.

It might not be easy to track whether an item rots away. When moving, we probably store a reference like object ~map_location. Then we can ask: is it still valid?

But we always want to throw an error via debugmsg when we don't know exactly what is happening. When NPC takes an item you were about to haul, throw debugmsg.

Don't throw a debugmsg when the hauled item rotted away. Just write it in the regular log Item you tried to move rotted away.

It would be possible if the rotting can be communicated to the reference (map_location). However, items must not know about all kinds of hauling, that would be a huge code bloat, wrong design and maintenance pain.

So items themselves could be implemented as references (shared ptr) which would mark the item to be destroyed when it is destroyed / consumed / rots away. Then on moving the item, we ask "Is it destroyed by rotting away?" if so, regular log it, otherwise debugmsg it.

Some parts I described might have already been implemented. The shared ptr is too expensive since every item would have to have it. So there is too little gain (solve this bug) for the price (the whole game runs slower). If not implemented already.

@TealcOneill
Copy link
Contributor

I'm not great at coding so this might be nonsense. But could we add the shared ptr when we add the rotten tag? That way it's only a slowdown if there's a ton of rotting items?

@Brambor
Copy link
Contributor Author

Brambor commented Jun 11, 2024

Going my way, not really. Then you need to add another level differentiating rotten and not rotten items probably slowing the game down more. And if so, it should be all items that eventually can rot, otherwise item can turn to be rotting and then rot away. Much less likely but still possible.

@TealcOneill
Copy link
Contributor

That's fair, wasn't exactly sure how that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Items / Item Actions / Item Qualities Items and how they work and interact (S2 - Confirmed) Bug that's been confirmed to exist Time / Turns / Duration / Date Issues concerning any activities being too fast or too slow. Also issues about time and date ingame
Projects
None yet
Development

No branches or pull requests

5 participants