Truinto / ONI-Modloader-SimpleMods

OxygenNotIncluded Mods
MIT License
16 stars 6 forks source link

[CustomizeBuildings] SkillStation: Crash when assigning #54

Closed ezonius closed 5 months ago

ezonius commented 6 months ago

Describe the bug When using the SkillStation and switching assigned Dupe, or assigning multiple dupe for different Skill stations, a crash occurs.

Recycling an item row with tag SuperProductive that was already in the recycle pool

  at UnityEngine.Debug.LogError (System.Object message) [0x00000] in <72b60a3dd8cd4f12a155b761a1af9144>:0 
  at Debug.LogError (System.Object obj) [0x00000] in <1e2b7d5db95c4d6b84eabb7ca0270927>:0 
  at SingleItemSelectionSideScreenBase.RecycleItemRow (SingleItemSelectionRow row) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at SingleItemSelectionSideScreenBase+Category.RemoveAllItems () [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at SingleItemSelectionSideScreenBase.CreateCategoryWithItems (Tag categoryTag, System.Collections.Generic.ICollection`1[T] items) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at SingleItemSelectionSideScreenBase.SetData (System.Collections.Generic.Dictionary`2[TKey,TValue] data) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at FilterSideScreen.Configure (Filterable filterable) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at FilterSideScreen.SetTarget (UnityEngine.GameObject target) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at DetailsScreen.Refresh (UnityEngine.GameObject go) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at CustomizeBuildings.SkillStation_RefreshUI_Patch.Postfix (ResetSkillsStation __instance) [0x00000] in <f24d8d0a5c284c12ae96ce06f4de4fd0>:0 
  at ResetSkillsStation.ResetSkillsStation.OnAssign_Patch1 (ResetSkillsStation , IAssignableIdentity ) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at Assignable.Assign (IAssignableIdentity new_assignee) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at Ownable.Assign (IAssignableIdentity new_assignee) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at AssignableSideScreen.ChangeAssignment (IAssignableIdentity new_identity) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at AssignableSideScreen.OnRowClicked (IAssignableIdentity identity) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at AssignableSideScreenRow+<>c__DisplayClass11_0.<SetContent>b__1 () [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at MultiToggle.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <ad63d841ef814a5d8bf82e8bc9ca21bd>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <e9635660f69b4d9d84c085aeda3be353>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <e9635660f69b4d9d84c085aeda3be353>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <e9635660f69b4d9d84c085aeda3be353>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <e9635660f69b4d9d84c085aeda3be353>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <e9635660f69b4d9d84c085aeda3be353>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000] in <e9635660f69b4d9d84c085aeda3be353>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <e9635660f69b4d9d84c085aeda3be353>:0 
  at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <e9635660f69b4d9d84c085aeda3be353>:0 
Build: U50-587362-S

To Reproduce Steps to reproduce the behavior: Assign a dupe to the skill station. Assign a different dupe to the same station, or a different dupe to a different skillstation. Seems to happen for me when I assign my third dupe.

[required] Debug Logs

Desktop (please complete the following information):

ezonius commented 6 months ago

If I remove the positive traits from my dupes, with the skill station, I don't seem to get the crash anymore. SuperProductive, StickerBomber, SparkleStreaker, HappySinger, BalloonArtist, have any of these traits will cause a crash when assgining dupe. Negative traits seems fine, at least BingeEater, which I have on all my dupes.

Truinto commented 5 months ago

Fixed. Thanks for the actually helpful report.