dprostock reported that ore drills do not work if Custom Asteroids is installed. Attempts to reproduce led to the discovery that the drilling code (and only the drilling code) crashes if the asteroid has a ModuleAsteroidResource block with unknown resources.
To Reproduce
Steps to reproduce the behavior:
Start a sandbox game of KSP
Run time forward until asteroids spawn
Create a ship equipped with an Advanced Grabbing Unit, a stock ore drill, and an ore storage tank
Launch the ship, press Alt+F12, select "Cheats/Set Orbit" from the menu, and select a rendezvous with an asteroid
Dock with the asteroid, deploy the drill, and tell it to start harvesting.
The drill runs, but no ore is mined, nor does the drill heat up. The log is filled with messages like:
[ERR 14:06:12.749] [RESOURCES] - Error in - BaseConverter_GetDeltaTime - System.NullReferenceException: Object reference not set to an instance of an object
at ModuleAsteroidDrill.PrepareRecipe (System.Double deltaTime) [0x0038d] in <55ba45dc3a43403382024deac8dcd0be>:0
at BaseConverter.GetBestDeltaTime (System.Double deltaTime) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0
at BaseConverter.GetDeltaTime () [0x000d5] in <55ba45dc3a43403382024deac8dcd0be>:0
Background Info
Operating System: Windows
KSP Version 1.9.1
Custom Asteroids Version: dev build built against 1.9.1
Community Resource Pack must not be installed -- installing it and reloading the save game described above fixes the problem.
Description
dprostock reported that ore drills do not work if Custom Asteroids is installed. Attempts to reproduce led to the discovery that the drilling code (and only the drilling code) crashes if the asteroid has a
ModuleAsteroidResource
block with unknown resources.To Reproduce Steps to reproduce the behavior:
The drill runs, but no ore is mined, nor does the drill heat up. The log is filled with messages like:
Background Info