SSTU - Shadow Space Technologies Unlimited

SSTU - Shadow Space Technologies Unlimited

98.5k Downloads

ModularPart with zero volume causes NRE

shadowmage45 opened this issue ยท 1 comments

commented

ST-HAB-A1 with default configuration causes the following exceptions in the log when the 'configure containers' button is pressed:

[EXC 11:28:16.391] NullReferenceException: Object reference not set to an instance of an object
	SSTUTools.VolumeContainerGUI.updateGuiData ()
	SSTUTools.SSTUVolumeContainer.OnGUI ()

Switching even one of the end-caps to something else with volume, and the error does not occur. Switching back to the zero-volume endcap after the GUI is open does not cause an error, so the run-time bits of the system have no problem with zero volume, only the setup/initialization routines have issues.

Likely cause is that the container data is not being constructed, as it has zero volume, and thus nothing is presented to the GUI to display/manipulate.

As there is no (easy/simple/robust) way to disable the GUI opening button in the stock PAW, the robable solution is to instantiate UI-side containers even for zero-volume setups.

commented

Fixed in dev -- window will properly refuse to open if no containers are available.

Investigating alternate fix to display a blank/empty window, or at least pop an error message regarding no available containers.