Comments (8)
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.
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.
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.
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.
FYI
from dynamicbatterystorage.
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.
A comprehensive fix was released with CryoTanks 1.3 and DBS 2.0.6
from dynamicbatterystorage.
Thanks a lot for the fix. Much appreciated!
from dynamicbatterystorage.
Related Issues (20)
- InvalidOperationException HOT 2
- Investigate incorrect reported consumption totals. HOT 4
- QoL Change - Celestial Body Increment Button ++ & -- HOT 4
- [Add SSTU support?] [Log spam] Could not load type DynamicBatteryStorage.SSTUResourceBoiloffPowerHandler HOT 1
- Getting Null Ref Exception in VAB on adding antenna HOT 7
- Disable mod with Kerbalism installed HOT 5
- NF System Manager - a consumption item is summed into the Total Power Generation HOT 2
- NF System Manager - Mean Solar Altitude & Body Orbital Height HOT 2
- KopernicusSolarPanel HOT 2
- Support MKS ModuleHeatPump Module
- SSTU solar panels HOT 1
- Power Flow not visible with Kopernicus 1.9.1-1 (CKAN Release) HOT 1
- Ship randomly stops consuming EC and solar planner is broken. HOT 3
- UI Scale HOT 2
- Surface Darkness Time HOT 2
- NF System Manager - Mean Solar Altitude HOT 1
- Minor - medium: Shutting down an engine by pressing X does result in not actualizing of the energy balance display HOT 2
- Exception thrown: DynamicBatteryStorage.ModuleCryoTankPowerHandler.GetFuelTypes ():##### HOT 1
- The mod isn't actually disabling itself when Kerbalism is installed HOT 1
- Add ClickThroughBlocker functionality to the UI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamicbatterystorage.