KSP-RO / TacLifeSupport

Life Support from Thunder Aerospace Corporation
Other
43 stars 24 forks source link

Resources not being consumed when some vessels disappear #104

Closed gjulianm closed 4 years ago

gjulianm commented 6 years ago

This is a weird bug report but I spent some time trying to see why TAC LS wasn't working and maybe it helps you.

I installed TAC LS from CKAN, and it wasn't working. It recognized vessels and they appeared on the roster, but resources were not being consumed nor updated in the roster window. I didn't restart KSP straight away, instead I kept playing a little bit. When I restarted, I searched the log and saw an error saying that it could not load the BackgroundResources.dll file:

[WRN 10:19:45.575] ADDON BINDER: Ingoring binding redirect due to incompatible versions: BackgroundResources, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null => BackgroundResources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[EXC 10:19:45.583] FileNotFoundException: Could not load file or assembly 'BackgroundResources, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

It was weird because by looking in the properties of that DLL file it said that the version was 1.3.0.0. Anyways, I downloaded the DLL file from this repository and the error disappeared, but it still was not working and I didn't see anything on the log. I downloaded the latest version from the releases (v0.13.7Dev) and it still was not working but the following appeared on the log:

[EXC 11:42:22.531] NullReferenceException: Object reference not set to an instance of an object
    Tac.LifeSupportController.updateVslCrewCurrentTime (.Vessel vessel, KeyValuePair`2 entry, Double currentTime, Boolean PreLaunch)
    Tac.LifeSupportController.recoveryVesselFixedProcessing (KeyValuePair`2 vessel, Double currentTime)
    Tac.LifeSupportController.FixedUpdate ()

Looking at the roster, there were a lot of vessels and kerbals on EVA that weren't actually there (recovered/destroyed) so I went to the savefile, removed the 'LifeSupport' scenario and reloaded. Now it is working and resources are being consumed.

I would have liked to send a pull request with the fix but I couldn't manage to compile correctly the DLL, so I am just sending the issue if it helps. I am also attaching both logfiles with the errors I saw.

Thank you very much for your work on this addon :D

KSP_nofileassembly.txt KSP_nullref.txt

JPLRepo commented 6 years ago

Installed via CKAN. So... I don't know what is installed or not. My guess is you were using an old/invalid version and combination of mods. Has this occurred subsequent to using the dll from the download links directly? Otherwise I'm going to put it down to a CKAN issue and bad install.