linuxgurugamer

[1.5.1, 1.6.1, 1.7.2] RCS Build Aid Continued - New Dependencies

Recommended Posts

On 9/21/2018 at 4:28 PM, Fraktal said:

Problem disappeared after verifying integrity of game cache in Steam. Don't know what caused it, but it wasn't the mod itself.

Redacted. problem is back. When I start the game, the button is not yet in the main menu - but after I load up a savegame and subsequently exit back to the main menu, it's now there and clicking it throws a nullref exception.

Found this in KSP.log:

[ERR 01:24:08.250] ToolbarControl: WARNING: RegisterMod, LoadedScene: MAINMENU, called too late for: RCSBuildAid_NS, RCS Build Aid, button may not be registered properly

And the nullref caused by clicking on the button in the main menu:

[EXC 02:54:05.696] NullReferenceException
	RCSBuildAid.RCSBuildAid.SetActive (Boolean value)
	RCSBuildAid.AppLauncher.onFalse ()
	ToolbarControl_NS.ToolbarControl.SetButtonInactive ()
	ToolbarControl_NS.ToolbarControl.doOnFalse ()
	KSP.UI.Screens.ApplicationLauncherButton.OnFalse (UnityEngine.EventSystems.PointerEventData data, CallType callType)
	UnityEngine.Events.InvokableCall`2[UnityEngine.EventSystems.PointerEventData,KSP.UI.UIRadioButton+CallType].Invoke (UnityEngine.EventSystems.PointerEventData args0, CallType args1)
	UnityEngine.Events.UnityEvent`2[UnityEngine.EventSystems.PointerEventData,KSP.UI.UIRadioButton+CallType].Invoke (UnityEngine.EventSystems.PointerEventData arg0, CallType arg1)
	KSP.UI.UIRadioButton.SetState (State state, CallType callType, UnityEngine.EventSystems.PointerEventData data, Boolean popButtonsInGroup)
	KSP.UI.UIRadioButton.ToggleState (CallType callType, UnityEngine.EventSystems.PointerEventData data)
	KSP.UI.UIRadioButton.UnityEngine.EventSystems.IPointerClickHandler.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData)
	UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData)
	UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor)
	UnityEngine.EventSystems.EventSystem:Update()

However. The problem might actually be caused by Ship Sections, as I found this at every single scene change:

[ERR 02:46:53.309] Exception handling event onGUIApplicationLauncherReady in class SectionNameUI:System.NullReferenceException: 
  at (wrapper managed-to-native) UnityEngine.Component:get_gameObject ()
  at JKorTech.ShipSections.SectionNameUI.OnAppLauncherReady () [0x00000] in <filename unknown>:0 
  at EventVoid.Fire () [0x00000] in <filename unknown>:0 

[EXC 02:46:53.310] NullReferenceException
	JKorTech.ShipSections.SectionNameUI.OnAppLauncherReady ()
	EventVoid.Fire ()
	UnityEngine.Debug:LogException(Exception)
	EventVoid:Fire()
	KSP.UI.Screens.ApplicationLauncher:StartupSequence()
	KSP.UI.Screens.ApplicationLauncher:OnSceneLoadedGUIReady(GameScenes)
	EventData`1:Fire(GameScenes)
	<FireLoadedEventGUIReady>c__Iterator2:MoveNext()
	UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[ERR 02:46:53.310] Exception handling event onGUIApplicationLauncherReady in class SectionNameUI:System.NullReferenceException: 
  at (wrapper managed-to-native) UnityEngine.Component:get_gameObject ()
  at JKorTech.ShipSections.SectionNameUI.OnAppLauncherReady () [0x00000] in <filename unknown>:0 
  at EventVoid.Fire () [0x00000] in <filename unknown>:0 

[EXC 02:46:53.311] NullReferenceException
	JKorTech.ShipSections.SectionNameUI.OnAppLauncherReady ()
	EventVoid.Fire ()
	UnityEngine.Debug:LogException(Exception)
	EventVoid:Fire()
	KSP.UI.Screens.ApplicationLauncher:StartupSequence()
	KSP.UI.Screens.ApplicationLauncher:OnSceneLoadedGUIReady(GameScenes)
	EventData`1:Fire(GameScenes)
	<FireLoadedEventGUIReady>c__Iterator2:MoveNext()
	UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[ERR 02:46:53.311] Exception handling event onGUIApplicationLauncherReady in class SectionNameUI:System.NullReferenceException: 
  at (wrapper managed-to-native) UnityEngine.Component:get_gameObject ()
  at JKorTech.ShipSections.SectionNameUI.OnAppLauncherReady () [0x00000] in <filename unknown>:0 
  at EventVoid.Fire () [0x00000] in <filename unknown>:0 

[EXC 02:46:53.312] NullReferenceException
	JKorTech.ShipSections.SectionNameUI.OnAppLauncherReady ()
	EventVoid.Fire ()
	UnityEngine.Debug:LogException(Exception)
	EventVoid:Fire()
	KSP.UI.Screens.ApplicationLauncher:StartupSequence()
	KSP.UI.Screens.ApplicationLauncher:OnSceneLoadedGUIReady(GameScenes)
	EventData`1:Fire(GameScenes)
	<FireLoadedEventGUIReady>c__Iterator2:MoveNext()
	UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

My guess is that whatever UI function handles toolbar button registering/deregistering calls Ship Sections before RCS Build Aid, Ship Sections throws an exception that isn't caught and goes up the stack, which breaks out of the UI function before RCS Build Aid gets its turn, causing RCS Build Aid's button to not be properly deregistered/disposed. Mind you, I don't know how Unity works internally, I'm just guessing here as a fellow software dev who works with C# on a daily basis.

Share this post


Link to post
Share on other sites

Two things.

First, an extract fro the log is interesting, but usually useless without the rest of the log.

Second, if you suspect another mod, then remove it and test.  In this case, ShipSections is part of the Extensive Engineer Report, uninstall that mod and try again.

 

Share this post


Link to post
Share on other sites

Did so, problem didn't go away. Start game without EER, enter main menu, no button. Load any savegame, button is now present in every single screen with the stock toolbar and clicking it anywhere other than the VAB/SPH throws a nullref in the console. If I switch the button from the stock toolbar to Blizzy, the button is now properly displayed only in the VAB/SPH and nowhere else, so the problem is specific to the stock toolbar.

I'd post the entire output_log here but the forum threw up an internal error when I tried.

 

Share this post


Link to post
Share on other sites
16 hours ago, Fraktal said:

I'd post the entire output_log here but the forum threw up an internal error when I tried.

Either upload the file somewhere and share the link, or post it to something like pastebin and provide that link

Share this post


Link to post
Share on other sites

One thing I have noticed for a long time, (Have not checked it in 1.5.0+)

Is that the RCS Build Aid Icon is visible in the Space Center View. (But has no function) Why is it displayed?

Also when I exit the game to return to Main Menu, the Icon is Visible too. (Only item displayed in the Stock tool Bar) Why is it displayed?

Share this post


Link to post
Share on other sites

Bug. The button doesn't seem to properly deregister when exiting the VAB/SPH or something. linuxgurugamer has known about it for months (because I've been bothering him about it) but seeing that he's got a helluva lot of mods to update for 1.5, I don't think this'll be high-priority for him for a while.

It's specific to the stock toolbar; if you switch to Blizzy, it only appears when it should be appearing.

Edited by Fraktal

Share this post


Link to post
Share on other sites
1 hour ago, DerekL1963 said:

Your link to Blizzy's Toolbar in the first post appears to be broken.

Thanks, just fixed it

Share this post


Link to post
Share on other sites
2 minutes ago, Xurkitree said:

Where can I find the 1.4.5 versions of this? 1.5.1 isnt compatible.

Click "Download" in the OP, then "Changelog" on the Spacedock page (bottom middle), then find a version that shows compatible with 1.4.5.  Ver 0.9.7.2 from the looks of it.

Share this post


Link to post
Share on other sites

I'm having trouble getting this to work. I downloaded from the link provided, moved the RCSBuildAid folder into the KSP GameData folder like I have with KER and KAC (which both work fine), but when I go into the VAB or SPH nothing from the mod shows up. When I first loaded the game after installing it asked me if I want to keep RCSbuildaid updated automatically so I assume everything is in the right place, I've got 1.5.1.2335 and making history 1.5.1. I tried both the most recent version 0.9.7.3 and version 0.9.7.2.

Share this post


Link to post
Share on other sites

Do  you have the dependencies installed?  The latest ToolbarController and ClickThroughBlocker?

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites
22 minutes ago, linuxgurugamer said:

Do  you have the dependencies installed?  The latest ToolbarController and ClickThroughBlocker?

Ok, I'm dumb, I read that as those mods were dependent on this one for some reason :P I installed both of those and it's working perfectly, thanks!

Share this post


Link to post
Share on other sites
12 minutes ago, IronMaiden said:

Ok, I'm dumb, I read that as those mods were dependent on this one for some reason :P I installed both of those and it's working perfectly, thanks!

And now you know!

Glad that's all it was

Share this post


Link to post
Share on other sites
20 hours ago, linuxgurugamer said:

And now you know!

Glad that's all it was

And knowing is half the battle!

Share this post


Link to post
Share on other sites
2 hours ago, Starwaster said:

And knowing is half the battle!

I know I'm going to date myself here, buuuuuut...

"DID YOU KNOW THAT??!?"

*insert science fact*

"NOW YOU KNOW!"

Share this post


Link to post
Share on other sites
17 hours ago, MaverickSawyer said:

I know I'm going to date myself here, buuuuuut...

"DID YOU KNOW THAT??!?"

*insert science fact*

"NOW YOU KNOW!"

Well, I was thinking more along the lines of a certain show with a certain antagonist with a costume with a snake emblem and a mirror helmet..... but that works too I guess.

Share this post


Link to post
Share on other sites

Just started using this mod, it's really useful.  Is there any way to exclude engines (or sets of engines) from the calculation?  I sometimes build landers that have a set of "landing" engines and a set of "main" engines and as far as I can see so far the plugin doesn't let you distinguish between them - so it's still usually back to the VAB/gravity hack cycle for balancing them.

Share this post


Link to post
Share on other sites
4 minutes ago, Tibrogargan said:

Is there any way to exclude engines (or sets of engines) from the calculation?

Just put them in different stages. RCS BuildAid will always use the first stage ;)

Share this post


Link to post
Share on other sites

noticed this in my log: "[WRN 02:14:12.339] RCSBuildAid's parachute mode disabled since incompatible mods were detected". Not sure what mods it would be referring to tho

full log

Share this post


Link to post
Share on other sites
4 hours ago, Drew Kerman said:

noticed this in my log: "[WRN 02:14:12.339] RCSBuildAid's parachute mode disabled since incompatible mods were detected". Not sure what mods it would be referring to tho

full log

Well, you got RealChute (and FAR) installed and the README tells us:

Quote

Known Issues
------------

[...]
* Parachute mode only works with stock aerodynamics and parachutes, will not work
with mods such as `FerramAerospaceResearch` and `RealChute`.

 

;)

Edited by 4x4cheesecake

Share this post


Link to post
Share on other sites
29 minutes ago, Drew Kerman said:

oh. ReadMes. Yea, those things are useful :confused:

Some people just aren't sure what to DO... with the readme.....

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.