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
Nah, that's just debug information.
Though I have no idea how you got the initialization of the static defs to fail. Only idea I have to un- and resubscribe to the mod - or there is a conflict with some other mod you are running
Could not execute post-long-event action. Exception: System.NullReferenceException: Object reference not set to an instance of an object
[Ref 4C830C99]
at CaravanMoodBuff.CaravanMoodBuffSettings.InitializeStatics () [0x00000] in D:\0Stuff\2Games\RimWorld\_mods\CaravanMoodBuff\Source\CaravanMoodBuffSettings.cs:59
at CaravanMoodBuff.CaravanMoodBuff.Initialize () [0x00000] in D:\0Stuff\2Games\RimWorld\_mods\CaravanMoodBuff\Source\CaravanMoodBuff.cs:50
at Verse.LongEventHandler.ExecuteToExecuteWhenFinished () [0x0007c] in <981a33edf24d499488b0f820d94638e1>:0
startIndex: 60
endIndex: 72
As long as it works, it works. Maybe not perfectly efficient, but I see no other option for the moment.
@Richard Mc Nutbuster
The error it throws in the log would be a good start, without any info I can't help
That .ToArray() is a poor way of “solving” the problem, but if no weird behaviors are occurring, then I guess we could say “it worked.”
Fixed error due to modified collection, thanks to @Aladeen
Removed leftover debug print
---
@Aladeen
This issue has me slightly worried.
The code, as it was, was taken from previous versions, which ran without issue. Not sure why the collection is modified during the call all of a sudden, it could mean that there is something multithreaded going on which causes the collection to change on subsequent runs of the foreach-loop.
I applied your change, it should work fine, though if it really is a multithreading issue, I'm worried that the collection may be modified while its array is being acquired...not sure what that would mean for my code and its execution.