You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at Sandbox.Utility.HashSetEx`1.EnumerateLocked(Boolean nullChecks)+MoveNext() in C:\build\_work\sbox\sbox\engine\Sandbox.System\Collections\HashSetEx.cs:line 124
at Sandbox.Scene.Update() in C:\build\_work\sbox\sbox\engine\Sandbox.Game\Scene\Scene\Scene.Tick.cs:line 153
at Sandbox.Scene.SharedTick() in C:\build\_work\sbox\sbox\engine\Sandbox.Game\Scene\Scene\Scene.Tick.cs:line 229
at Sandbox.Scene.GameTick() in C:\build\_work\sbox\sbox\engine\Sandbox.Game\Scene\Scene\Scene.Tick.cs:line 278
at Sandbox.Game.Frame() in C:\build\_work\sbox\sbox\engine\Sandbox.Game\Game\Game.Scene.cs:line 33
at Sandbox.GameInstanceDll.Tick() in C:\build\_work\sbox\sbox\engine\Sandbox.GameInstance\GameInstanceDll.cs:line 278
at Sandbox.EngineLoop.FrameStart() in C:\build\_work\sbox\sbox\engine\Sandbox.Engine\EngineLoop.cs:line 212
at Sandbox.EngineLoop.RunFrame(CMaterialSystem2AppSystemDict appDict, Boolean& wantsQuit) in C:\build\_work\sbox\sbox\engine\Sandbox.Engine\EngineLoop.cs:line 64
To Reproduce
Use TryGet and Destroy the component
Observe error
Expected behavior
No error
Media/Files
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
We were getting the same error with the following code. I imagine it has something to do with removing the component from whatever internal hash set when it is destroyed.
Describe the bug
In Micro Mayhem, I am refactoring some of the code, and received an error while destroying a component fetched within a TryGet:
The error:
To Reproduce
Expected behavior
No error
Media/Files
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: