Skip to content

Clean up parses to make them more safe#114

Open
Clayell wants to merge 2 commits intopost-kerbin-mining-corporation:masterfrom
Clayell:master
Open

Clean up parses to make them more safe#114
Clayell wants to merge 2 commits intopost-kerbin-mining-corporation:masterfrom
Clayell:master

Conversation

@Clayell
Copy link

@Clayell Clayell commented Sep 27, 2025

User Xenon recently reported on the KSP-RO server that their log was being spammed with NREs. This is the result of some unsafe ToString() calls to fields that might not exist. (specifically the one for KopernicusSolarPanelPowerHandler, but I noticed the same mistakes in other classes)

I've cleaned up the Utils TryGetField methods a bit, and made some other spots use TryGetField instead of doing their own thing

@Clayell
Copy link
Author

Clayell commented Sep 27, 2025

Their underlying problem of the currentOutput module is probably caused by the fact that they were running RO without Kerbalism. RO will nuke DBS if installed, but DBS will only disable itself if Kerbalism is installed. I'll make a PR to also make DBS disable itself if RO is detected.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant