[A16] Predators stuck attacking dead prey if they vomit while eating it.

Started by Ark, July 26, 2016, 01:50:51 PM

Previous topic - Next topic

Ark

Installed version 0.14.1241 (A14d) Linux 64bit, drm free. Deleted old config files and saves before running. No mods.
Started a new game in a rainforest, Phoebe Chillax challenge. Dev mode was not enabled before saving.

A wild cobra keeps attacking a dead chinchilla. Eventually the cobra passes out from exhaustion, and eats the chinchilla corpse normally after waking up. Take the chinchilla corpse away, and the cobra goes to hunt, kill and eat normally.
Another cobra may appear and eat parts of the corpse normally. The first cobra keeps attacking the corpse.
The status of the cobra is "Consuming chinchilla corpse."
There are also piles of cobra vomit, and a rat corpse around.
Loading the save and re-saving it produces the message:
Trying to save reference to a discarded thing Chinchilla85888 with saveDestroyedThings=true. This means that it's not deep-saved anywhere and is no longer managed by anything in the code, so saving its reference will always fail. , label=innerPawn
The corpse may be butchered normally, producing the message:
Chinchilla85888 is not a world pawn.

I expected the cobra to eat the corpse, not to attack it endlessly.

I tried, but I cannot make it happen again. The save has the active case.
Save game and log attached.


[attachment deleted by admin - too old]

milon

Ark, what a fantastic report!  I really appreciate it when forum members provide the relevant information needed (and read the stickies to find out what's relevant & needed).  I'm looking into your save right now.

EDIT:
The log file has nothing unusual or unexpected, except for two instances of "D3D device reset failed [invalid call]" which is common to see in Linux logs.

EDIT 2:
I confirm seeing exactly what Ark described.  I'm running Win10 x64 RimWorld (Steam version), build A14d (0.14.1241).  If it's helpful, the cobra's hunger on loading is below the lowest tick on the food line (urgently hungry).  But no malnutrition or other health defects present.  I did not test saving & reloading.

EDIT 3:
Even though the hungry cobra is melee attacking the corpse constantly, no further damage is being dealt to the chinchilla corpse (HP remains at 100/100).  Also, while this was happening, a second cobra approached, ate some of the dead chinchilla (head and one of the front legs), and wandered off again.  This had no discernible effect on the bugged cobra's behavior.

EDIT 4:
At game load, the cobra's status is "Consuming chinchilla corpse." No health defects present.
By the time the cobra collapses, it has Malnutrition (Trivial).

Ark

After viewing https://ludeon.com/forums/index.php?topic=28696.0 I decided to have another look at this bug.
And since that thread got locked, here's some thread necromancy.

0.16.1393 rev546 Linux 64bit drm-free, no mods. First spotted in 0.14.1241.

Predators sometimes get stuck attacking their already dead prey. This is because they vomit while eating the corpse, and then resume hunting.

Repro:
-spawn a bear and a hare close to each other, any predator and prey will work
-make the bear hungry
-wait untill the bear has killed the hare and is eating it
-force the bear to vomit
-bear now keeps beating on the dead corpse

ison