ThrottleControlledAvionics icon indicating copy to clipboard operation
ThrottleControlledAvionics copied to clipboard

NullReferenceException

Open No3371 opened this issue 9 years ago • 6 comments

Was checking outputs.log and found these logs keep appearing, I copied a small part of the file, hope these help.

NullReferenceException at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_rotation (UnityEngine.Quaternion&) at UnityEngine.Transform.get_rotation () [0x00000] in :0 at UnityEngine.Transform.get_up () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentMaxThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.AttitudeControl.compute_steering () [0x00000] in :0 at ThrottleControlledAvionics.AttitudeControl.OnAutopilotUpdate (.FlightCtrlState s) [0x00000] in :0 at ThrottleControlledAvionics.AutopilotModule.UpdateCtrlState (.FlightCtrlState s) [0x00000] in :0 at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at Vessel.FeedInputFeed () [0x00000] in :0 at FlightInputHandler.FixedUpdate () [0x00000] in :0

(Filename: Line: -1)

NullReferenceException at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_rotation (UnityEngine.Quaternion&) at UnityEngine.Transform.get_rotation () [0x00000] in :0 at UnityEngine.Transform.get_up () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentMaxThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.TorqueProps.Update () [0x00000] in :0 at ThrottleControlledAvionics.VesselWrapper.UpdateCommons () [0x00000] in :0 at ThrottleControlledAvionics.ModuleTCA.FixedUpdate () [0x00000] in :0

(Filename: Line: -1)

NullReferenceException at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_rotation (UnityEngine.Quaternion&) at UnityEngine.Transform.get_rotation () [0x00000] in :0 at UnityEngine.Transform.get_up () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentMaxThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.AttitudeControl.compute_steering () [0x00000] in :0 at ThrottleControlledAvionics.AttitudeControl.OnAutopilotUpdate (.FlightCtrlState s) [0x00000] in :0 at ThrottleControlledAvionics.AutopilotModule.UpdateCtrlState (.FlightCtrlState s) [0x00000] in :0 at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at Vessel.FeedInputFeed () [0x00000] in :0 at FlightInputHandler.FixedUpdate () [0x00000] in :0

(Filename: Line: -1)

NullReferenceException at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_rotation (UnityEngine.Quaternion&) at UnityEngine.Transform.get_rotation () [0x00000] in :0 at UnityEngine.Transform.get_up () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentMaxThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.TorqueProps.Update () [0x00000] in :0 at ThrottleControlledAvionics.VesselWrapper.UpdateCommons () [0x00000] in :0 at ThrottleControlledAvionics.ModuleTCA.FixedUpdate () [0x00000] in :0

(Filename: Line: -1)

NullReferenceException at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_rotation (UnityEngine.Quaternion&) at UnityEngine.Transform.get_rotation () [0x00000] in :0 at UnityEngine.Transform.get_up () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentMaxThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.AttitudeControl.compute_steering () [0x00000] in :0 at ThrottleControlledAvionics.AttitudeControl.OnAutopilotUpdate (.FlightCtrlState s) [0x00000] in :0 at ThrottleControlledAvionics.AutopilotModule.UpdateCtrlState (.FlightCtrlState s) [0x00000] in :0 at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at Vessel.FeedInputFeed () [0x00000] in :0 at FlightInputHandler.FixedUpdate () [0x00000] in :0

(Filename: Line: -1)

NullReferenceException at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_rotation (UnityEngine.Quaternion&) at UnityEngine.Transform.get_rotation () [0x00000] in :0 at UnityEngine.Transform.get_up () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentMaxThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.TorqueProps.Update () [0x00000] in :0 at ThrottleControlledAvionics.VesselWrapper.UpdateCommons () [0x00000] in :0 at ThrottleControlledAvionics.ModuleTCA.FixedUpdate () [0x00000] in :0

(Filename: Line: -1)

NullReferenceException at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_rotation (UnityEngine.Quaternion&) at UnityEngine.Transform.get_rotation () [0x00000] in :0 at UnityEngine.Transform.get_up () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentMaxThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.AttitudeControl.compute_steering () [0x00000] in :0 at ThrottleControlledAvionics.AttitudeControl.OnAutopilotUpdate (.FlightCtrlState s) [0x00000] in :0 at ThrottleControlledAvionics.AutopilotModule.UpdateCtrlState (.FlightCtrlState s) [0x00000] in :0 at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at (wrapper delegate-invoke) FlightInputCallback:invoke_void__this___FlightCtrlState (FlightCtrlState) at Vessel.FeedInputFeed () [0x00000] in :0 at FlightInputHandler.FixedUpdate () [0x00000] in :0

(Filename: Line: -1)

NullReferenceException at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_rotation (UnityEngine.Quaternion&) at UnityEngine.Transform.get_rotation () [0x00000] in :0 at UnityEngine.Transform.get_up () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentMaxThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.EnginesProps.get_CurrentThrustDir () [0x00000] in :0 at ThrottleControlledAvionics.TorqueProps.Update () [0x00000] in :0 at ThrottleControlledAvionics.VesselWrapper.UpdateCommons () [0x00000] in :0 at ThrottleControlledAvionics.ModuleTCA.FixedUpdate () [0x00000] in :0

(Filename: Line: -1)

No3371 avatar Oct 21 '16 14:10 No3371

Thanks for the report. But this is strange... all of these exceptions occur inside the UnityEngine, not inside TCA, while getting transform properties. Which points to some troubles with the transform itself.

Could you describe what happens in the game when these logs appear? Maybe some vessels crashed or were otherwise destroyed?

allista avatar Oct 21 '16 15:10 allista

Well let me try to recall that... there's no apparent bug or crash, I was just checking the log to see if there's any mod causing stutter.

Damn man, I suddenly realized that you created so many useful mod... I start to feel like I'm harassing you with all these issues... lol

No3371 avatar Oct 26 '16 04:10 No3371

Please, don't! You help the development with these reports.

allista avatar Oct 26 '16 07:10 allista

Hello allista. I have been observing NRE generated by TCA for a while now ... Like No3371 I tend to now report them to mod developers. But that last reply of yours made me change my mind.

Ok, so report 1:

[EXC 22:14:31.815] ArgumentOutOfRangeException: Argument is out of range. Parameter name: startIndex System.String.Substring (Int32 startIndex) ThrottleControlledAvionics.ModuleTCA.SetGID (System.String gid) ThrottleControlledAvionics.TCAGuiEditor.<UpdateCFG>b__42_0 (ThrottleControlledAvionics.ModuleTCA m) System.Collections.Generic.List1[ThrottleControlledAvionics.ModuleTCA].ForEach (System.Action1 action) ThrottleControlledAvionics.TCAGuiEditor.UpdateCFG (System.Collections.Generic.List`1 TCA_Modules) ThrottleControlledAvionics.TCAGuiEditor.GetCFG () ThrottleControlledAvionics.TCAGuiEditor.Update ()

This one gets generated when placing the Probodobodyne Stayputnik core in a brand new career game with no tech nodes unlocked at all. It spams several times per second.

Full log here: Full log on Mediafire

Galenmacil avatar Jun 10 '19 02:06 Galenmacil

Report 2: [EXC 22:26:03.456] ArgumentOutOfRangeException: Argument is out of range. Parameter name: startIndex System.String.Substring (Int32 startIndex) ThrottleControlledAvionics.ModuleTCA.SetGID (System.String gid) ThrottleControlledAvionics.TCAGuiEditor.<UpdateCFG>b__42_0 (ThrottleControlledAvionics.ModuleTCA m) System.Collections.Generic.List1[ThrottleControlledAvionics.ModuleTCA].ForEach (System.Action1 action) ThrottleControlledAvionics.TCAGuiEditor.UpdateCFG (System.Collections.Generic.List`1 TCA_Modules) ThrottleControlledAvionics.TCAGuiEditor.UpdateCFG () ThrottleControlledAvionics.TCAGuiEditor.Update ()

This one gets generated when placing any command pods in Career mode with several but not all TCA tech upgrade unlocked. It happens only if a command pod is placed first, with nothing else. It does not happen if you place something other than a pod first, like a tank... Unlike the first one, it does not spam the log.

Full log here: Full log on Mediafire

Galenmacil avatar Jun 10 '19 02:06 Galenmacil

@Galenmacil thanks for the report!

I've created a separate issue #67 for this.

allista avatar Jun 10 '19 07:06 allista