KSP-KOS / KOS

Fully programmable autopilot mod for KSP. Originally By Nivekk
Other
693 stars 229 forks source link

Unable to launch new rockets #763

Closed abenkovskii closed 9 years ago

abenkovskii commented 9 years ago

screenshot0 log: https://www.dropbox.com/s/bfeyha5qz4ajn6r/output_log-launch_bug.txt?dl=0

erendrake commented 9 years ago

is this with the last canary i gave you or a new one?

abenkovskii commented 9 years ago

The problem is with the version @ZiwKerman compiled for me. He experiences the same bug.

Tabris83 commented 9 years ago

i get this most times in relation to issue #751

space-is-hard commented 9 years ago

FWIW, sometimes I'll get this exact same bug with the current version when reverting a flight. I can't confirm that it's kOS causing it, but others have had it too and seem confident that it's kOS causing it.

Dunbaratu commented 9 years ago

I'm reading through the log, and I notice this suspicious thing right off during the part at the beginning when all the mods are loaded:

NullReferenceException
  at (wrapper managed-to-native) UnityEngine.WWW:LoadImageIntoTexture (UnityEngine.Texture2D)
  at kOS.Screen.KOSToolBarWindow.FirstTimeSetup () [0x00000] in <filename unknown>:0 
  at kOS.Screen.KOSToolBarWindow.Start () [0x00000] in <filename unknown>:0 

Are all the PNG files for kOS's icons installed properly in your installation? Or, did anyone recently touch the code that reads the PNG files? Is there a way we may be failing to read the files? Because failing that step is what is going to cause this exception. And, looking at the code, it will abort FirstTimeSetup() before it finishes all its initial work getting the starting values right, which might cause all sorts of other errors down the road.

(For example, if it fails there, it never gets to the line where it assigns the panel's skin (the skin will still be null), or the line where it registers the panel with SQUAD's applauncher properly.)

Further down in the log I see problems all related to the panel, as more exceptions occur.

Just as it tries to enter FLIGHT mode during that last (fatal) scene change, I see this happening:

[HighLogic]: =========================== Scene Change : From EDITOR to FLIGHT (Async) ===================== 
(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)
kOS: KOSToolBarWindow: PROOF: Instance 7 is in GoAway().

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

kOS: KOSToolBarWindow: PROOF: Instance 7 has hooks and is entering the guts of GoAway().

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

NullReferenceException: Object reference not set to an instance of an object
  at ApplicationLauncher.DisableMutuallyExclusive (.ApplicationLauncherButton launcherButton) [0x00000] in <filename unknown>:0 
  at kOS.Screen.KOSToolBarWindow.GoAway () [0x00000] in <filename unknown>:0 
  at kOS.Screen.KOSToolBarWindow.OnDestroy () [0x00000] in <filename unknown>:0 

And then the system is completely confused after that and the main game itself starts spewing excpetions:

------------------- initializing flight mode... ------------------

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

NullReferenceException: Object reference not set to an instance of an object
  at MessageSystem.RepositionDynamic () [0x00000] in <filename unknown>:0 
  at MessageSystem.Resize () [0x00000] in <filename unknown>:0 
  at MessageSystem.ClearAllMessages () [0x00000] in <filename unknown>:0 
  at MessageSystem.LoadMessages (.ConfigNode gameNode) [0x00000] in <filename unknown>:0 
  at EventData`1[ConfigNode].Fire (.ConfigNode data) [0x00000] in <filename unknown>:0 
  at Game.Load () [0x00000] in <filename unknown>:0 
  at FlightDriver.Start () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

kOS: KOSToolbarWindow: PROOF that Start() was called.

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

kOS: KOSToolBarWindow: Now making instance number 9 of KOSToolBarWindow

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

NullReferenceException: Object reference not set to an instance of an object
  at ResourceDisplay.CreateResourceList () [0x00000] in <filename unknown>:0 
  at ResourceDisplay.Update () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at UIPartActionController.UpdateResourceWindows () [0x00000] in <filename unknown>:0 
  at UIPartActionController.UpdateFlight () [0x00000] in <filename unknown>:0 
  at UIPartActionController.Update () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at VesselAutopilotUI.LateUpdate () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at IVASun.LateUpdate () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at NavWaypoint.LateUpdate () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

kOS: KOSToolBarWindow: PROOF: OnGUI() was called at least once on instance number 9

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)
NullReferenceException: Object reference not set to an instance of an object
  at ResourceDisplay.CreateResourceList () [0x00000] in <filename unknown>:0 
  at ResourceDisplay.Update () [0x00000] in <filename unknown>:0 

(It keeps spewing more errors after that, but I cut off at that point.)

I suspect that once the toolbar gets lost, it causes scene changes to barf.

One suspicion that surfaces in my mind is this: The problem seems to happen more often when people "revert to launch" than when they go to VAB and then to launch. Could that mean that what really is the difference is having just had the kOS panel window open in the previous scene prior to launch? When going from flight scene to launch ("revert to launch") this is possible. When going from flight scene, to editor scene, to launch ("revert to VAB"), it is not ,as going into the VAB makes the window go away.

erendrake commented 9 years ago

i merged the blizzy toolbar work and i thought it was working fine. it was all over toolbar, i might have missed something.

abenkovskii commented 9 years ago

It looks like @ZiwKerman fixed it.

Dunbaratu commented 9 years ago

If you verify that @ziwkerman fixed it, can we close this issue or is there still something keeping it open?

abenkovskii commented 9 years ago

@Dunbaratu Don't think there is a reason to keep this issue. I tried reverting to VAB, SPH and flight. Nothing crashed so far.