O-n-y / oxy.mods

Oxy.BugTracker
14 stars 2 forks source link

[Favorite Resources] Crash on Game Load #83

Closed Jbliske closed 1 year ago

Jbliske commented 2 years ago

Crash on Game Load

From Debug Console - This was spamming the console:

[DebugConsole][1]: Error[Exception]: InvalidCastException: Specified cast is not valid. (wrapper castclass) System.Object.castclass_with_cache(object,intptr,intptr) Ony.OxygenNotIncluded.Object_Extensions.GetFieldValue[T] (System.Object obj, System.String fieldName) (at :0) Ony.OxygenNotIncluded.FavoriteResources.PinnedResourcesPanel_RefreshLine.Postfix (PinnedResourcesPanel instance, Tag tag, WorldInventory inventory) (at :0) (wrapper dynamic-method) PinnedResourcesPanel.PinnedResourcesPanel.RefreshLine_Patch2(PinnedResourcesPanel,Tag,WorldInventory,bool) (wrapper dynamic-method) PinnedResourcesPanel.PinnedResourcesPanel.Refresh_Patch1(PinnedResourcesPanel) PinnedResourcesPanel.Render1000ms (System.Single dt) (at :0) SimAndRenderScheduler+Render1000msUpdater.Update (IRender1000ms updater, System.Single dt) (at <3366109ff608488f8317d0b43357f1ba>:0) UpdateBucketWithUpdater`1[DataType].Update (System.Single dt) (at <3366109ff608488f8317d0b43357f1ba>:0) StateMachineUpdater+BucketGroup.AdvanceOneSubTick (System.Single dt) (at <3366109ff608488f8317d0b43357f1ba>:0) StateMachineUpdater+BucketGroup.InternalAdvance (System.Single dt) (at <3366109ff608488f8317d0b43357f1ba>:0) StateMachineUpdater+BucketGroup.Advance (System.Single dt) (at <3366109ff608488f8317d0b43357f1ba>:0) StateMachineUpdater.Render (System.Single dt) (at <3366109ff608488f8317d0b43357f1ba>:0) Game.LateUpdate () (at :0)

From Crash:

Error in PinnedResourcesPanel.PinnedResourcesPanel.OnSpawn System.InvalidCastException: Specified cast is not valid. at (wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr) at Ony.OxygenNotIncluded.Object_Extensions.GetFieldValue[T] (System.Object obj, System.String fieldName) [0x0001f] in :0 at Ony.OxygenNotIncluded.FavoriteResources.FavoriteResources.get_PinnedResourcesPanel_ResourceRows () [0x00000] in :0 at Ony.OxygenNotIncluded.FavoriteResources.PinnedResourcesPanel_SortRows.Prefix () [0x00006] in :0 at (wrapper dynamic-method) PinnedResourcesPanel.PinnedResourcesPanel.SortRows_Patch1(PinnedResourcesPanel) at (wrapper dynamic-method) PinnedResourcesPanel.PinnedResourcesPanel.Populate_Patch2(PinnedResourcesPanel,object) at (wrapper dynamic-method) PinnedResourcesPanel.PinnedResourcesPanel.OnSpawn_Patch1(PinnedResourcesPanel) at KMonoBehaviour.Spawn () [0x0005d] in <3366109ff608488f8317d0b43357f1ba>:0

at UnityEngine.Debug.LogError (System.Object message, UnityEngine.Object context) [0x00000] in <72b60a3dd8cd4f12a155b761a1af9144>:0 at Debug.LogError (System.Object obj, UnityEngine.Object context) [0x00000] in <3366109ff608488f8317d0b43357f1ba>:0 at DebugUtil.LogErrorArgs (UnityEngine.Object context, System.Object[] objs) [0x00000] in <3366109ff608488f8317d0b43357f1ba>:0 at DebugUtil.LogException (UnityEngine.Object context, System.String errorMessage, System.Exception e) [0x00000] in <3366109ff608488f8317d0b43357f1ba>:0 at KMonoBehaviour.Spawn () [0x00000] in <3366109ff608488f8317d0b43357f1ba>:0 at KMonoBehaviour.Start () [0x00000] in <3366109ff608488f8317d0b43357f1ba>:0 Build: U42-509629-S

O-n-y commented 1 year ago

Should be fixed in upcoming release