This object is in archive! 

ParallelTask crash - Unknown signal or MySensorBlock issue?

SKO 85 shared this bug 3 years ago
Won't Fix

I got a server crash twice within 15 minutes reporting the following StackTrace. Before this started happening I enabled Unknown Signals for the server. This was off before. I don't know if it is related to it. I also see MySensorBlock mentioned in the stack trace. Might also be related to that.


15:45:18.4835 [FATAL] Initializer: ParallelTasks.TaskException: An exception(s) was thrown while executing a task.

at ParallelTasks.WorkItem.ThrowExceptionsInternal(Int32 runId)

at ParallelTasks.Task.WaitOrExecute(Boolean blocking)

at ParallelTasks.Parallel.ForEach[T](IEnumerable`1 collection, Action`1 action, WorkPriority priority, Nullable`1 options, Boolean blocking)

at Sandbox.Game.Entities.Blocks.MySensorBlock.UpdateAfterSimulation10()

at Sandbox.Game.Entities.MyParallelEntityUpdateOrchestrator.UpdateAfterSimulation10()

at Sandbox.Game.Entities.MyParallelEntityUpdateOrchestrator.DispatchAfterSimulation()

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)

Replies (6)

photo
1

Hello, Engineer!


Thank you for contacting us. Could you please provide us with a save of your world?

Thank you!


Kind Regards

Keen Software House: QA Department

photo
1

Sure, please download the save of the world from here:

https://we.tl/t-8JJmV3dCnJ

photo
1

Any progression on this one? We still have issues with the Parallel API. Something is modifying a collection where is not allowed or a lock is not handled as it should be I guess. More details:

System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.Collections.Generic.HashSet`1.Enumerator.MoveNext()
   at Sandbox.Game.Entities.Cube.MyGridShape.CollectBlockInventories(HashSet`1 blocks, Single cargoMassMultiplier, HkMassElement[] massElementsOut)
   at Sandbox.Game.Entities.Cube.MyGridShape.UpdateMassFromInventories(HashSet`1 blocks, MyPhysicsBody rb)
   at Sandbox.Game.Entities.MyCubeGrid.UpdateInventoryMass()
   at Sandbox.Game.Entities.MyCubeGrid.Dispatch(UpdateQueue queue, Boolean parallel)
   at Sandbox.Game.Entities.MyCubeGrid.UpdateAfterSimulationParallel()

photo
1

Hello there,

last night our Servers crashed several times with that Error:


Since it crashed again right after the world was loaded again I am also attaching a worldsave for you guys :-)


https://drive.google.com/file/d/1D3lcVCcASou6i5qzdkk2RGpgL8OCMm7H/view?usp=sharing


However I am unsure of how to reproduce it with that


Please fix.

02:36:30.7977 [FATAL]  Initializer: ParallelTasks.TaskException: An exception(s) was thrown while executing a task.
   at ParallelTasks.WorkItem.ThrowExceptionsInternal(Int32 runId)
   at ParallelTasks.Task.WaitOrExecute(Boolean blocking)
   at ParallelTasks.Parallel.ForEach[T](IEnumerable`1 collection, Action`1 action, WorkPriority priority, Nullable`1 options, Boolean blocking)
   at Sandbox.Game.Entities.Blocks.MySensorBlock.UpdateAfterSimulation10()
   at Patched_Sandbox.Game.Entities.MyParallelEntityUpdateOrchestratorUpdateAfterSimulation10_0(Object )
   at Sandbox.Game.Entities.MyParallelEntityUpdateOrchestrator.DispatchAfterSimulation()
   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 Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object )
   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 Torch.VRageGame.DoStart() in C:\jenkins\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 246
   at Torch.VRageGame.Run() in C:\jenkins\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 118
   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()
Task exception, inner exception 0:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at Sandbox.Game.Entities.Blocks.MySensorBlock.ShouldDetectGrid(MyCubeGrid grid)
   at Sandbox.Game.Entities.Blocks.MySensorBlock.<>c__DisplayClass119_0.<UpdateAfterSimulation10>b__0(MyEntity entity)
   at ParallelTasks.ForEachLoopWork`1.DoWork(WorkData workData)
   at ParallelTasks.WorkItem.DoWork(Int32 expectedID)

ParallelTasks.TaskException: An exception(s) was thrown while executing a task.
   at ParallelTasks.WorkItem.ThrowExceptionsInternal(Int32 runId)
   at ParallelTasks.Task.WaitOrExecute(Boolean blocking)
   at ParallelTasks.Parallel.ForEach[T](IEnumerable`1 collection, Action`1 action, WorkPriority priority, Nullable`1 options, Boolean blocking)
   at Sandbox.Game.Entities.Blocks.MySensorBlock.UpdateAfterSimulation10()
   at Patched_Sandbox.Game.Entities.MyParallelEntityUpdateOrchestratorUpdateAfterSimulation10_0(Object )
   at Sandbox.Game.Entities.MyParallelEntityUpdateOrchestrator.DispatchAfterSimulation()
   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 Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object )
   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 Torch.VRageGame.DoStart() in C:\jenkins\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 246
   at Torch.VRageGame.Run() in C:\jenkins\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 118
   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()
Task exception, inner exception 0:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at Sandbox.Game.Entities.Blocks.MySensorBlock.ShouldDetectGrid(MyCubeGrid grid)
   at Sandbox.Game.Entities.Blocks.MySensorBlock.<>c__DisplayClass119_0.<UpdateAfterSimulation10>b__0(MyEntity entity)
   at ParallelTasks.ForEachLoopWork`1.DoWork(WorkData workData)
   at ParallelTasks.WorkItem.DoWork(Int32 expectedID)

photo
1

Hello, Engineers!

I appreciate this thread is quite old. Is this still an issue that persists or has this since been resolved? If resolved, I will close this thread for you :)

Kind Regards

Laura, QA Department

photo
1

Hello, Engineers!

Because there is no new comment from you, and we are unable to reproduce the issue on our own, I will close this thread now as outdated.

If you or any other player will experience this issue again, please make a new thread and provide all needed info there.

Thank you for understanding.

Kind Regards

Keen Software House: QA Department

Replies have been locked on this page!