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

Crash while butchering - magiclysm #35514

Closed
FunkleBlaze opened this issue Nov 14, 2019 · 9 comments · Fixed by #36245
Closed

Crash while butchering - magiclysm #35514

FunkleBlaze opened this issue Nov 14, 2019 · 9 comments · Fixed by #36245
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. Mechanics: Character / Player Character / Player mechanics Mods: Magiclysm Anything to do with the Magiclysm mod Mods Issues related to mods or modding (S1 - Need confirmation) Report waiting on confirmation of reproducibility
Milestone

Comments

@FunkleBlaze
Copy link

FunkleBlaze commented Nov 14, 2019

Describe the bug

When butchering, in certain circumstances, game crash. In my case it involve pouring tainted blood (from magiclysm) to container.

Steps To Reproduce

  1. Start butchering corpse next to container (not tested if container can be in inventory).
  2. At the end of butchering, choose container to pour liquid
  3. Get notification to stop pouring - in my case 'monsters spotted'.
  4. Stop pouring liquid (option 'yes').
  5. Choose container (chose same one).
  6. Crash.

Expected behavior

Lack of crash :)

Versions and configuration

  • OS: Windows 10
  • Game Version: 0.D-9360-ge71ad4f
  • Graphics version: MSX++DEAD_PEOPLE
  • Mods loaded:
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Magiclysm [magiclysm],
    Hydroponics [hydroponics],
    Vehicle Additions Pack [blazemod],
    SpeedyDex [speedydex],
    Stats Through Kills [stats_through_kills],
    Stats Through Skills [StatsThroughSkills]

Additional context

Oakhill.zip

@FunkleBlaze FunkleBlaze changed the title Crash while butchering Crash while butchering - magiclysm Nov 14, 2019
@Night-Pryanik Night-Pryanik added (S1 - Need confirmation) Report waiting on confirmation of reproducibility <Crash / Freeze> Fatal bug that results in hangs or crashes. Mechanics: Character / Player Character / Player mechanics Mods: Magiclysm Anything to do with the Magiclysm mod Mods Issues related to mods or modding labels Nov 14, 2019
@Funguss
Copy link
Contributor

Funguss commented Nov 14, 2019

I'm not sure this is going to be Magiclysm exclusive, it seems like it could be a problem with fluid handling from butchery at least, though possibly any fluid generation that gets interrupted and handled in this way. The furniture that generates clean water on disassembly might have the potential for the same issue. I imagine that the problem exists in that if you 'ignore' the fluid would stay in its' original container, which doesn't actually exist. You should have to choose a space on the ground to dump it.

@FunkleBlaze
Copy link
Author

I'm not sure this is going to be Magiclysm exclusive, it seems like it could be a problem with fluid handling from butchery at least, though possibly any fluid generation that gets interrupted and handled in this way. The furniture that generates clean water on disassembly might have the potential for the same issue. I imagine that the problem exists in that if you 'ignore' the fluid would stay in its' original container, which doesn't actually exist. You should have to choose a space on the ground to dump it.

Normally, I just clear entire area before I start butchering, but sometimes I forget about it.

@FunkleBlaze
Copy link
Author

FunkleBlaze commented Nov 14, 2019

Pouring on to ground (in step 5) also will end with crash. You can choose pouring to ground if instead of choosing container, you press 'esc'

@KorGgenT KorGgenT added this to the 0.E milestone Nov 14, 2019
@ghost
Copy link

ghost commented Nov 30, 2019

I cannot get this to happen, nothing interrupts the pouring of the liquid.

@MEXAHOTABOP
Copy link

this just happens sometime especially when you clean city by own hands

now i just disable blood in my build because zombie blood almost useless anyway and used only by one questionable CBM and one scroll where this is not mandatory
just one big waste of time when butcher zombies at my point of view

@KorGgenT
Copy link
Member

I've not been able to time it so i can get interrupted in the middle of pouring. is there a way you're doing it that you can force the notification or time it with a monster being spotted, or are you just randomly butchering in the middle of a town?

@FunkleBlaze
Copy link
Author

I've not been able to time it so i can get interrupted in the middle of pouring. is there a way you're doing it that you can force the notification or time it with a monster being spotted, or are you just randomly butchering in the middle of a town?

I wasn't playing for a while, but I was butchering after killing every few zombies. Crashes were when sth hostile spotted me and was coming at me.

@KorGgenT
Copy link
Member

call stack in visual studio:

>	Cataclysm-vcpkg-static-Release-x64.exe!item_location::remove_item() Line 600	C++
 	Cataclysm-vcpkg-static-Release-x64.exe!activity_handlers::butcher_finish(player_activity * act, player * p) Line 1273	C++
 	[Inline Frame] Cataclysm-vcpkg-static-Release-x64.exe!std::_Func_class<void,player_activity *,player *>::operator()(player_activity * <_Args_0>, player * <_Args_1>) Line 119	C++
 	Cataclysm-vcpkg-static-Release-x64.exe!activity_type::call_finish(player_activity * act, player * p) Line 122	C++
 	Cataclysm-vcpkg-static-Release-x64.exe!player_activity::do_turn(player & p) Line 183	C++
 	Cataclysm-vcpkg-static-Release-x64.exe!game::process_activity() Line 1636	C++
 	Cataclysm-vcpkg-static-Release-x64.exe!game::do_turn() Line 1407	C++
 	Cataclysm-vcpkg-static-Release-x64.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 688	C++

@KorGgenT
Copy link
Member

KorGgenT commented Dec 17, 2019

i have narrowed it down to this:
in butcher_finish(), the call to butchery_drops_harvest() somehow empties the targets vector. once this happens, it either invalidates the item_location which causes a crash in ptr->valid(), or it causes a crash in targets.pop_back() because targets is empty.
it's pretty annoying to reproduce because it's based on timing and rng, and you just have to hope you get interrupted after you finish butchering but before you pour the liquid from the butchery.

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. Mechanics: Character / Player Character / Player mechanics Mods: Magiclysm Anything to do with the Magiclysm mod Mods Issues related to mods or modding (S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants