Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
(Sorry I never ended up properly syncing my source on github).
Sorry to bother you again, but I may have found a fix for the https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/903287164/1742266800325548307/ issue.
I was "lucky" enough to have this problem easily reproducible in my save. It looks like that the easiest way to get a complete freeze is to select a blueprint, then quickly close all menus and remove the builder block. Probably 1 in 10 attempts should get frozen.
I did some log-based debugging and it seems that the problem occurs when the hologram gets cleared. In particular, almost always in OnDelete() method at the "UnityEngine.Object.Destroy(gameObject);" line. I am not exactly sure why but it only happends when called from OnDelete. Rotating and changing blueprints don't cause the issue, even though it may clear the hologram (with GameObjects) as well.
So my assumption is that the OnDelete() method is called from a different thread which somehow causes a dead-lock in Unity thread, or something. I am not very familiar with Unity.
So I tried to run it in a different thread that is managed by Unity (again, my asumtion) by using a MonoBegavior.StartCoroutine() method. This change seems to have helped, and now I am not able to cause a dead-lock by removing the builder, on my machine™ :)
Here are my changes:
BlueprintBuilderMod.cs
BlueprintBuilder.cs
I hope it makes sense.
I had tried calling
The fact is that after implementing the CoRoutine I cannot reproduce the freeze anymore. It definitely changes something, but I have no idea what it is an how to understand it better.
If you would like to investigate it a bit more, I will be happy to run some additional tests or provide more information.
In case you'd rather leave it as is, it is fine. I just wanted to share the potential fix with you, because it seems to be affecting only some people and could be hard to detect.