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

crafting with short rope inside short rope inside short rope ... crashed the game #78765

Open
Koevakons opened this issue Dec 25, 2024 · 4 comments
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@Koevakons
Copy link

Describe the bug

i batch created 23 short rope and it cameout like in image And then i saved the game before crafting 7 light wooden frame but then my game crashed, i attempt to open it again but the game failed opening #(mycharacterid).sav cuz of that rope thingy being held (check screenshot)

Attach save file

#UGF1bCBIaWxkZWJyYW5k.zip i cant open the char to do that

Steps to reproduce

  1. batch craft 23 short ropes
  2. batch craft 7 light wooden frame with the ropes like in the screenshot

Expected behavior

ofc, i could craft the light wooden frames with it. Can you please unfuck my .sav? please dude i have 172 hours in the char could you remove the short ropes from my character? im sure you know how to do it, i think this will fix the crash im hoping so much for you to fix the .sav file

Screenshots

Screenshot_20241225-214820

Versions and configuration

  • OS: Android
    • OS Version: Manufacturer: INFINIX; Model: Infinix X6837; Release: 13; Incremental: 240929V1433;
  • Game Version: cdda-experimental-2024-08-14-0103 45f35ec [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],
    Mind Over Matter [mindovermatter],
    Bionic Professions [package_bionic_professions]
    ]

Additional context

crash+debug.zip
#UGF1bCBIaWxkZWJyYW5k.zip

@Koevakons Koevakons added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Dec 25, 2024
@Koevakons Koevakons changed the title short rope inside short rope inside short rope ... crashed the game crafting with short rope inside short rope inside short rope ... crashed the game Dec 25, 2024
@RenechCDDA RenechCDDA added the <Crash / Freeze> Fatal bug that results in hangs or crashes. label Dec 26, 2024
@PatrikLundell
Copy link
Contributor

PatrikLundell commented Dec 26, 2024

Editing the file blind would require a master. In addition to that, we would want to be able to replicate the crash in order to understand it and see if there's anything that can be done to handle the situation.
Thus, can you please zip up the game world and provide it. That would both allow for investigation of the crash conditions and verification of whether attempts to manipulate the .sav file were successful.

Edit:
I failed to recreate the initial condition. When I batch crafted 23 short ropes they ended up in the inventory as a stack of short ropes, and when trying naked they ended up on the ground.

Edit 2:
What did you actually do?
The log from the .sav file indicates you manually assembled the recursive rope chain:
:
{ "turn": 18700982, "message": "You wield your in progress short rope (0%).", "count": 1, "type": 5 },
{ "turn": 18700982, "message": "The in progress short rope (0%) is not a valid Barbaran Montante weapon.", "count": 1, "type": 1 },
{ "turn": 18700982, "message": "Wielding - in progress short rope (0%)", "count": 1, "type": 4 },
{ "turn": 18700982, "message": "You start working on the in progress short rope (0%).", "count": 1, "type": 5 },
{ "turn": 18707762, "message": " - <color_c_green>++ short rope", "count": 7, "type": 4 },
{ "turn": 18707762, "message": "You wield your <color_c_green>++ short rope.", "count": 1, "type": 5 },
{ "turn": 18707762, "message": "The short rope is not a valid Barbaran Montante weapon.", "count": 1, "type": 1 },
{ "turn": 18707762, "message": " - <color_c_green>++ short rope", "count": 16, "type": 4 },
{ "turn": 18707762, "message": "You craft short rope from memory.", "count": 1, "type": 5 },
{ "turn": 18707767, "message": "You drop your <color_c_green>++ short rope on the floor.", "count": 1, "type": 5 },
{ "turn": 18707768, "message": "You drop your <color_c_green>++ short ropes on the floor.", "count": 1, "type": 5 },
{ "turn": 18707770, "message": "You see here 1 <color_c_green>++ dry duffel bag.", "count": 1, "type": 5 },
{ "turn": 18707771, "message": "You see here 1 electric lantern (on) (<color_c_yellow>1/2 cable).", "count": 1, "type": 5 },
{ "turn": 18707777, "message": "You refill the <color_c_green>++ plastic canteen.", "count": 1, "type": 5 },
{ "turn": 18707777, "message": "You see here 1 electric lantern (on) (<color_c_yellow>1/2 cable).", "count": 1, "type": 5 },
{ "turn": 18707778, "message": "You see here 1 <color_c_green>++ dry duffel bag.", "count": 1, "type": 5 },
{ "turn": 18707781, "message": "You see here 4 <color_c_green>++ short ropes.", "count": 1, "type": 5 },
{ "turn": 18707791, "message": "You pick up: 1 <color_c_green>++ short rope", "count": 4, "type": 5 },
{ "turn": 18707795, "message": "You drop your <color_c_green>++ short rope on the floor.", "count": 3, "type": 5 },
{ "turn": 18707798, "message": "Could not put <color_c_green>++ short rope into <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item, holster already contains an item.", "count": 1, "type": 5 },
{ "turn": 18707798, "message": "You see here 3 <color_c_green>++ short ropes.", "count": 1, "type": 5 }, { "turn": 18707800, "message": "You put your <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item into the short rope.", "count": 1, "type": 5 },
{ "turn": 18707804, "message": "Could not put <color_c_green>++ short rope into <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item, holster already contains an item.", "count": 1, "type": 5 },
{ "turn": 18707808, "message": "You put your <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item into the short rope.", "count": 1, "type": 5 },
{ "turn": 18707813, "message": "You put your <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item into the short rope.", "count": 1, "type": 5 },
{ "turn": 18707813, "message": "You wield your <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item.", "count": 1, "type": 5 },
{ "turn": 18707813, "message": "The short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item is not a valid Barbaran Montante weapon.", "count": 1, "type": 1 },
{ "turn": 18707816, "message": "There is nothing to pick up.", "count": 1, "type": 5 },
{ "turn": 18707827, "message": "You see here 1 <color_c_green>++ tool belt > 4 <color_c_magenta>tools.", "count": 1, "type": 5 },
{ "turn": 18707830, "message": "You drop your <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item on the floor.", "count": 1, "type": 5 },
{ "turn": 18707835, "message": "You see here 1 <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item.", "count": 2, "type": 5 },
{ "turn": 18707838, "message": "Could not put <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item into <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item, holster already contains an item.", "count": 1, "type": 5 },
{ "turn": 18707839, "message": "You see here 1 <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item.", "count": 1, "type": 5 },
{ "turn": 18707840, "message": "Never mind.", "count": 1, "type": 5 },
{ "turn": 18707843, "message": "You see here 1 <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item.", "count": 1, "type": 5 },
{ "turn": 18707847, "message": "There's no room in your inventory for the <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item, so you drop it.", "count": 1, "type": 5 },
{ "turn": 18707854, "message": "You put the * <color_c_green>++ pair of makeshift ear plugs (in) in your inventory.", "count": 1, "type": 5 },
{ "turn": 18707854, "message": " - * <color_c_green>++ pair of makeshift ear plugs (in)", "count": 1, "type": 4 },
{ "turn": 18707854, "message": "You put the industrial ID card in your inventory.", "count": 1, "type": 5 },
{ "turn": 18707854, "message": " - industrial ID card", "count": 1, "type": 4 },
{ "turn": 18707854, "message": "You put the lighter in your inventory.", "count": 1, "type": 5 },
{ "turn": 18707854, "message": " - lighter", "count": 1, "type": 4 },
{ "turn": 18707854, "message": "You put the * <color_c_green>++ pair of ballistic glasses in your inventory.", "count": 1, "type": 5 },
{ "turn": 18707854, "message": " - * <color_c_green>++ pair of ballistic glasses", "count": 1, "type": 4 },
{ "turn": 18707854, "message": "You put the multitool in your inventory.", "count": 1, "type": 5 },
{ "turn": 18707854, "message": " - multitool", "count": 1, "type": 4 },
{ "turn": 18707854, "message": "You put the industrial ID card in your inventory.", "count": 1, "type": 5 }, { "turn": 18707854, "message": " - industrial ID card", "count": 1, "type": 4 },
{ "turn": 18707855, "message": "You see here 2 <color_c_green>++ short ropes > <color_c_light_gray><color_c_green>++ short rope > 1 item.", "count": 1, "type": 5 },
{ "turn": 1870785, "message": "You put your industrial ID card into the armband pouch.", "count": 2, "type": 5 },
{ "turn": 18707859, "message": "You put your lighter (<color_c_light_green>74/100 butane) into the armband pouch.", "count": 1, "type": 5 },
{ "turn": 18707861, "message": "You put your multitool into the armband pouch.", "count": 1, "type": 5 },
{ "turn": 18707862, "message": "You put your * <color_c_green>++ pair of ballistic glasses into the armband pouch.", "count": 1, "type": 5 },
{ "turn": 18707864, "message": "You put your * <color_c_green>++ pair of makeshift ear plugs (in) into the armband pouch.", "count": 1, "type": 5 },
{ "turn": 18707865, "message": "You see here 2 <color_c_green>++ short ropes > <color_c_light_gray><color_c_green>++ short rope > 1 item.", "count": 1, "type": 5 },
{ "turn": 18707866, "message": "You drop your <color_c_green>++ short rope on the floor.", "count": 1, "type": 5 },
{ "turn": 18707867, "message": "You wield your <color_c_green>++ short rope.", "count": 1, "type": 5 },
{ "turn": 18707867, "message": "The short rope is not a valid Barbaran Montante weapon.", "count": 1, "type": 1 },
{ "turn": 18707868, "message": "You drop your <color_c_green>++ short rope on the floor.", "count": 1, "type": 5 },
{ "turn": 18707868, "message": "You wield your <color_c_green>++ short rope.", "count": 1, "type": 5 },
{ "turn": 18707868, "message": "The short rope is not a valid Barbaran Montante weapon.", "count": 1, "type": 1 },
{ "turn": 18707870, "message": "You drop your <color_c_green>++ short rope on the floor.", "count": 1, "type": 5 },
{ "turn": 18707870, "message": "You wield your <color_c_green>++ short rope.", "count": 1, "type": 5 },
{ "turn": 18707870, "message": "The short rope is not a valid Barbaran Montante weapon.", "count": 1, "type": 1 },
{ "turn": 18707871, "message": "You drop your <color_c_green>++ short rope on the floor.", "count": 1, "type": 5 },
{ "turn": 18707871, "message": "You wield your <color_c_green>++ short rope.", "count": 1, "type": 5 },
{ "turn": 18707871, "message": "The short rope is not a valid Barbaran Montante weapon.", "count": 1, "type": 1 },
{ "turn": 18707872, "message": "You drop your <color_c_green>++ short rope on the floor.", "count": 1, "type": 5 },
{ "turn": 18707872, "message": "You wield your <color_c_green>++ short rope.", "count": 1, "type": 5 }, { "turn": 18707872, "message": "The short rope is not a valid Barbaran Montante weapon.", "count": 1, "type": 1 },
{ "turn": 18707874, "message": "You drop your <color_c_green>++ short rope on the floor.", "count": 1, "type": 5 },
{ "turn": 18707876, "message": "You pick up: 1 <color_c_green>++ short rope", "count": 2, "type": 5 },
{ "turn": 18707879, "message": "You drop your <color_c_green>++ short rope on the floor.", "count": 2, "type": 5 },
{ "turn": 18707880, "message": "You see here 7 <color_c_green>++ short ropes.", "count": 1, "type": 5 },
{ "turn": 18707881, "message": "You see here 1 <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item.", "count": 1, "type": 5 },
{ "turn": 18707882, "message": "You see here 7 <color_c_green>++ short ropes.", "count": 1, "type": 5 },
{ "turn": 18707883, "message": "You wield your <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item.", "count": 1, "type": 5 },
{ "turn": 18707883, "message": "The short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item is not a valid Barbaran Montante weapon.", "count": 1, "type": 1 },
{ "turn": 18707886, "message": "There is nothing to pick up.", "count": 1, "type": 5 },
{ "turn": 18707893, "message": "You put your <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item into the short rope.", "count": 3, "type": 5 },
{ "turn": 18707903, "message": "You put your <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item into the short rope.", "count": 3, "type": 5 },
{ "turn": 18707907, "message": "You put your <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item into the short rope.", "count": 1, "type": 5 },
{ "turn": 18707907, "message": "You wield your <color_c_green>++ short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item.", "count": 1, "type": 5 },
{ "turn": 18707907, "message": "The short rope > <color_c_light_gray><color_c_green>++ short rope > 1 item is not a valid Barbaran Montante weapon.", "count": 1, "type": 1 },
{ "turn": 18707910, "message": "There is nothing to pick up.", "count": 1, "type": 5 },
{ "turn": 18707911, "message": "You see here 1 <color_c_green>++ espadrilles.", "count": 1, "type": 5 },
{ "turn": 18707923, "message": "Saving game, this may take a while.", "count": 1, "type": 4 } ], "curmes": 18707840 },
:

By manually placing ropes within ropes in a chain while holding the root rope in the hand and then trying to batch craft 7 wooden light frames I can get the game to first issue an error about trying to find a parent using an object that doesn't contain it and then get an access violation when ignoring it.
The call chain goes from Character::craft via Character::consume_items and crashes in item_contents::get_pockets (this isn't the complete call chain, but key points in it).
At a guess, the item consumption code doesn't handle consumption of nested items correctly (apart from ropes, you ought to be able to do the same thing with bags and other soft containers). A speculation on how this can fail (there may be more):

  • Trying to use outer items before inner ones. This can cause the inner items to be moved (to free up the outer one) without the context being updated, so the iteration operates on outdated info, causing the iteration to try to access the container an item has just been removed from rather than its new container (or the ground).
    There's logic to try to consume empty containers first, so the logic ought to be capable of handling a nesting level of 1, but once all empty containers have been used up the logic just takes used ones (there might be another step to avoid used containers containing liquids if possible, but that's not relevant here), but there's no logic to do recursion to try to find any container that has been freed up after the first pass.
    One way to resolve the issue is to loop over the retrieval of empty containers until all items either have been collected or none are left or everything has been collected, but that's likely to be costly. Another would be to detect this situation and try to find the moved item (which may be either on the ground or at some other inventory location), and a third one would be to rebuild the inventory whenever items are moved (which probably isn't cheap), and it will probably require iteration to start from scratch, as the iterator probably won't survive such a change.
    A second way to resolve it would be to prohibit the nesting of like items, but that could then be circumvented by alternating nested items instead (container type A - container type B - container type A - container type B, etc).
    A third specific way to resolve it would be to check if an item match contains another matching item and use that one recursively, but that would probably screw up the iteration in one way or another, possibly to the point where this item is consumed but the iteration would then have to be started from scratch again.

@Brambor
Copy link
Contributor

Brambor commented Dec 27, 2024

@Koevakons Give us the world save. I wanna try fixing it.

@Koevakons
Copy link
Author

Koevakons commented Dec 28, 2024

I have fixed it one hour after i made the report, i only made a backup for for the .sav since its the one that needs editing. I have played some 20 hours. I did manually add the ropes cuz it looks cool, it was shorter than in the screenshot but it still has that cascading thing. My inventory containers was put on "never insert unless manual" there were some ropes that got into my inventory. How i fixed it is i deleted the "rope extensions" so i end up with just a rope wielded

@Brambor
Copy link
Contributor

Brambor commented Dec 28, 2024

I am reopening this, as this documents unfixed confirmed crash.

@Brambor Brambor reopened this Dec 28, 2024
@Brambor Brambor added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

No branches or pull requests

4 participants