KSP-RO/ContractConfigurator

Couple of NullPointerExceptions

morphelianus opened this issue · 4 comments

Hi, after installing some additional contracts, e.g. Kerbal Academy Contract Pack, I repeatedly get NullPointerExceptions. This is just one example. More details can be provided if needed.

Exception occured while attempt to generate contract of type 'ProgressionorbitContracts.ProgressionorbitJNSQRiga':
System.NullReferenceException: Object reference not set to an instance of an object
at ContractConfigurator.Parameters.ReachState+<>c.b__85_0 (CelestialBody cb) [0x00000] in :0
at ContractConfigurator.LocalizationUtil._LocalizeList[T] (ContractConfigurator.LocalizationUtil+Conjunction conjunction, System.Collections.Generic.IEnumerable1[T] values, System.Func2[T,TResult] strFunc) [0x0001c] in :0
at ContractConfigurator.LocalizationUtil.LocalizeList[T] (ContractConfigurator.LocalizationUtil+Conjunction conjunction, System.Collections.Generic.IEnumerable1[T] values, System.Func2[T,TResult] strFunc) [0x00005] in :0
at ContractConfigurator.Parameters.ReachState.BodyList () [0x00007] in :0
at ContractConfigurator.Parameters.ReachState.CreateDelegates () [0x0001f] in :0
at ContractConfigurator.Parameters.ReachState..ctor (System.Collections.Generic.List1[T] targetBodies, System.String biome, System.Collections.Generic.List1[T] situation, System.Single minAltitude, System.Single maxAltitude, System.Single minTerrainAltitude, System.Single maxTerrainAltitude, System.Double minSpeed, System.Double maxSpeed, System.Double minRateOfClimb, System.Double maxRateOfClimb, System.Single minAcceleration, System.Single maxAcceleration, System.Double minDeltaVeeActual, System.Double maxDeltaVeeActual, System.Double minDeltaVeeVacuum, System.Double maxDeltaVeeVacuum, System.String title) [0x0008d] in :0
at ContractConfigurator.ReachStateFactory.Generate (Contracts.Contract contract) [0x00000] in :0
at ContractConfigurator.ParameterFactory.Generate (ContractConfigurator.ConfiguredContract contract, Contracts.IContractParameterHost contractParamHost) [0x00016] in :0
at ContractConfigurator.ParameterFactory.GenerateParameters (ContractConfigurator.ConfiguredContract contract, Contracts.IContractParameterHost contractParamHost, System.Collections.Generic.List`1[T] paramFactories) [0x0007e] in :0
at ContractConfigurator.ContractType.GenerateParameters (ContractConfigurator.ConfiguredContract contract) [0x00000] in :0
at ContractConfigurator.ConfiguredContract.Initialize (ContractConfigurator.ContractType contractType) [0x00221] in :0

Just another one example.

Exception occured while attempt to generate contract of type 'ProgressionorbitContracts.ProgressionorbitJNSQEdna':
System.NullReferenceException: Object reference not set to an instance of an object
at ContractConfigurator.Parameters.ReachState+<>c.b__85_0 (CelestialBody cb) [0x00000] in :0
at ContractConfigurator.LocalizationUtil._LocalizeList[T] (ContractConfigurator.LocalizationUtil+Conjunction conjunction, System.Collections.Generic.IEnumerable1[T] values, System.Func2[T,TResult] strFunc) [0x0001c] in :0
at ContractConfigurator.LocalizationUtil.LocalizeList[T] (ContractConfigurator.LocalizationUtil+Conjunction conjunction, System.Collections.Generic.IEnumerable1[T] values, System.Func2[T,TResult] strFunc) [0x00005] in :0
at ContractConfigurator.Parameters.ReachState.BodyList () [0x00007] in :0
at ContractConfigurator.Parameters.ReachState.CreateDelegates () [0x0001f] in :0
at ContractConfigurator.Parameters.ReachState..ctor (System.Collections.Generic.List1[T] targetBodies, System.String biome, System.Collections.Generic.List1[T] situation, System.Single minAltitude, System.Single maxAltitude, System.Single minTerrainAltitude, System.Single maxTerrainAltitude, System.Double minSpeed, System.Double maxSpeed, System.Double minRateOfClimb, System.Double maxRateOfClimb, System.Single minAcceleration, System.Single maxAcceleration, System.Double minDeltaVeeActual, System.Double maxDeltaVeeActual, System.Double minDeltaVeeVacuum, System.Double maxDeltaVeeVacuum, System.String title) [0x0008d] in :0
at ContractConfigurator.ReachStateFactory.Generate (Contracts.Contract contract) [0x00000] in :0
at ContractConfigurator.ParameterFactory.Generate (ContractConfigurator.ConfiguredContract contract, Contracts.IContractParameterHost contractParamHost) [0x00016] in :0
at ContractConfigurator.ParameterFactory.GenerateParameters (ContractConfigurator.ConfiguredContract contract, Contracts.IContractParameterHost contractParamHost, System.Collections.Generic.List`1[T] paramFactories) [0x0007e] in :0
at ContractConfigurator.ContractType.GenerateParameters (ContractConfigurator.ConfiguredContract contract) [0x00000] in :0
at ContractConfigurator.ConfiguredContract.Initialize (ContractConfigurator.ContractType contractType) [0x00221] in :0

It seems that I found the mod causing the issue: ANGLECAN Achievement Tree 1.1
I usually install and remove mods with ckan and after the removal of the mentioned mod the NullPointerExceptions disappeared.

Then the fix would have to be on the side of "ANGLECAN Achievement Tree 1.1"

That's okay. It's just because the exception handler told me to create an issue either here or in the mod repository.