KSP-ModularManagement / KSPe

Extensions and utilities for Kerbal Space Program
http://ksp.lisias.net/add-ons/KSPAPIExtensions
Other
11 stars 6 forks source link

Suspicion: "your stuff" triggers issues on RT / Kerbalism (cannot prove it) #1

Closed Gordon-Dry closed 5 years ago

Gordon-Dry commented 5 years ago

Actually I have issues with RemoteTech and Kerbalism, that no one else got (on Kerbalism Discord).

(I don't want to blindly fire at you but I want to find the culprit.)

This happened after switching from "old variants" to "lisias variants" for the following: KSPAPIExtensions (now 2.1.0.4) KerbalJointReinforcement (now 3.4.0.3)

For some days now I have at least this issue: Unloaded vessels no more have Kerbalism automation simulation.

This is spammed to the log for those vessels:

ArgumentNullException: Argument cannot be null.
Parameter name: key
  at System.Collections.Generic.Dictionary`2[System.String,KERBALISM.Lib+Module_prefab_data].TryGetValue (System.String key, KERBALISM.Module_prefab_data& value) [0x00000] in <filename unknown>:0 
  at KERBALISM.Lib.ModulePrefab (System.Collections.Generic.List`1 module_prefabs, System.String module_name, System.Collections.Generic.Dictionary`2 PD) [0x00000] in <filename unknown>:0 
  at KERBALISM.Computer.Boot (.Vessel v) [0x00000] in <filename unknown>:0 
  at KERBALISM.Computer.Automate (.Vessel v, KERBALISM.Vessel_info vi, KERBALISM.Vessel_resources resources) [0x00000] in <filename unknown>:0 
  at KERBALISM.Kerbalism.FixedUpdate () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

Last session I had an even heavier issue. A vessel splashed down on Kerbin Ocean, I clicked on "Recover vessel", the game didn't respond for 2 minutes, I force quit it. This was spammed to the log:

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[RemoteTech.ISignalProcessor].get_Item (Int32 index) [0x00000] in <filename unknown>:0 
  at RemoteTech.VesselSatellite.get_SignalProcessor () [0x00000] in <filename unknown>:0 
  at RemoteTech.VesselSatellite.get_Guid () [0x00000] in <filename unknown>:0 
  at RemoteTech.API.API+<>c.<GetClosestDirectGroundStation>b__10_1 (RemoteTech.SimpleTypes.NetworkRoute`1 r) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[RemoteTech.SimpleTypes.NetworkRoute`1[RemoteTech.ISatellite]].MoveNext () [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.IterateNullable[NetworkRoute`1] (IEnumerable`1 source, System.Func`3 selector) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.Min[NetworkRoute`1] (IEnumerable`1 source) [0x00000] in <filename unknown>:0 
  at RemoteTech.API.API.GetClosestDirectGroundStation (Guid id) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at KERBALISM.RemoteTech.NameTargetsKSC (Guid id) [0x00000] in <filename unknown>:0 
  at KERBALISM.ConnectionInfo..ctor (.Vessel v, Boolean powered, Boolean storm) [0x00000] in <filename unknown>:0 
  at KERBALISM.Vessel_info..ctor (.Vessel v, UInt32 vessel_id, UInt64 inc) [0x00000] in <filename unknown>:0 
  at KERBALISM.Cache.VesselInfo (.Vessel v) [0x00000] in <filename unknown>:0 
  at KERBALISM.Kerbalism.FixedUpdate () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

Full log and stuff: https://www.dropbox.com/s/yenv31lby9u4j0v/2018-12-07_1%20KSP.log%20and%20stuff.7z?dl=1

Gordon-Dry commented 5 years ago

btw the Kerbalism Discord is: https://discord.gg/74vqNj

Lisias commented 5 years ago

KSPe has a "feature": it is unforgiven for missing DLLs, as it run the whole DLL's dependency tree regularly. If anything, absolutely anything is missing, it borks with a Reflection Error before start up.

I use this as a miner's canary.

Well, you have a System.Reflection problem, and you have KSPe installed, so it's reasonable you report it here, since I'm spamming this miner's canary to the seven seas.

But this time, I don't see KSPe in the stack trace - KSPe doesn't changes anything, it reads everything all the time (it's why it borks when something is wrong).

I will analyse the log in the next hours.

p.s.: log replicated here for convenience: 2018-12-07_1 KSP.log and stuff.zip

Lisias commented 5 years ago

I saw some "interesting" bits on the log:

[LOG 22:03:15.267] [Kerbalism]  -> verbose: Loader.Init - version 2.0.1.0
[LOG 22:03:15.274] [Kerbalism]  -> verbose: Profile.Parse - using profile: default
[ERR 22:03:15.278] Resource System Error: Requested resource (id: -982210431) does not exist

[ERR 22:03:15.278] Resource System Error: Requested resource (id: -891989580) does not exist

[LOG 22:03:16.068] [Kerbalism]  -> verbose: Profile.ParseSupport - importing Kerbalism Support profile for mod: CryoTanks
[LOG 22:03:16.894] [Kerbalism]  -> verbose: Profile.ParseSupport - importing Kerbalism Support profile for mod: Near Future Electrical

I don't see how KSPe would be influencing this time. KerbalEngineer is something else that also plays Introspection, as it appears, and everything appears to work fine until now

[WRN 22:43:55.448] [Kopernicus] Add 64 colliders
[LOG 22:43:55.552] KerbalEngineer -> Assembly: Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Assembly: KSPe, Version=2.1.0.4, Culture=neutral, PublicKeyToken=null
Assembly: Hyperspace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Assembly: KSPModFileLocalizer, Version=0.2.3.2, Culture=neutral, PublicKeyToken=null
Assembly: ModuleManager, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null
Assembly: ClickThroughBlocker, Version=0.1.6.9, Culture=neutral, PublicKeyToken=null
Assembly: FilterExtensions, Version=3.2.2.13, Culture=neutral, PublicKeyToken=null
Assembly: KSPAPIExtensions, Version=2.1.0.4, Culture=neutral, PublicKeyToken=null
Assembly: BlendshapeModelLoader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Assembly: TexturesUnlimited, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Assembly: aaa_Toolbar, Version=1.7.17.14, Culture=neutral, PublicKeyToken=null
Assembly: USITools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Assembly: ToolbarControl, Version=0.1.6.19, Culture=neutral, PublicKeyToken=null
Assembly: ABCORS, Version=0.5.0.3, Culture=neutral, PublicKeyToken=null
Assembly: AllYAll, Version=0.11.16.2, Culture=neutral, PublicKeyToken=null
Assembly: AnimatedDecouplers, Version=1.4.1.15768, Culture=neutral, PublicKeyToken=null
Assembly: Astrogator, Version=0.8.1.0, Culture=neutral, PublicKeyToken=null
Assembly: B9PartSwitch, Version=2.5.1.0, Culture=neutral, PublicKeyToken=null
Assembly: BDAnimationModules, Version=0.6.5.5, Culture=neutral, PublicKeyToken=null
Assembly: RNModules, Version=1.1.5.8, Culture=neutral, PublicKeyToken=null
Assembly: BAM, Version=1.3.2.4, Culture=neutral, PublicKeyToken=null
Assembly: BasicDeltaV, Version=1.0.4.0, Culture=neutral, PublicKeyToken=null
Assembly: BasicDeltaV.Unity, Version=1.0.4.0, Culture=neutral, PublicKeyToken=null
Assembly: BetterBurnTime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Assembly: BDB, Version=1.4.4.0, Culture=neutral, PublicKeyToken=null
…

It appears to be a bug on Kerbalism:

[EXC 00:09:26.077] ArgumentNullException: Argument cannot be null.
Parameter name: key
        System.Collections.Generic.Dictionary`2[System.String,KERBALISM.Lib+Module_prefab_data].TryGetValue (System.String key, KERBALISM.Module_prefab_data& value)
        KERBALISM.Lib.ModulePrefab (System.Collections.Generic.List`1 module_prefabs, System.String module_name, System.Collections.Generic.Dictionary`2 PD)
        KERBALISM.Computer.Boot (.Vessel v)
        KERBALISM.Computer.Automate (.Vessel v, KERBALISM.Vessel_info vi, KERBALISM.Vessel_resources resources)
        KERBALISM.Kerbalism.FixedUpdate ()
[LOG 00:09:26.077] delta 0, target amt 210

<a lot of logs>

[EXC 00:09:52.328] ArgumentNullException: Argument cannot be null.
Parameter name: key
        System.Collections.Generic.Dictionary`2[System.String,KERBALISM.Lib+Module_prefab_data].TryGetValue (System.String key, KERBALISM.Module_prefab_data& value)
        KERBALISM.Lib.ModulePrefab (System.Collections.Generic.List`1 module_prefabs, System.String module_name, System.Collections.Generic.Dictionary`2 PD)
        KERBALISM.Computer.Boot (.Vessel v)
        KERBALISM.Computer.Automate (.Vessel v, KERBALISM.Vessel_info vi, KERBALISM.Vessel_resources resources)
        KERBALISM.Kerbalism.FixedUpdate ()
[LOG 00:09:52.328] delta 0, target amt 210

Are you really sure that this logs entries doesn't happens without KSPe or KJR? Beyound KSPe and KJR, there're something else "of mine" on your installment?

Gordon-Dry commented 5 years ago

You're right, it must be Kerbalism. It seems it was it for weeks, and oh wonder oh magic it seems I'm the only one with that issue. Either there are only a few people with newest Kerbalism builds that have "the problematic other triggering mod(s)" or there are ppl never really looking into the logs during playtime.

Last session: "not-lisias" KJR, no KSPe.

Log spam:

ArgumentNullException: Argument cannot be null.
Parameter name: key
  at System.Collections.Generic.Dictionary`2[System.String,KERBALISM.Lib+Module_prefab_data].TryGetValue (System.String key, KERBALISM.Module_prefab_data& value) [0x00000] in <filename unknown>:0 
  at KERBALISM.Lib.ModulePrefab (System.Collections.Generic.List`1 module_prefabs, System.String module_name, System.Collections.Generic.Dictionary`2 PD) [0x00000] in <filename unknown>:0 
  at KERBALISM.Computer.Boot (.Vessel v) [0x00000] in <filename unknown>:0 
  at KERBALISM.DevManager.Devman (KERBALISM.Panel p, .Vessel v) [0x00000] in <filename unknown>:0 
  at KERBALISM.Monitor.Update () [0x00000] in <filename unknown>:0 
  at KERBALISM.Launcher.Update () [0x00000] in <filename unknown>:0 
  at KERBALISM.UI.Update (Boolean show_window) [0x00000] in <filename unknown>:0 
  at KERBALISM.Kerbalism.Update () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)
Gordon-Dry commented 5 years ago

btw I'm used to (really!) that a career never survives more than 10 days without being borked. And it was always like that since I came to KSP in May 2015.

This is the most borked franchise I ever had my fingers into.

Lisias commented 5 years ago

I had seen worse. :)

The real problem on KSP is not KSP - Squad is messing a bit too, but mainly because they hadn't a Q/A to catchup the unavoidable errors developers do. The transition from 1.3 to 1.4 was absolutely traumatic, and at that time they didn't had an Q/A to help them.

Our worse problem is add-ons. People developing add-ons are, in the most part, not professional developers, without the "training" to cope with problems inherent to software development. Things change, and change a lot. And change in subtle ways sometimes.

We also need a kind of "Q/A" team for add-ons. And some die-hard developers that hate bugs hunting them to the death. :D

The best advice I can give to you is to stick to 1.4.5, use the add-ons that are known to work on 1.4.5, and do not update them anymore except after testing things first on a test bed (a special copy of kSP where you try things).

I think 1.5.1 is a good version, but add-ons are not ready for it yet.

Lisias commented 5 years ago

Since I'm here - KSP 1.6 is working almost fine.

There's a glitch on Module Manager where you need to restart KSP to force it to load from cache everytime you change an add'on, but other than that, I didn't got into trouble with 1.6 yet.

Lisias commented 5 years ago

I'm closing this as I didn't found any evidences that KSPe is the trigger for the problem.

If anything changes, it will be reopened