Closed acctforrandomstuff closed 3 years ago
Please provide the full report you full bug report. Lines 217-221 of Proton.AlertsReadout_AlertsReadoutUpdate_Patch
has nothing to do with it. These are Harmony patches and have a different stack trace format.
Please provide all the information as mentioned in the issues format.
I'm sorry if this is not an issue for your project. I just searched for words from the exception and found this repo. I briefly looked over the code I saw the code below, which looks to me like it would produce the Index Out of Range exception.
for (int i = 0; i < codes.Length; i++)
{
//...
if (codes[i + 1].labels == null)
{
codes[i + 1].labels = new List<Label>();
}
codes[i + 1].labels.Add(l1);
//...
}
Rimworld v1.2.3005 Rocketman v0.6.3.2191 HugsLib log: https://gist.github.com/HugsLibRecordKeeper/6292002801f6f7fcaaaa0a8706b85a87
Exception in UIRootUpdate: System.IndexOutOfRangeException: Index was outside the bounds of the array. at Proton.AlertsReadout_AlertsReadoutUpdate_Patch.ShouldUpdate (System.Int32 index) [0x00009] in <3d73fa4a5d264fae8483d91ee0f432a6>:0 at (wrapper dynamic-method) RimWorld.AlertsReadout.RimWorld.AlertsReadout.AlertsReadoutUpdate_Patch0(RimWorld.AlertsReadout) at (wrapper dynamic-method) RimWorld.UIRoot_Play.RimWorld.UIRoot_Play.UIRootUpdate_Patch1(RimWorld.UIRoot_Play)(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
This code is patching code not a code that run every tick. This function is not even in the stack trace.
I apologize for taking up your time with this then. Can you tell from the log which mod(s) might be causing this exception?
It's fixed. I added more checks for this bug.
Thanks for the report!
It seems Lines 217-221 of
Proton.AlertsReadout_AlertsReadoutUpdate_Patch
(Proton/Core/Patches/AlertsReadout_Patch.cs) is exceeding the index of thefor
loop at Line 169.