DRVeyl / RealAntennas

KSP Mod to add better antenna / link calculations to CommNet.
29 stars 26 forks source link

log spamming #51

Closed emiliofloris closed 3 years ago

emiliofloris commented 3 years ago

I noticed that RealAntennas leaves a lot of spam in the log of the form Couldn't find celestial body with name ''. I verfied that this is caused by RA by turning the mod off and on again. Here is the full log: https://www.dropbox.com/s/3v99j1hiq6fvbfq/KSP_raspam.log?dl=0 Otherwise great work! An essential mod in my opinion.

DRVeyl commented 3 years ago

Well, that is unique. Thanks for the report. There is a periodic network debug dump that can be configured in the RA difficulty settings, that looks like it is turned off. Could you turn it back on long enough for it to capture the network state?

Also, with 2.0 there is a feature to help debug antennas. Could you switch to one of the vessels, open up the PAW [right-click menu] of a an antenna part, and click the "debug antenna" button? This should also dump a bunch of data on the overall network state to the KSP log.

If you can re-post the log with that additional data, that may help. That message isn't being written specifically by RA... but I gather from some KSP method RA uses when looking for a particular Celestial Body and I have no idea what/where/why without context.

emiliofloris commented 3 years ago

I looked into the issue again and was able to pinpoint it to the interaction with the waypoint manager. That should make the problem easy to reproduce, just start from a vanilla install with RA and WM and any vessel with an antenna will trigger the spam. Here is the log: https://www.dropbox.com/s/f406qm7yfwr3jer/KSP_wm_ra.log?dl=0. By the way, I pressed the debug antenna button as you suggested but can't find any difficulty settings. Are they located in one of the .cfg files?

DRVeyl commented 3 years ago

The normal game difficulty settings windows. RealAntennas tab.

There is no "interaction" with WaypointManager. This sounds like a known issue with that mod. https://github.com/jrossignol/WaypointManager/blob/master/source/WaypointManager/Util.cs#L142 is the line where it causes that message. I couldn't tell you where something is calling that method, but there is no interface in RA for it. RA does not manipulate the FlightGlobals.Bodies list nor does it manipulate https://github.com/jrossignol/WaypointManager/blob/master/source/WaypointManager/WaypointData.cs#L103 where that is called within WaypointManager