[1.201.013] Removing Grids Near Voxel Causes Error

Slushtrap Gamer shared this bug 6 months ago
Need More Information

When grids are being closed/removed from the world on a dedicated server, they tend to cause a physics exception if, at the time of deletion, they were interacting with voxels. This is most observable when grid deleting happens through clipboard (CTRL-X / CTRL-DELETE) or if the trash remover does so, which often leads to the crash in question; see attached log.

NOTE: Only seems to occur on dedicated servers.

Steps to reproduce:

1. Place non-station grids on top of voxel.

2. Remove these grids.

3. Repeat until bug shows itself.

Replies (3)


Hello, Slushtrap,

thanks for letting us know.

Are you able to reproduce this issue every time, or is there some condition that would trigger it? So far I was not able to reproduce it.

How exactly is the issue observable? You are writing that the game is crashing... often. That's quite self explanatory :) But since the world "often", and not "every time", I understand it, that some other times, it won't crash. How does it look in game in this situation? Does some error pop-up in the game itself as well, or are those visible only in the logs?

Do you have any grids, with that it happens more ofter than with others? Can you share BP of this, if any?

Are you only able to reproduce it on DS, as you wrote, or in other game modes as well?

The steps are still applicable or did you find any step that would make it more accurate? Any more information that you can share would help!

Thanks in advance.

Kind Regards

Keen Software House: QA Department


The issue does not appear every time, but the grids involved don't seem to matter. Sometimes it was a large rover with plenty of subgrids, while at another time a simple piece of debri around 100 blocks. The issue is observable given the server crashes when the bug kicks in and it displays a message similar to the error outlined at the end of the provided log; see:

2022-05-19 01:22:50.023 - Thread: 23 -> Exception occurred: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

at Havok.HkReferenceObject.HkReferenceObject_RemoveReference(IntPtr instance)

at Havok.HkEntity.Dispose(Boolean disposing)

at Havok.HkRigidBody.Dispose(Boolean disposing)

at Havok.HkHandle.DisposeInternal(Boolean disposing)

at Sandbox.Engine.Physics.MyPhysicsBody.CloseRigidBody()

at Sandbox.Engine.Physics.MyPhysicsBody.Close()

at Sandbox.Engine.Voxels.MyVoxelPhysicsBody.Close()

at VRage.Game.Entity.MyEntity.Delete()

at Sandbox.Game.Entities.MyEntities.DeleteRememberedEntities()

at Sandbox.Game.Entities.MyEntities.UpdateAfterSimulation()

at Sandbox.Game.World.MySector.UpdateAfterSimulation()

at Sandbox.Game.World.MySession.UpdateComponents()

at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime)

at Sandbox.MySandboxGame.Update()

at Sandbox.Engine.Platform.Game.UpdateInternal()

at Sandbox.Engine.Platform.Game.RunSingleFrame()

at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0()

at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)

at Sandbox.Engine.Platform.Game.RunLoop()

at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)

at VRage.Dedicated.DedicatedServer.RunInternal(String instanceName)

at VRage.Dedicated.DedicatedServer.RunMain(String instanceName, String customPath, Boolean isService, Boolean showConsole, Boolean checkAlive)

at VRage.Dedicated.WindowsService.MainThreadStart(Object obj)

at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart(Object obj)

2022-05-19 01:22:50.024 - Thread: 23 -> Showing message

2022-05-19 01:22:50.600 - Thread: 23 ->

In game it looks like the server crashes and the error itself is only observable through the logs, and as far as ive been able to test, only happens on DS. What is known is that using the entity list removal button does not induce the bug, thus i have two suggestions for getting it to happen:

Either throw around lots of grids then let trash remover cleanup (this seems to be the most common cause), or use grids with large amount of subgrids such as rovers, which will also remove more than one grid at a time that also interacts with voxel.

Lastly, while i don't think it entirely matters; the world settings have voxel damage disabled


Update: The bug seems to effect all entities, not just grids, as removing players who are currently interacting, such as colliding, with voxel, also seems to cause the exact same error.


Hello, Engineer!

Unfortunately, we still aren't able to reproduce this issue.

May I ask if you are still experiencing the issue? If yes, may I know the approximate repro rate (how often is it happening), and have you experienced it on another server/game too?

Any added information will further help us to investigate this issue.

We are looking forward to assisting with this issue.

Kind Regards,

Keen Software House: QA Department


The issue is still being experienced; i have provided a fresh log of it. As for how often it happens, i cannot say with full certainty but it seems that the rate depends on how heavy the server is loaded and how many grids are being removed at the same time. If this happens on other places i dont know, its only shown in the server logs which i dont have access to elsewhere. The crash still seems to revolve around removing lots of grids in contact with voxel simultenously, but it has happened with removing a single grid before so not too sure.

Leave a Comment
Attach a file