KittenAqua/TrainworksModdingTools

New Trainworks Crash as of the Controller Patch

Opened this issue · 3 comments

Crash Signature:

2020-12-11T02:50:06 48 ERROR [Engine] [Signal] Trapped listener exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
Error Callstack:
at Trainworks.Patches.CustomClanSelectScreenPatch.Postfix (System.Boolean& __state, ClassSelectCharacterDisplay[]& ___characterDisplays, UnityEngine.Transform& ___charactersRoot) [0x000ad] in :0
at ClassSelectionScreen.RefreshCharacters () [0x000d9] in <4cfdd9e7367f481d8c34aa654acff5bf>:0
at ClassSelectionScreen.HandleClassChanged () [0x00000] in <4cfdd9e7367f481d8c34aa654acff5bf>:0
at ClassSelectionScreen.HandleSubClassSelected (ClassSelectionUI+ClassOptionData newClass, ClassSelectionUI+ClassOptionData oldClass) [0x0005b] in <4cfdd9e7367f481d8c34aa654acff5bf>:0
at ShinyShoe.Signal`2[T,U].Dispatch (T type1, U type2) [0x0000a] in <4cfdd9e7367f481d8c34aa654acff5bf>:0
CoroutineController callstack:

Seems to happen without any other mod installed.

Might be related to #131.

@RisingDusk Can't reproduce with just Trainworks (and mod loader) installed.
Anything else that might be different from vanilla?

Only other difference is that I have the Runtime Unity Editor 2.2.1 plugin installed, but that doesn't actually do any patching. Furthermore, the crash goes away if I disable Trainworks and comes back if I reenable it. If it appears to help, the context for the crash is here:

2020-12-12T16:54:55 51 VERBOSE [LoadingScreen] Task done: LoadClassSelectionAssets [FullScreen] 0.8s
2020-12-12T16:54:55 51 VERBOSE [Gameplay] Showing screen ClassSelection
2020-12-12T16:54:55 51 VERBOSE [LoadingScreen] Normal Task added: LoadScreen [FullScreen] [ClassSelection] [show]
2020-12-12T16:54:55 51 VERBOSE [LoadingScreen] Normal Task starting: LoadScreen [FullScreen] [ClassSelection] [show]
2020-12-12T16:54:55 51 VERBOSE [Gameplay] Hiding screen MainMenu
2020-12-12T16:54:55 72 VERBOSE [LoadingScreen] Task done: LoadScreen [FullScreen] [ClassSelection] [show] 0.4s
2020-12-12T16:54:55 72 VERBOSE [AssetLoading] LoadingScreen: Loading time 1.2s
2020-12-12T16:54:55 72 VERBOSE [Gameflow] Entered Clan Select
2020-12-12T16:54:55 72 VERBOSE [Gameplay] Running RelicState.Setup for Ascension25SeraphHealth
2020-12-12T16:54:55 72 ERROR [Engine] [Signal] Trapped listener exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.