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

Exception spew in SetCameraIVA & PostBoardCoroutine #355

Closed
JonnyOThan opened this issue Nov 14, 2023 · 2 comments
Closed

Exception spew in SetCameraIVA & PostBoardCoroutine #355

JonnyOThan opened this issue Nov 14, 2023 · 2 comments
Labels
bug Something isn't working C# Requires code

Comments

@JonnyOThan
Copy link
Collaborator

JonnyOThan commented Nov 14, 2023

[EXC 01:44:32.585] NullReferenceException: Object reference not set to an instance of an object
    CameraManager.SetCameraIVA (Kerbal kerbal, System.Boolean resetCamera) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    FreeIva.FreeIva+<PostBoardCoroutine>d__10.MoveNext () (at <3475bb070fd443a49de5f884511dbd48>:0)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <12e76cd50cc64cf19e759e981cb725af>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[LOG 01:44:32.842] [KSP-Recall.StealBackMyFunds] WARNING: Your refunding for kerbolea-reactor-25:FFAFAFC4 was squashed by `IPartCostModifier` and was mangled to prevent losses ( see https://github.com/net-lisias-ksp/KSP-Recall/issues/60 ). Ideal value:694056.422762175420 ; hack used instead:694056.5
[EXC 01:44:38.469] NullReferenceException: Object reference not set to an instance of an object
    CameraManager.SetCameraIVA (Kerbal kerbal, System.Boolean resetCamera) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    KSP.UI.Screens.Flight.KerbalPortrait.ClickIVA () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    UnityEngine.Events.InvokableCall.Invoke () (at <12e76cd50cc64cf19e759e981cb725af>:0)
    UnityEngine.Events.UnityEvent.Invoke () (at <12e76cd50cc64cf19e759e981cb725af>:0)
    UnityEngine.UI.Button.Press () (at <0c883c16262a4198973f823d01e07427>:0)
    UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <0c883c16262a4198973f823d01e07427>:0)
    UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <0c883c16262a4198973f823d01e07427>:0)
    UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <0c883c16262a4198973f823d01e07427>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.EventSystems.EventSystem:Update()
[EXC 01:44:39.527] NullReferenceException: Object reference not set to an instance of an object
    CameraManager.SetCameraIVA (Kerbal kerbal, System.Boolean resetCamera) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    CameraManager.SetCameraIVA () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    CameraManager.NextCameraMode () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    CameraManager.Update () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[EXC 01:44:39.915] NullReferenceException: Object reference not set to an instance of an object
    CameraManager.SetCameraIVA (Kerbal kerbal, System.Boolean resetCamera) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    CameraManager.SetCameraIVA () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    CameraManager.NextCameraMode () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    CameraManager.Update () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[EXC 01:44:40.098] NullReferenceException: Object reference not set to an instance of an object
    CameraManager.SetCameraIVA (Kerbal kerbal, System.Boolean resetCamera) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    CameraManager.SetCameraIVA () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    CameraManager.NextCameraMode () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    CameraManager.Update () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

KSP - 2023-11-14T084904.662.log

This could be related to #354:

[WRN 01:44:32.295] InternalModel error: Part Crew capacity is 10, but 0 seats are defined in internal model
[ERR 01:44:32.295] [FreeIva] Could not find a centrifuge module in INTERNAL 'sspx-expandable-centrifuge-375-2-iva' for PART 'sspx-expandable-centrifuge-375-2'

If there were no seats because the internal model was destroyed, this could probably happen...but it might also happen when boarding a part that has more crew capacity than internal seats. But the PostBoardCoroutine wouldn't have been started if the kerbal didn't have an internal seat assigned. But maybe if the portrait gallery was full, the internal model wouldn't have been created?

@JonnyOThan JonnyOThan added bug Something isn't working C# Requires code labels Nov 14, 2023
@JonnyOThan
Copy link
Collaborator Author

Gonna mark this fixed, but I'm not confident. Will reopen if it pops up again.

@JonnyOThan
Copy link
Collaborator Author

Seems like this was likely caused by #356 - when the internalcamera is destroyed, trying to activate IVA mode will spew these exceptions.

This will still occur if some other bug destroys the internacamera, as in KSP-KOS/KOS#3095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C# Requires code
Projects
None yet
Development

No branches or pull requests

1 participant