Skip to content

NullReferenceException in MyLargeTurretBasePatch #1

@viktor-ferenczi

Description

@viktor-ferenczi

Torch: RELEASE
Torch: Torch Version: v1.3.1.138-master
Torch: Game Version: 1.197.73

00:58:22.7238 [FATAL]  Initializer: System.NullReferenceException: Object reference not set to an instance of an object.
   at Sandbox.Game.Weapons.MyLargeTurretBase.TryFindSavedEntity()
   at Sandbox.Game.Weapons.MyLargeTurretBase.get_PreviousControlledEntity()
   at Sandbox.Game.Weapons.MyLargeTurretBase.get_IsControlled()
   at Sandbox.Game.Weapons.MyLargeTurretBase.get_IsPlayerControlled()
   at PerformanceTweaker.Patch.MyLargeTurretBasePatch.Throttler(MyLargeTurretBase __instance, MyEntityUpdateEnum update, Int32 tick) in C:\Users\Fank\Documents\GitHub\torchapi-performance-tweaker\PerformanceTweaker\Patch\MyLargeTurretBasePatch.cs:line 50
   at Patched_Sandbox.Game.Entities.Cube.MyFunctionalBlockUpdateAfterSimulation10_0(Object )
   at Sandbox.Game.Entities.Blocks.MyTextPanel.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)
   at Torch.VRageGame.DoStart() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 255
   at Torch.VRageGame.Run() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 127
   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.Weapons.MyLargeTurretBase.TryFindSavedEntity()
   at Sandbox.Game.Weapons.MyLargeTurretBase.get_PreviousControlledEntity()
   at Sandbox.Game.Weapons.MyLargeTurretBase.get_IsControlled()
   at Sandbox.Game.Weapons.MyLargeTurretBase.get_IsPlayerControlled()
   at PerformanceTweaker.Patch.MyLargeTurretBasePatch.Throttler(MyLargeTurretBase __instance, MyEntityUpdateEnum update, Int32 tick) in C:\Users\Fank\Documents\GitHub\torchapi-performance-tweaker\PerformanceTweaker\Patch\MyLargeTurretBasePatch.cs:line 50
   at Patched_Sandbox.Game.Entities.Cube.MyFunctionalBlockUpdateAfterSimulation10_0(Object )
   at Sandbox.Game.Entities.Blocks.MyTextPanel.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)
   at Torch.VRageGame.DoStart() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 255
   at Torch.VRageGame.Run() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 127
   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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions