Code Monkey home page Code Monkey logo

Comments (8)

ChrisAdderley avatar ChrisAdderley commented on August 14, 2024 1

Aw thanks! Just part of the job...

Anyways I'll keep this ticket open (with the new title) so I remember to harden that interface's error checking next time I have some time.
Info for future Chris:

  • ModuleCryoTankHander uses a messy method to detect cryo fuel types on a target
  • Improve this method if possible
  • Alternately, harden this method to catch errors better (needs change to CT as well)

from dynamicbatterystorage.

ChrisAdderley avatar ChrisAdderley commented on August 14, 2024

I can add some more error handing around it, but it looks like the most likely culprit is a broken config block in a part somewhere. The three conditions you describe are:

  • No element satisfies the condition in predicate. -> broken config for a boiloff fuel type
  • More than one element satisfies the condition in predicate -> Two identical boiloff fuel types specified
  • The source sequence is empty.. -> No boiloff fuel types specified

All of these will actually break CryoTanks but more silently.

I can't immediately reproduce this with a standard install of KSP + CryoTanks and DBS together.

Can you get me a log of the incident with the DebugMode of this mod activated, and a description of the circumstances that this occurs in? If it is a broken config I need to determine what part it is.

from dynamicbatterystorage.

neitsa avatar neitsa commented on August 14, 2024

Thank you very much for your prompt response!

I changed the following line in DynamicBatteryStorageSettings.cfg (I didn't change anything else in the config):

DYNAMICBATTERYSTORAGE
{
  // Log extensive debug messages
  DebugMode = true

And then started the game; basically, once in the "KSC view" I switched to the tracking station and picked a vessel randomly, see log line 58297 ([FLIGHT GLOBALS]: Switching To Vessel Sat-Mun-Biome-Scan). The first InvalidOperationException is logged at line 58468.

Please tell me if you need anything else.

409KB (~ 13MB uncompressed): KSP.zip

PS: I just wanted to say that I'm pretty sure it's not a problem in your mod, although I'd like to found the culprit. Thanks a lot for your help and thanks a lot for your amazing mods!

from dynamicbatterystorage.

ChrisAdderley avatar ChrisAdderley commented on August 14, 2024

No problem. Even if it's not mine with a mod like this I have to at least look into it!

Something is definitely breaking CryoTanks, which is cascading through DBS.

I found a similar CT initialization error here:

[LOG 07:38:43.362] fuelTank.long
[ERR 07:38:43.365] Module ModuleCryoTank threw during OnStart: System.InvalidOperationException: Operation is not valid due to the current state of the object
  at System.Linq.Enumerable.Single[ConfigNode] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.Single[ConfigNode] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0 
  at SimpleBoiloff.ModuleCryoTank.OnStart (StartState state) [0x00000] in <filename unknown>:0 
  at Part.ModulesOnStart () [0x00000] in <filename unknown>:0 

I'm pretty sure it's KSPI-E. Specifically, this file. Multiple BOILOFFCONFIGS should be inside a single module block instead of having multiple modules defined. This will probably break that Single call.

I could fix this by switching to a FirstOrDefault Linq item or something similar, and probably will, but the fact remains that this way of specifying the configs will give unpredictable results in the game, so I'll contact FreeThinker and hopefully they can resolve the patch for the next version of KSPIE.

from dynamicbatterystorage.

ChrisAdderley avatar ChrisAdderley commented on August 14, 2024

https://forum.kerbalspaceprogram.com/index.php?/topic/161531-173161151145131-ksp-interstellar-extended-1225-continued-development-thread/&do=findComment&comment=3650031

FYI

from dynamicbatterystorage.

neitsa avatar neitsa commented on August 14, 2024

Damn, you're incredible.

Not only you took time to look at this in details but found the problem and then reported it.

I know, by experience, that taking care of the various conflicts that arise on heavily modded installation of KSP takes time and, well, everyone deserves to have a life outside of KSP-related stuff.

I was thinking about doing a PR to KSPI-E but it seems that I don't have anything to do now :)

I just want to say a big thank you for the time you put on this problem and the time you take to build, improve and maintain your mods!

from dynamicbatterystorage.

ChrisAdderley avatar ChrisAdderley commented on August 14, 2024

A comprehensive fix was released with CryoTanks 1.3 and DBS 2.0.6

from dynamicbatterystorage.

neitsa avatar neitsa commented on August 14, 2024

Thanks a lot for the fix. Much appreciated!

from dynamicbatterystorage.

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.