Jump to content

[beta] Silent game crash caused by germ-related issue


pether
  • Branch: Preview Branch Version: Windows Pending

Absence of previously-existing germs causes game to crash after loading the save with no logs to indicate the issue. I aslo got report from other player they obsevred BSOD when trying to reproduce the issue. Similar conditions caused issues on live branch, but always with some logs to navigate source of the issue - on beta branch there are no logs, no exceptions, the game just quits.

Have you guys change something related to germs in recent beta updates?

It seems to trigger the issue one need to have a save with additional (modded) germs, disable the mod (or just the germs if the mod settings allow this) and try to load the save. The loading completes, but when the game is unpaused, it quits to desktop without any info.

I normally wouldn't open ticket for crashes caused by mods and I would fix the issue in my mods, but after week of trying I must say this one is very hard to even root cause. There are no logs to help me find the cause and it leads me to believe the crash might be caused by sim or other component beyond modders control.

I would appreciate help with this issue, either fixing it or providing suggestion what germ-related changed recently so I could try to fix it myself. However, I'm not gonna lie, crashes caused by mod uninstall are very nasty to fix since the mod with fixing code is no longer there to prevent the damage...

Potentially helpful note: previously I observed crashes caused by EntombedItemManager, applying un-existing germ index to entombed items. I think I managed to fix that issue, but this one might be somehow similar.... or not, who knows?

Please let me know if you would need more information or had some suggestions

Thanks!

Attaching save where the issue can be observed

Attaching DiseasesExpanded mod built for beta branch (might not work on live branch). Not using the mod or using it with germs disabled causes the save to crash. Having the mod and all germs enabled loads the save and allows to unpause and play.

plants_Cycle_43.sav DiseasesExpanded_2023_10_01.zip


Steps to Reproduce

1. Have a save using additional (modded) germs, eg. from Diseases Expanded mod

2. Disable the germs or uninstall the mod

3. Load the game

4. Unpause, see the crash




User Feedback


This does not appear to be specific to the beta, that save crashes in the same way on release without the mod installed. Crashing to desktop usually means a sim crash. The crash is happening in the sim when updating the disease emitter component (SimMessages.ModifyDiseaseEmitter in C#) from a Sanishells with an invalid diseaseIdx (idx 5).

The game does not handle removing diseases all that well from the bits of code we reviewed. For example, if two mods add diseases and their order changes or the earlier mod is removed it will cause issues. It's something we would like to improve when we have the time.

  • Like 1
  • Health 1

Share this comment


Link to comment
Share on other sites

I'm adding modded germs to Sanishell's Emitter if those germs are enabled by the user. It seems they are later serialized and restored as they were initially. If user changes the setting, deserialization is not aware of it. I assume new crabs spawned would be fine after that, but the crash happens before new ones could be spawned.

I believe I was able to fix the crash by removing non-existing germs from the crab OnSpawn:
https://github.com/pether-pg/ONI_Mods_byPether/blob/master/DiseasesExpanded/Patches/DiseasesExpanded_Patches_DiseaseEmitter.cs#L13

I would need to test it more, but it looks promising.
Thanks for your help!

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...