Fixed in Fixed in 0.91 Preview 623

#437 0.91 preview 485: error screen when resizing panel displays or boards

area: building
GameBugby @sgalatis8 months ago

2022-10-05T03:24:56Z | ERROR | [SceneAndNetworkManager] going to error screen with message: “Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index”

this happens quite frequently when I resize a component (mostly with panel displays) and then move the mouse while dismissing the resize action. I looked in the logs for a trace but could not find anything more specific than the error above.


4 comments
@JimmyDeveloper5 months ago

Fixed in next preview!

@sgalatis8 months ago (edited8 months ago)

my bad. looked in the console and this showed up:

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Collections.Generic.List`1[T].set_Item (System.Int32 index, T value) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
LogicWorld.Rendering.Instancing.MeshInstancer.StopRendering (LogicWorld.Rendering.Chunks.RenderedEntity removingEntity) (at <dca83f22eaa549b8a8fdb57e7b62a3b4>:0)
LogicWorld.Rendering.Chunks.EntityManager.StopRenderingEntity (LogicWorld.Rendering.Chunks.RenderedEntity entity) (at <dca83f22eaa549b8a8fdb57e7b62a3b4>:0)
LogicWorld.Rendering.Chunks.EntityManager.StopRenderingComponent (LogicAPI.Data.ComponentAddress cAddress) (at <dca83f22eaa549b8a8fdb57e7b62a3b4>:0)
LogicWorld.Rendering.Chunks.EntityManager.ReRenderComponent (LogicAPI.Data.ComponentAddress cAddress) (at <dca83f22eaa549b8a8fdb57e7b62a3b4>:0)
LogicWorld.Rendering.Chunks.EntityManager.<ReRenderComponentsAndWiresRecursive>g__ReRenderComponentsRecursive|41_0 (LogicAPI.Data.ComponentAddress _cAddress) (at <dca83f22eaa549b8a8fdb57e7b62a3b4>:0)
LogicWorld.Rendering.Chunks.EntityManager.ReRenderComponentsAndWiresRecursive (LogicAPI.Data.ComponentAddress cAddress) (at <dca83f22eaa549b8a8fdb57e7b62a3b4>:0)
LogicWorld.ClientWorldStuff.ClientWorldDataMutator.UpdateComponentPositionRotationParent (LogicAPI.WorldDataMutations.WorldMutation_UpdateComponentPositionRotationParent mutation) (at <00da62dbcb1a4f2e85dc0c4c907e0d61>:0)
LogicAPI.WorldDataMutations.WorldMutation_UpdateComponentPositionRotationParent.ApplyMutation (LogicAPI.Services.IWorldDataMutator mutator) (at <c9127292af174e3a814343ed106f60f4>:0)
LogicWorld.ClientWorldStuff.ClientWorld.ApplyWorldMutationFromServer (LogicAPI.WorldDataMutations.WorldDataMutation mutation) (at <00da62dbcb1a4f2e85dc0c4c907e0d61>:0)
LogicWorld.Networking.Handlers.WorldUpdateHandler.Handle (LogicAPI.Networking.Packets.Server.WorldUpdatePacket packet, LogicWorld.SharedCode.Networking.HandlerContext context) (at <f8fe6c0cbd3f4196969f2d6b4802a4f2>:0)
LogicWorld.SharedCode.Networking.PacketHandler`1[T].LogicWorld.SharedCode.Networking.IPacketHandler.Handle (System.Object packet, LogicWorld.SharedCode.Networking.HandlerContext context) (at <6bb8d88bbe5248398b02c0e37f0d599f>:0)
LogicWorld.Networking.Receiver.ProcessPacket (System.UInt16 packetType, System.Object packet, LogicWorld.SharedCode.Networking.HandlerContext context) (at <f8fe6c0cbd3f4196969f2d6b4802a4f2>:0)
LogicWorld.Networking.GameNetwork.RecieveIncomingMessages () (at <f8fe6c0cbd3f4196969f2d6b4802a4f2>:0)
LogicWorld.GameManager.<Update>g__RunInGameUpdateInternal|7_0 () (at <5db6e698e6bd44eeb01fcfa054a629be>:0)
LogicWorld.GameManager.Update () (at <5db6e698e6bd44eeb01fcfa054a629be>:0)
UnityEngine.Debug:LogException(Exception)
LogicWorld.<>c__DisplayClass14_0:<TriggerErrorScreen>b__0()
JimmysUnityUtilities.Dispatcher:InvokeAsync(Action)
LogicWorld.SceneAndNetworkManager:TriggerErrorScreen(Exception)
LogicWorld.GameManager:Update()
@Ecconia8 months ago

Btw just like in Discord you can wrap your stacktraces in three backticks 3x ` to make them much more readable and unformatted :)

I bet I had one of the resize ones before. But they are so difficult to reproduce… Can you? (As in, describe the steps to reproduce).

@sgalatis8 months ago (edited7 months ago)

it happens almost all the time if: (Assuming the ’T’ key is used to resize)

you start a resize action with T key, resize component

move/fly to a different spot while resizing (just changing your view angle isnt enough)

finalize the resize by pressing T again.

sometimes it works fine. sometimes it results in an error screen. the primary thing is moving while doing a resize. earlier i did many different resize ops without moving around and the error did not trigger. only when i started moving around while the resize arrows were out did the errors start happening

a little more info: this happens more often on boards that have many components/sub boards attached to the one you are resizing. the more components, the more likely the error will occur if you move while resizing