initERacksActive throws NRE on OnStart when IVA placeholder mode is active (KSP Community Fixes) #54
Labels
No labels
AI Generated
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ksp/NehemiahEngineeringOrbitalScience#54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Environment:
OMS/NEOS 0.10.0
KSP 1.12.5
KSP Community Fixes installed, with IVA handling set to "placeholder" mode
Summary:
With KSPCF's IVA placeholder mode enabled, both MPL_Module and MSL_Module throw a NullReferenceException in initERacksActive() during OnStart. Because the exception aborts OnStart, the labs never finish initializing and the equipment install action is never registered — equipment carriers dock/sit on the same vessel with correct equipment, but no install option ever appears on the lab or carrier.
Root cause:
initERacksActive() guards only on part.internalModel != null. In placeholder IVA mode the internal model object exists (non-null) but lacks the expected mesh hierarchy, so:
Stack trace:
Repro:
Install KSP Community Fixes, set IVA mode to placeholder.
Place an MPL-600 or MSL-1000 on the pad (crewed, with an equipment carrier on the same vessel).
Observe the NRE in KSP.log during flight load; no install action appears on the lab.
Workaround:
Re-enable full IVA loading (disable placeholder mode). Install action returns.
"In placeholder IVA mode the internal model object exists (non-null) but lacks the expected mesh hierarchy, so:"
In this case I suspect that the entire mod will require a significant rewrite, since it relies heavily on the IVA being "correct". When lab equipment and experiments are installed or removed, various IVA components are enabled or disabled, animations started/stopped, etc etc. It's pretty intertwined and embedded.
I'm sorry, but this is going to be pretty low on my priorities list - I can't really be expected to implement workarounds for other mods actively breaking this mod..
That said, thank you for the detailed report; if I do end up with some significant spare time, I will take a look. Alternatively if the fix isn't as complicated and involved as I suspect it will be, I'll happily accept a PR. But if the PR is "big", then I'm sorry, I'll likely be unable to spend the time to perform a detailed review and accept it either.