Revolutionary-Games / Thrive

The main repository for the development of the evolution game Thrive.
https://revolutionarygamesstudio.com/
Other
2.84k stars 503 forks source link

Ingested matter bar / engulfed object can get stuck being engulfed with 0 size remaining #4794

Open hhyyrylainen opened 9 months ago

hhyyrylainen commented 9 months ago

Looks like the ingested matter bar showing 0 (or a low value) is back with an engulfable being stuck not progressing anymore. For ECS I had to remove one NaN compound clamping due to multithreading in the digestion processing, but I was hoping everything else would compensate for that (there's a separate issue about checking that: https://github.com/Revolutionary-Games/Thrive/issues/4700). Though I'm not even fully sure what is the root cause here, but that's at least somewhere to start. I already tried to add various safety checks in the code but that didn't solve the issue: https://github.com/Revolutionary-Games/Thrive/pull/4793

Here's a save that shows the stuck bar: https://dev.revolutionarygamesstudio.com/files/Public/Testing%20Resources/Saves/toxin_digest_bug.thrivesave

hhyyrylainen commented 8 months ago

Maybe this or another issue also can make the ingested matter get stuck at a different value (0.1).

A save showing this problem would also be likely useful.

hhyyrylainen commented 8 months ago

Potential steps to reproduce the issue

I engulfed some cell, waited until ingested matter bar get's low (0.3, for example) and then enter editor (I entered via P button cheat if it matters)

But I couldn't get the bug to appear like that, this is the cell build I had:

2024-02-25_13 21 10 6749

CI09 commented 8 months ago

Save link: https://dev.revolutionarygamesstudio.com/files/Public/Testing%20Resources/Saves/Engulfing.thrivesave

CI09 commented 8 months ago

Does that happen only when leaving editor?

CI09 commented 8 months ago

Also it can be fixed by making digested enulfable disappear not when 100% digested but a bit ealier by tweaking one constant. There will likely be side effects though

hhyyrylainen commented 8 months ago

That could explain that there is some bug related to the fully digested thing destroying and removal from the list of engulfed things. There's separate code for handling something being fully digested and needing to be removed. So that could be a pretty good clue to where to look in the code for a bug.

hhyyrylainen commented 6 months ago

A potentially related new issue: https://github.com/Revolutionary-Games/Thrive/issues/5013

hhyyrylainen commented 6 days ago

This still happens but I noticed that basically the same prey species but replacing the hydrogen sulfide parts with glucose using parts allows digesting them all. So this could be some bug in the not-useful compound digestion.