sirhamsteralot / HaE-PBLimiter

Profiles pb's and damages them when their runtime goes over a set value
MIT License
11 stars 5 forks source link

fatal error after PB pverheat #18

Closed scytero closed 4 years ago

scytero commented 4 years ago

Hi Hamster,

for some weeks i encounter a reoccuring error that leads to a torch crash, when a PB gets grinded down by hand tools:

22:31:12.9992 [INFO]   Chat: Server (to <playerX>): Your PB Small Grid 2995-Programmable block has overheated due to excessive usage!
22:31:13.9989 [INFO]   Chat: Server (to <playerX>): Your PB Small Grid 2995-Programmable block has overheated due to excessive usage!
22:31:14.9985 [INFO]   Chat: Server (to <playerX>): Your PB Small Grid 2995-Programmable block has overheated due to excessive usage!
22:31:15.9991 [INFO]   Chat: Server (to <playerX>): Your PB Small Grid 2995-Programmable block has overheated due to excessive usage!
22:31:15.9991 [INFO]   OwnershipLogger: [Unknown]                                     changed owner on block ProgrammableBlock    from <playerX> [On][FAC]          to Nobody               on grid: Small Grid 2995
22:31:15.9991 [FATAL]  Initializer: System.NullReferenceException: Object reference not set to an instance of an object.
   at Sandbox.Game.Entities.Cube.MySlimBlock.ApplyAccumulatedDamage(Boolean addDirtyParts, Int64 attackerId)
   at Sandbox.Game.Entities.Cube.MySlimBlock.DoDamageInternal(Single damage, MyStringHash damageType, Boolean addDirtyParts, Nullable`1 hitInfo, Int64 attackerId)
   at Sandbox.Game.Entities.Cube.MySlimBlock.DoDamage(Single damage, MyStringHash damageType, Boolean sync, Nullable`1 hitInfo, Int64 attackerId)
   at HaE_PBLimiter.PBTracker.<>c__DisplayClass23_0.<DamagePB>b__0() in D:\Visual Studio\Plugins\HaE PBLimiter\HaE PBLimiter\PBTracker.cs:line 116
   at Sandbox.MySandboxGame.ProcessInvoke()
   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 245
   at Torch.VRageGame.Run() in C:\jenkins\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 125
   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()
System.NullReferenceException: Object reference not set to an instance of an object.
   at Sandbox.Game.Entities.Cube.MySlimBlock.ApplyAccumulatedDamage(Boolean addDirtyParts, Int64 attackerId)
   at Sandbox.Game.Entities.Cube.MySlimBlock.DoDamageInternal(Single damage, MyStringHash damageType, Boolean addDirtyParts, Nullable`1 hitInfo, Int64 attackerId)
   at Sandbox.Game.Entities.Cube.MySlimBlock.DoDamage(Single damage, MyStringHash damageType, Boolean sync, Nullable`1 hitInfo, Int64 attackerId)
   at HaE_PBLimiter.PBTracker.<>c__DisplayClass23_0.<DamagePB>b__0() in D:\Visual Studio\Plugins\HaE PBLimiter\HaE PBLimiter\PBTracker.cs:line 116
   at Sandbox.MySandboxGame.ProcessInvoke()
   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 245
   at Torch.VRageGame.Run() in C:\jenkins\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 125
   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()

Config:

<?xml version="1.0" encoding="utf-8"?>
<ProfilerConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SerializeWrapTicks>60</SerializeWrapTicks>
  <SerializeWrapViolationsMult>0.1</SerializeWrapViolationsMult>
  <SerializeWrapTime>0.15</SerializeWrapTime>
  <SerializeWrapTimeOutTime>300</SerializeWrapTimeOutTime>
  <SerializeWrapSignificance>0.005</SerializeWrapSignificance>
  <SerializeWrapPerPlayer>true</SerializeWrapPerPlayer>
  <SerializeWrapPlayerOverrides />
  <TakeIngameMeasurement>true</TakeIngameMeasurement>
</ProfilerConfig>

I can only guess, that there is some syncing issue between what's happening inagme and what the plugin tries to show in the torch UI, but I may be wrong.

sirhamsteralot commented 4 years ago

Fixed in v1.0.10.5