SCANsat icon indicating copy to clipboard operation
SCANsat copied to clipboard

SCANsat Icon not showing up in toolbar

Open snak161 opened this issue 6 years ago • 16 comments

(this may not be a mod problem as the game version just changed)

I recently installed SCANsat alongside a few other (to my knowledge) compatible mods -- the parts do load in and I don't get any incompatibility message. Though unfortunately I don't get the satellite image panel in the toolbar (where Fuel, Contracts, etc. are situated). This is not necessarily due to the new game version (1.4 vs 1.3) since I did also not have that button in the previous version.

snak161 avatar Mar 07 '18 10:03 snak161

It's hard to say without logs. It could be an installation error, or the toolbar was just switched off in the settings file.

DMagic1 avatar Mar 07 '18 14:03 DMagic1

I'll gladly attach logs if you tell me how to get them.

snak161 avatar Mar 07 '18 16:03 snak161

Generally the KSP.log file found in the Kerbal Space Program directory is fine for diagnosing problems.

DMagic1 avatar Mar 10 '18 00:03 DMagic1

I know KSP 1.4 is out there, but I just made the step from 1.2.2 to 1.3.1. I Installed ScanSat 18.4 but the button does also not show up in the toolbar, Parts are functioning. Settings.cfg was just created by the module and has StockToolbar = True, ToolbarMenu = True. Ksp.log has this: [EXC 22:48:02.499] NullReferenceException: Object reference not set to an instance of an object SCANsat.SCAN_Toolbar.SCANappLauncher+<addButton>d__26.MoveNext () UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress)

my-th-os avatar Mar 12 '18 22:03 my-th-os

And now with blizzy's I have the button, but the map doesn't work, Ksp.log says: [ERR 23:55:09.993] [Toolbar] [ERROR] error while handling click event: SCANsat.SmallMap

[EXC 23:55:09.994] ArgumentException: The Object you want to instantiate is null. UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) UnityEngine.Object.Instantiate[GameObject] (UnityEngine.GameObject original) SCANsat.SCAN_Unity.SCAN_UI_MainMap.Open () SCANsat.SCAN_Toolbar.SCANtoolbar+<>c.<.ctor>b__6_2 (SCANsat.SCAN_Toolbar.ClickEvent e) SCANsat.SCAN_Toolbar.Button.clicked (System.Object realEvent) Toolbar.Command.click () UnityEngine.Debug:LogException(Exception) Toolbar.Log:log(LogLevel, Exception, String, Object[]) Toolbar.Log:error(Exception, String, Object[]) Toolbar.Command:click() Toolbar.Button:click() Toolbar.Button:drawInToolbar(Rect, Boolean) Toolbar.Toolbar:drawButtons() Toolbar.Toolbar:draw() Toolbar.ToolbarManager:OnGUI()

my-th-os avatar Mar 12 '18 23:03 my-th-os

As expected, everything fine in a blank KSP 1.3.1 with ScanSat 18.4. Then added mods step by step, and the conflict was: AutoLoadGame This skips the menu scene. Why should that be a problem with ScanSat? I would like to have both, of course ;-)

my-th-os avatar Mar 12 '18 23:03 my-th-os

Never skip the main menu. It will break any number of things, including SCANsat and pretty much every other mod I make.

I wouldn't skip the space center, either, it's just as likely to prevent some crucial start up procedure from loading properly.

DMagic1 avatar Mar 12 '18 23:03 DMagic1

KSP.log

snak161 avatar Mar 12 '18 23:03 snak161

"any number" is about 1, ScanSat only

my-th-os avatar Mar 12 '18 23:03 my-th-os

@kolya-matic I don't see SCANsat installed at all in that log file.

DMagic1 avatar Mar 13 '18 01:03 DMagic1

Hi,

I've just experienced a similar problem trying to install SCANsat 1.8 in KSP 1.3.1. The parts themselves seem to work fine, I just don't get the toolbar button.

Looking at the logfile I found the following error message:

[ERR 23:39:03.496] AssemblyLoader: Exception loading 'Toolbar': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
  at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0 

Additional information about this exception:

 System.TypeLoadException: Could not load type 'Toolbar.ToolbarManager' from assembly 'aaa_Toolbar, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type '<>c__DisplayClass36_0' from assembly 'aaa_Toolbar, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type '<>c__DisplayClass39_0' from assembly 'aaa_Toolbar, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

[ERR 23:39:03.517] AssemblyLoader: Exception loading 'SCANsat.Unity': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
  at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0 

The full log is attached here: KSP.log

Hope it help to debug this.

LongHairedHacker avatar Mar 20 '18 22:03 LongHairedHacker

@LongHairedHacker You appear to be using KSP 1.3.1 with SCANsat 1.8.5, that isn't supported:

Kerbal Space Program - 1.3.1.1891 (LinuxPlayer) en-us
.....
SCANsat v1.8.5.0 / vv18.5

DMagic1 avatar Mar 21 '18 13:03 DMagic1

Thanks for the info.

So which version is compatible with 1.3.1 I can't seem to find that info in the readme? From the changelog I'd say 18.4 or at least 18.1 should work.

18.4 works.

LongHairedHacker avatar Mar 21 '18 18:03 LongHairedHacker

@DMagic1 could you suggest some solution for AutoLoadGame then? Would a timeout on the main menu and KSC scenes be enough; or is there a way to check that everything was initialized?

allista avatar Mar 27 '18 19:03 allista

A timer would probably work fine; there is no good way to ensure that everything is initialized, but 60 frames would almost certainly be enough in most circumstances.

Generally I just don't think mods that allow for directly loading a save file, or skipping the main menu or space center scene are a good idea. There is always potential for something to not get initialized properly because it was counting on the stock order of events.

DMagic1 avatar Mar 27 '18 22:03 DMagic1

Thanks for the suggestion, will try it.

ALG was never intended for a heavily modded main game, but for debugging and tuning during mod development.

allista avatar Mar 27 '18 22:03 allista