BepisPlugins icon indicating copy to clipboard operation
BepisPlugins copied to clipboard

[AI/HS2] - Sideloader resolve warning spam at saving/loading studio scenes

Open ConQode opened this issue 1 year ago • 6 comments

After updating my AI to the latest BepInEx, Bepis Plugins and AIAPI versions (and basically every plugin I could find to update), I encountered an issue with the latest sideloader versions beginning with the one included in the BepisPlugins_r19.3.3. With the BepisPlugins_r19.3.2 version those warning don't appear.

When loading or saving a scene with several items in it, the console is being spammed with Sideloader warnings for every item in the scene (see screenshot). bla2

To reproduce the issue, basically is needed to have the latest BepisPlugins installed, add any objects to the scene and save the scene. To reproduce the second issue (im not sure if it is related to the first issue), I am not sure how to reproduce it, as it occours for me seemingly randomly.

Not really sure if that is relevant or not. I just encountered that issue after updating my plugins, since I sometimes wasn't able to save my scene anymore because of the following error:

[Error  : Unity Log] ArgumentException: An item with the same key has already been added. Key: 226
Stack trace:
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
Sideloader.AutoResolver.StudioObjectSearch.FindObjectInfoAndOrder (Sideloader.AutoResolver.StudioObjectSearch+SearchType searchType, System.Type objectType, System.Collections.Generic.Dictionary`2[System.Int32,System.Int32]& dicObjectInfoOrder) (at <8265a189123347ed85fa1a71e1837368>:0)
Sideloader.AutoResolver.UniversalAutoResolver+Hooks.SavePrefix () (at <8265a189123347ed85fa1a71e1837368>:0)
(wrapper dynamic-method) Studio.SceneInfo.DMD<Studio.SceneInfo::Save>(Studio.SceneInfo,string)
Studio.Studio.SaveScene () (at <fc5e30ac19c548aaa1879eb2a5c1c7cc>:0)
(wrapper dynamic-method) Studio.SystemButtonCtrl.DMD<Studio.SystemButtonCtrl::OnClickSave>(Studio.SystemButtonCtrl)
UnityEngine.Events.InvokableCall.Invoke () (at <0a7d89e4511e4bdeb215f76ca00fd04e>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <0a7d89e4511e4bdeb215f76ca00fd04e>:0)
UnityEngine.UI.Button.Press () (at <cbde84dcdf65425e940a9e23e01c7888>:0)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <cbde84dcdf65425e940a9e23e01c7888>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <cbde84dcdf65425e940a9e23e01c7888>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <cbde84dcdf65425e940a9e23e01c7888>:0)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
AIProject.InputModule:ProcessMousePress(MouseButtonEventData)
AIProject.InputModule:ProcessMouseEvent(Int32)
AIProject.InputModule:ProcessMouseEvent()
AIProject.InputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()

Wanted to see if that issue still occours with the latest plugin versions. But for now I stay with the 19.3.2 BepisPlugins. Also it's hard to reproduce that inability to save the scene, as it seems to me that it would occour randomly.

ConQode avatar Feb 13 '24 14:02 ConQode

The warnings indicate issues inside zipmods. Previous version of sideloader simply ignored them which caused a different set of issues, e.g. the accessories to studio items plugin not working correctly. The warnings can be resolved by fixing list files inside the listed zipmods to use proper group and category IDs (probably best to report to the mod authors). Make sure your sideloader modpack is up to date first.

The error when saving is most likely because of malformed list files inside zipmods that are used in a given scene (most likely the same zipmods that are shown in the errors before). Try to pinpoint which zipmod triggers this issue. Although unlikely it could also be an interaction between a couple of different zipmods.

ManlyMarco avatar Feb 14 '24 09:02 ManlyMarco

I can choose any mod from any zipmod, I always get that message for that object. I tried with I don't know many different zipmods and not a single time I didn't get that message

ConQode avatar Feb 15 '24 09:02 ConQode

If you don't remove the offending items first then the error will keep appearing. It might be necessary to remove the zipmod file itself.

ManlyMarco avatar Feb 15 '24 20:02 ManlyMarco

What I'm saying is: The warning occours for EVERY zipmod. I can't remove all my mods. And I doubt every single one has an error.

ConQode avatar Feb 16 '24 09:02 ConQode

You're right, it does appear to be happening for all zipmod items. Looks like there's an underlying issue that got uncovered by the update. The new version shouldn't have any effect outside of the log message being logged however.

ManlyMarco avatar Feb 16 '24 12:02 ManlyMarco

Thanks for your great work. I feared I had some fundamental issue in my plugin collection.

ConQode avatar Feb 17 '24 18:02 ConQode