Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KSPAdjustableLandingGear throws when clicking ToggleGear KSPEvent #46

Closed
ferram4 opened this issue Aug 20, 2017 · 4 comments
Closed

KSPAdjustableLandingGear throws when clicking ToggleGear KSPEvent #46

ferram4 opened this issue Aug 20, 2017 · 4 comments

Comments

@ferram4
Copy link

ferram4 commented Aug 20, 2017

Happens in the editor, resulting in the following stack trace:

NullReferenceException: Object reference not set to an instance of an object
at KSPWheel.KSPWheelAdjustableGear.onStateChanged (KSPWheelState oldState, KSPWheelState newState) [0x00000] in :0
at KSPWheel.KSPWheelBase.changeWheelState (KSPWheelState newState, KSPWheel.KSPWheelSubmodule module, Boolean selfCallback) [0x00000] in :0
at KSPWheel.KSPWheelSubmodule.changeWheelState (KSPWheelState newState, Boolean selfCallback) [0x00000] in :0
at KSPWheel.KSPWheelAdjustableGear.b__54_0 (KSPWheel.KSPWheelAdjustableGear m) [0x00000] in :0
at KSPWheel.Utils.symmetryUpdate[KSPWheelAdjustableGear] (KSPWheel.KSPWheelAdjustableGear t, System.Action1 act) [0x00000] in <filename unknown>:0 at KSPWheel.KSPWheelAdjustableGear.deploy () [0x00000] in <filename unknown>:0 at BaseEvent.Invoke () [0x00000] in <filename unknown>:0 at UIPartActionButton.OnClick () [0x00000] in <filename unknown>:0 at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <filename unknown>:0 at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0 at UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0 at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <filename unknown>:0 at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0 at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <filename unknown>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction1 functor) [0x00000] in :0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()

The resulting exception seems to prevent the FAR revoxelization event from being sent. The gear does animate as expected though. This is reproducible with a minimum of Kerbal Foundries and FAR installed, but I don't believe that FAR is actually necessary for the exception to happen.

@shadowmage45
Copy link
Owner

Thanks for the report, will investigate when next I have time.

Surprised this one hasn't been reported before with the popularity of the ALG parts.

Stack trace doesn't seem to have anything FAR related, so seems likely that it is a problem that would exist in stock. Will let you know if I can't repro for some reason.

@shadowmage45
Copy link
Owner

Should be fixed in dev branch using the updated .dll : https://github.com/shadowmage45/KSPWheel/raw/dev/GameData/KSPWheel/Plugin/KSPWheel.dll
If you (or anyone else) have time to give it a test, please let me know how it turns out.

@ferram4
Copy link
Author

ferram4 commented Aug 21, 2017

Well, it doesn't throw, but it also looks like no revoxelization events being sent to FAR is a separate and unrelated bug. I'll throw an issue together for that one.

@shadowmage45
Copy link
Owner

Ahh, yep, makes sense. Should be able to add in the re-voxelization function call easily enough.

Thanks for taking the time to test it out. Will work on fixing the voxelization bits shortly, should be available in the dev branch a bit later this afternoon. Will update the relevant issue ticket with details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants