Git Product home page Git Product logo

Comments (28)

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024 1

Ok, downloading and giving it a try. Back some what shortly!

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024 1

Cool, the last astrogator version you sent me fixes the problem!

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024 1

D'oh!

https://wiki.kerbalspaceprogram.com/wiki/Harvest

Harvest was an unimplemented planet located 60 degrees trailing Kerbin in the same orbit.

It fails to compute a transfer for that row, because Hohmann transfers to other offsets in the same orbit don't exist! May I ask which planet pack that's from?

I'll include this in a new v0.9.2 soon-ish. I want to see if we can figure out the vanishing maneuver node issue that folks are discussing on the forum thread first. If so, I'll fix both problems in one release, otherwise it'll be this fix by itself.

Harvest is from the Kerbol Origins mod. I'm using it. Did that have something to do with my problems?

Here a link to the FSP Forums for the mod...
https://forum.kerbalspaceprogram.com/index.php?/topic/128447-161kopernicuskerbol-origins-v049-minor-update/

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024 1

LOL, ah. Ok, I was more help than I realized then.

from astrogator.

HebaruSan avatar HebaruSan commented on August 15, 2024

Works for me:

image

Need to know what's different about your system.

EDIT: Another forum user reports the same.

from astrogator.

HebaruSan avatar HebaruSan commented on August 15, 2024

I've tried rebuilding it in case something went wrong with the packaging (since no code changes were made since v0.9.0 in relation to this). Can you please install this to see if it helps?

  • (link removed)

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

Updated Toolbar and Click-Through-Blocker to latest versions, and tried the above version. No luck, I've got to get offline for a few hours, but will check everything again when I get back and let you know.

from astrogator.

HebaruSan avatar HebaruSan commented on August 15, 2024

Are there any exceptions in your KSP.log?

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

Here is a copy of my KSP.log file...

KSP.log

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

At the end of the log there are a ton of exception messages for Astrogator. Have I installed something incorrectly?

from astrogator.

HebaruSan avatar HebaruSan commented on August 15, 2024

Thanks! Yup, there are thousands of these:

[EXC 11:21:26.198] NullReferenceException: Object reference not set to an instance of an object
        Astrogator.TransferView.getYearValue ()
        DialogGUILabel.Update ()
        DialogGUIBase.Update ()
        DialogGUIBase.Update ()
        DialogGUIVerticalLayout.Update ()
        MultiOptionDialog.Update ()
        PopupDialog.SpawnPopupDialog (.MultiOptionDialog dialog, Boolean persistAcrossScenes, .UISkinDef skin, Boolean isModal, System.String titleExtra)
        PopupDialog.SpawnPopupDialog (Vector2 anchorMin, Vector2 anchorMax, .MultiOptionDialog dialog, Boolean persistAcrossScenes, .UISkinDef skin, Boolean isModal, System.String titleExtra)
        Astrogator.AstrogationView.Show ()
        Astrogator.Astrogator.ShowMainWindow ()
        Astrogator.Astrogator.Update ()

That's a pretty tiny function:

public string getYearValue()
{
Refresh();
yearFormatter.Update(timeToWait.years);
return yearFormatter.ToString();
}

... which implies that yearFormatter has to be null.

However, that should be prevented by the fact that it's the first thing we initialize in that class's constructor, and we never overwrite that value:

yearFormatter = new TidyFormatter<int>(
v => showLoadingText || !v.HasValue ? LoadingText
: TimePieceString("astrogator_yearsValue", v.Value, timeToWait.needYears)
);

So auditing Astrogator's code further isn't like to help.

However, right before the first such exception in the log is this:

[ERR 11:21:25.497] Input is null for field 'agent' in config node 'CONTRACT'
   at System.Environment.get_StackTrace()
   at ConfigNode.AddValue(System.String name, System.String value)
   at Contracts.Contract.Save(.ConfigNode node)
   at SSTUTools.RescueContractPartSelector.OnContractOffered(Contracts.Contract contract)
   at EventData`1[[Contracts.Contract, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].Fire(Contracts.Contract data)
   at Contracts.Contract.SetState(State newState)
   at ContractConfigurator.ConfiguredContract.set_ContractState(State value)
   at ContractConfigurator.ContractPreLoader+<GenerateContract>d__33.MoveNext()
   at ContractConfigurator.ContractPreLoader+<ContractEnumerator>d__32.MoveNext()
   at ContractConfigurator.ContractPreLoader.Update()

... which is awfully convenient timing and suggests that ContractConfigurator might be involved. Can you try removing it?

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

Can do! One sec.

Ok, removed it and starting up KSP.

Hopefully if that is the problem, I can get them to correct it. I like using ResearchBodies mod and it requires Contract Configurator.

from astrogator.

HebaruSan avatar HebaruSan commented on August 15, 2024

Actually, I take that back partially; timeToWait being null could also cause that exception and is more plausible since it's set conditionally after construction. The references to that variable probably all need null guards; if you hang on a few minutes I can whip up another testing component to address that...

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

Ok, thanks!

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

KSP is finishing it's reboot and I'll let you know how that works out.

from astrogator.

HebaruSan avatar HebaruSan commented on August 15, 2024

OK, here's a new build with more care taken in the handling of timeToWait:

  • (link removed)

I'm now assuming that ContractConfigurator is not to blame.

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

As soon as KSP finishes booting I'll let you know the result. Downloading new Astrogator.zip.

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

Ok, getting the same results. Here is the recent copy of KSP.log file...

KSP.log

from astrogator.

HebaruSan avatar HebaruSan commented on August 15, 2024

Yup, the same problem needs to be fixed in another spot. Unfortunately I didn't notice that till after you started your download, but the new exception confirms it:

[EXC 15:57:15.143] NullReferenceException: Object reference not set to an instance of an object
        Astrogator.TransferView.getDeltaV ()
        DialogGUILabel.Update ()
        DialogGUIBase.Update ()
        DialogGUIBase.Update ()
        DialogGUIVerticalLayout.Update ()
        MultiOptionDialog.Update ()
        PopupDialog.Update ()

New download: Astrogator.zip

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

So, I should try this new download?

from astrogator.

HebaruSan avatar HebaruSan commented on August 15, 2024

Yes, please!

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

While KSP finishes loading, here are screenshots of the problem in space center screen and main menu screen...

mainmenu_screen
spacecenter_screen

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

Thanks very much for your help! I really love the mod. Will this be a new version on Github? Or will this "fix" be included in a new release later?

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

space_center_with _fix_version

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

Screenshot of Astrogator using your new fix version, the last one you sent me.

from astrogator.

HebaruSan avatar HebaruSan commented on August 15, 2024

D'oh!

https://wiki.kerbalspaceprogram.com/wiki/Harvest

Harvest was an unimplemented planet located 60 degrees trailing Kerbin in the same orbit.

It fails to compute a transfer for that row, because Hohmann transfers to other offsets in the same orbit don't exist! May I ask which planet pack that's from?

I'll include this in a new v0.9.2 soon-ish. I want to see if we can figure out the vanishing maneuver node issue that folks are discussing on the forum thread first. If so, I'll fix both problems in one release, otherwise it'll be this fix by itself.

from astrogator.

GJNelson7030 avatar GJNelson7030 commented on August 15, 2024

KSP.log
Ok, sounds good idea. Thanks very much and glad I could help. Here is a copy of my last KSP.log file, after installing your final fix.

from astrogator.

HebaruSan avatar HebaruSan commented on August 15, 2024

Yes. Stated generously, if you hadn't installed Kerbol Origins, I would not have had the opportunity to fix this bug. :)

from astrogator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.