Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BiomeTracker.OnLoad can sometimes throw an exception, preventing any ScenarioModule after it from being initialized #258

Closed
xEvilReeperx opened this issue Jul 11, 2015 · 9 comments
Labels
Milestone

Comments

@xEvilReeperx
Copy link

I've got a user that reported this one. The stack trace should be informative enough:

[EXC 13:40:46.292] ArgumentException: 'Tekto' is not a valid CelestialBody.
    ContractConfigurator.ConfigNodeUtil.ParseCelestialBodyValue (System.String celestialName)
    ContractConfigurator.ConfigNodeUtil.ParseSingleValue[CelestialBody] (System.String key, System.String stringValue, Boolean allowExpression)
    ContractConfigurator.ConfigNodeUtil.ParseValue[CelestialBody] (.ConfigNode configNode, System.String key, Boolean allowExpression)
    ContractConfigurator.BiomeTracker.OnLoad (.ConfigNode node)
    ScenarioModule.Load (.ConfigNode node)
    ScenarioRunner.AddModule (.ConfigNode node)
    ProtoScenarioModule.Load (.ScenarioRunner host)
    ScenarioRunner+��.MoveNext ()

In this user's case, it prevents ScienceAlertProfileManager (and some of your own -- teehee!) from running due to reasons you already know

ContractConfigurator.ExpressionParser.NumericValueExpressionParser`1[System.Double]: Unable to retrieve value for 'TouristCount' - PersistentDataStore is null.  This is likely caused by another ScenarioModule crashing, preventing others from loading.

User's Post
User's Log

@CosmoBro
Copy link

I've seen the post and the user report that he has removed OPM before of this. So that should be the problem because, Tekto is a OPM planet.

@ghost
Copy link

ghost commented Jul 12, 2015

I got this when using the Base Construction pack and the outer planet mod. Upon reloading the save, without touching either, I got a similar exception and all my contract history was nuked.

@ghost
Copy link

ghost commented Jul 12, 2015

Correction: the tracking center is having a seizure. Seems I have to reinstall now. Sheesh.

@CosmoBro
Copy link

mmm well my Base Construction pack uses a parameter system to support OPM and other planet packs. This look for all the planets, then make a list, after that I put a lot of parameters for orbit using that list (20 planets max). I look only for the celestials bodies that have surface so I dont know why is throwing an exeption.
Also I only test it with OPM and RSS and no problem so far.
Edit: Just think that maybe the OPM load after the contracts and that's why those planets doesn't appear for the contract system on a reload. (I just tested once so never reloaded)

@ghost
Copy link

ghost commented Jul 12, 2015

The tracking center seemed unrelated, in hindsight:

[EXC 19:12:08.793] NullReferenceException: Object reference not set to an instance of an object
    Kopernicus.BarycenterUtils.onPlanetariumTargetChanged (.MapObject map)
    EventData`1[MapObject].Fire (.MapObject data)
    PlanetariumCamera.SetTarget (.MapObject tgt)
    Kopernicus.MapViewFixer.LateUpdate ()

@jrossignol
Copy link
Owner

The tracking center might be related - depends on whether the NRE is due to a bad ScenarioModule. Give me an hour or two and I should be able to get a fix done.

And the way it is supposed to behave is that it should silently remove planets that are invalidated from uninstalling planet packs. At least, that's the theory. 😉

@jrossignol
Copy link
Owner

Okay, @skymarshal, give the pre-release dll here a shot. If the issue is due to the same issue as was reported originally, it should resolve it in your save. If not, then post the entire KSP.log and I'll take a closer look.

@jrossignol
Copy link
Owner

Closing as fixed - will re-open if necessary.

@ghost
Copy link

ghost commented Jul 12, 2015

I'll test it in the morning. Thanks for the quick work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants