Jump to content

Can't open part menu on control surfaces : bugs out the whole game


Recommended Posts

Hi,

very odd issue : when I right click a control surface (not all of them do it, but most), the part action menu is "blank", like in the screenshot, and after that, the null ref spam keeps going, and I cannot interact with any part on the vessel. happens in flight, and in the editor.

[EXC 06:43:41.773] InvalidCastException: Specified cast is not valid.
    BaseField`1[K].GetValue[T] (System.Object host) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
    UIPartActionFloatRange.GetFieldValue () (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
    UIPartActionFloatRange.Setup (UIPartActionWindow window, Part part, PartModule partModule, UI_Scene scene, UI_Control control, BaseField field) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
    UIPartActionWindow.AddFieldControl (BaseField field, Part part, PartModule module) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
    UIPartActionWindow.CreatePartList (System.Boolean clearFirst) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
    UIPartActionWindow.UpdateWindow () (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
    UIPartActionController.UpdateActiveWindows () (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
    UIPartActionController.UpdateFlight () (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
    UIPartActionController.Update () (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    KSPe.Util.Log.UnityLogDecorator:UnityEngine.ILogHandler.LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

Full KSP.log : https://www.dropbox.com/s/ftic9lit09rsy3r/KSP.log?dl=0

screenshot :

screenshot20.png

thanks for your help ! :) 

Link to comment
Share on other sites

Did you updated something recently?

I found a huge amount of KSPCF messages complaining about the order of the Modules on the craft file  not matching the order on the prefab and doing changes. For this to happen, something changed on your GameData between the last time you played this savegame and now.

I would suggest to revert any changes to see if the problem goes away.

(Do full backups of your saves anyway, so if things go really south, you can try again without losing them!)

Edited by Lisias
Kraken damned auto-correctors!
Link to comment
Share on other sites

6 hours ago, Lisias said:

Did you updated something recently?

Update not really, only rational ressources, but I often tweak / patch mods my self to my liking... so that might be it yeah.

Yes I backup each time I do major changes but last one is too far away, but anyway now, and weirdly, the issue is gone... (deleted all MM caches in between, idk if that helped)
Cheers !

Link to comment
Share on other sites

1 hour ago, kurgut said:

Yes I backup each time I do major changes but last one is too far away, but anyway now, and weirdly, the issue is gone... (deleted all MM caches in between, idk if that helped)
Cheers !

Geez! You were bitten by an insidious MM bug that I'm hunting for years already! And I let it scape under my nose! Damn!

There's a least one situation where MM fools itself on believing the ConfigCache is up to date. I detected one and fixed it on my fork, but recently I published a bad release of KSP-Recall that I initially attributed to a new mishap on the Cache validation,  but could not found it by eye balling the MM's code so I reluctantly ended up attributing to sleep deprivation. 

You just proved to me that there's still one more bug to go!

Can you please send me a copy of every log in your KSP rig? ConfigCache, MM Pacthes, etc. Essentially,  everything under <KSP_ROOT>/Logs and <KSP_ROOT>/PluginData. And the Player.log too, for good measure.

With this info,  I can try to look for hints about what would be this missing use case on the MM' cache validation  since right now your rig has whatever is the situation that triggers it!

Thanks in advance!

In time: https://github.com/net-lisias-ksp/ModuleManager/issues/20

Edited by Lisias
Link to issue.
Link to comment
Share on other sites

1 hour ago, Lisias said:

Geez! You were bitten by an insidious MM bug that I'm hunting for years already! And I let it scape under my nose! Damn!

There's a least one situation where MM fools itself on believing the ConfigCache is up to date. I detected one and fixed it on my fork, but recently I published a bad release of KSP-Recall that I initially attributed to a new mishap on the Cache validation,  but could not found it by eye balling the MM's code so I reluctantly ended up attributing to sleep deprivation. 

You just proved to me that there's still one more bug to go!

Can you please send me a copy of every log in your KSP rig? ConfigCache, MM Pacthes, etc. Essentially,  everything under <KSP_ROOT>/Logs and <KSP_ROOT>/PluginData. And the Player.log too, for good measure.

With this info,  I can try to look for hints about what would be this missing use case on the MM' cache validation  since right now your rig has whatever is the situation that triggers it!

Thanks in advance!

In time: https://github.com/net-lisias-ksp/ModuleManager/issues/20

Oh that's glorious ! Happy to have contributed to that, even without knowing it haha

Of course here they're. Since this bug happened, I almost didn't touch /gamedata, so it should be still revelant :
( I didn't include the [email protected]@1.5.5 folder, since it was almost 700mb, but I can upload too if you need it without problems)

https://www.dropbox.com/s/zwzbgrcpf2zavyj/Logs for Lisias.zip?dl=0

Also just in case, note that I'm using your custom MM, but I think you know that already ^^  : kerbalspaceprogram.com/topic/ubiozur-welding-ltd-continued/comment=4202046
 

Good luck digging all this out !

 

Edited by kurgut
Link to comment
Share on other sites

@Lisias

Btw, this is completly unrelated, but If by digging my logs, you happen to stumble upon some complains from the toolbar mod not finding some icon textures (makes lag ingame (error spam)), and turn those toolbar icon texture purple), let me know if you see something interesting, since I really can't figure this out.
Linuxgurugamer couldn't find the problem too, the discussion for reference : toolbar-continued-common-api-for-draggableresizable-buttons-toolbar/comment=4286267
Not a big deal tho, and again, don't waste your time on this, only if it lands in front of your eyes ! :) 

 

Edited by kurgut
Link to comment
Share on other sites

4 hours ago, kurgut said:

@Lisias

Btw, this is completly unrelated, but If by digging my logs, you happen to stumble upon some complains from the toolbar mod not finding some icon textures (makes lag ingame (error spam)), and turn those toolbar icon texture purple), let me know if you see something interesting, since I really can't figure this out.
Linuxgurugamer couldn't find the problem too, the discussion for reference : toolbar-continued-common-api-for-draggableresizable-buttons-toolbar/comment=4286267
Not a big deal tho, and again, don't waste your time on this, only if it lands in front of your eyes ! :) 

 

Are you talking about this one?

[ERR 06:52:29.853] [Toolbar] [ERROR] button texture not found: KerbalLaunchFailure/PluginData/Textures/warning_24

The file is inside a PluginData, so KSP is not mangling with it for sure.

Check if the file <KSP_ROOT>/GameData/KerbalLaunchFailure/PluginData/Textures/warning_24.<something> exists. Check the casing of the pathname, check the casing of the filetype (JPG instead of jpg, for example, or even Jpg). You are running Windows 10, that usually uses a case insensitive file system - but NTFS can be configured to be case sensitive… But it's a wild guess.

What is your Windows Localization? Unity has a pretty nasty habit of replacing chars with dots, a living hell on PT-BR, as we have a lot of non-ascii chars on our alphabet and I bet this can be even nastier to non roman alphabets as Greek, Russian and Hebrew. I once got royally screwed because I created a new savegame called Temp without realizing I already a temp one on the file system (I use a case sensitive file system). Dude, files were being written on the wrong savegame, I don't need to tell more… 

I checked your log, and you are not using any fancy chars on the KSP's pathname, however. But it doesn't hurts to check.

Link to comment
Share on other sites

16 minutes ago, Lisias said:

The file is inside a PluginData, so KSP is not mangling with it for sure.

Check if the file <KSP_ROOT>/GameData/KerbalLaunchFailure/PluginData/Textures/warning_24.<something> exists. Check the casing of the pathname, check the casing of the filetype (JPG instead of jpg, for example, or even Jpg). You are running Windows 10, that usually uses a case insensitive file system - but NTFS can be configured to be case sensitive… But it's a wild guess.

The only thing this would cause would be a purple button on the Blizzy toolbar

Link to comment
Share on other sites

2 hours ago, Lisias said:

Are you talking about this one?

yes ! 

2 hours ago, Lisias said:

Check the casing of the pathname

It's warning_24.png. Other mod having this issue for instance was the Notes mod, texture pathing name is ok as well, I had checked before, that's why this seemed weird to me.
I compared it to the what the log complains about, and it's litteraly the same texture path to the letter...

2 hours ago, Lisias said:

You are running Windows 10

I'm actually running Windows 11 ! :)

2 hours ago, Lisias said:

What is your Windows Localization?

French !

2 hours ago, Lisias said:

Dude, files were being written on the wrong savegame, I don't need to tell more… 

Horrible haha :D

2 hours ago, linuxgurugamer said:

The only thing this would cause would be a purple button on the Blizzy toolbar

And this is what it does indeed, texture turn purple, accompanied with a slight freeze due the error logging. I went around that by placing the toolbar at screen edge, and using the auto hide feature, meaning that the texture wouldn't be purple all the time, if the toolbar remains there all the time. Cf. Toolbar forum thread where I talk about it + also found a user by accident having the same issue

https://forum.kerbalspaceprogram.com/what-did-you-do-in-ksp1-today/comment=4293508

 

Link to comment
Share on other sites

4 hours ago, linuxgurugamer said:

The only thing this would cause would be a purple button on the Blizzy toolbar

If this is a bug on Toolbar, yes. If this is a bug on something that Toolbar relies, it may affect something else with not so benign effects.

Normalisation of deviance is a problem by itself.

It worths at least a superficial investigation to figure out the possible causes.

 

1 hour ago, kurgut said:

It's warning_24.png. Other mod having this issue for instance was the Notes mod, texture pathing name is ok as well, I had checked before, that's why this seemed weird to me.
I compared it to the what the log complains about, and it's litteraly the same texture path to the letter...

So it's something on code and, so, should be affecting not only Windows. Makes things easier for me, to tell you the true. :) 

Let's see what I manage to pull from this hat.

1 hour ago, kurgut said:

I'm actually running Windows 11 ! :)

Really? So the log is lying to me? :/

Link to comment
Share on other sites

37 minutes ago, Lisias said:

So it's something on code and, so, should be affecting not only Windows. Makes things easier for me, to tell you the true. :) 

Let's see what I manage to pull from this hat.

Sweet, I some point before, I even moved my whole KSP instance to C/games, because before it was in /documents, and I know from experience those special windows folder aren't always friendly with modded games. GL : )

39 minutes ago, Lisias said:

Really? So the log is lying to me? :/

Well... Yes ? ^^ that's weird :D
2nDprY8.png

Link to comment
Share on other sites

On 6/16/2023 at 4:18 PM, kurgut said:

And this is what it does indeed, texture turn purple, accompanied with a slight freeze due the error logging. I went around that by placing the toolbar at screen edge, and using the auto hide feature, meaning that the texture wouldn't be purple all the time, if the toolbar remains there all the time. Cf. Toolbar forum thread where I talk about it + also found a user by accident having the same issue

https://forum.kerbalspaceprogram.com/what-did-you-do-in-ksp1-today/comment=4293508

I remember this.  The only thing I can think of is that you are running a French version of Windows, which _might_ be doing something funny with the paths?  I just tested the mod, and it worked fine on my system, but I'm using an english system.

I'll think about this, see if I can figure out something to help.

Is it only with a few mods, or is it with all that use the toolbar?

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

I'll think about this, see if I can figure out something to help.

Nice, thank you :) 

1 hour ago, linuxgurugamer said:

French [...] which _might_ be doing something funny with the paths?

That would make sense,  maybe it adds the word "cheese" in every path ? who knows :D

1 hour ago, linuxgurugamer said:

Is it only with a few mods, or is it with all that use the toolbar?

Yeah it happens consistently with certains mods only : on the top of my head : Notes, persistent rotation, science alert, kerbal launch failure (not sure), FMRS.

Also for eventual comparison to help figure things out : mods that I have in toolbar, which never had the issue :

KAC, mechjeb, trajectories, continuing flight plan, scansat, DPAI, TACfuelbalancer, KAC, planetshine, better time warp, toolbar controller, Antenna helper, waypoint manager, transfer window planner, slingshotter, clear imput locks, ship manifest, bon voyage.

Edited by kurgut
Link to comment
Share on other sites

9 hours ago, kurgut said:

Yeah it happens consistently with certains mods only : on the top of my head : Notes, persistent rotation, science alert, kerbal launch failure (not sure), FMRS.

Also for eventual comparison to help figure things out : mods that I have in toolbar, which never had the issue :

KAC, mechjeb, trajectories, continuing flight plan, scansat, DPAI, TACfuelbalancer, KAC, planetshine, better time warp, toolbar controller, Antenna helper, waypoint manager, transfer window planner, slingshotter, clear imput locks, ship manifest, bon voyage.

If I got you a special build, of one of those mods, would you be willing to run it and then send me the output?  I want to write some data to the log file to see if I can track this down.

Unfortunately, the list of mods you list which work includes a number of mine which work the same way (ie:  internal code), so there doesn't (yet) seem to be a pattern.

If you are, then let me know which one it is most consistent on, and I'll make a special build for you

Link to comment
Share on other sites

43 minutes ago, linuxgurugamer said:

If I got you a special build, of one of those mods, would you be willing to run it and then send me the output?  I want to write some data to the log file to see if I can track this down.

What do you mean by special build ? I guess you want me to send you my KSP.log with this particular mod installed ?

Also btw would the toolbarsettings.dat file help you in any way for debugging ?

43 minutes ago, linuxgurugamer said:

If you are, then let me know which one it is most consistent on, and I'll make a special build for you

Then Notes mod is definitely consistent for the issue. Persistent rotation too (spams error which induce lag, but the icon doesn't turn purple tho).

Edited by kurgut
Link to comment
Share on other sites

21 minutes ago, kurgut said:

What do you mean by special build ? I guess you want me to send you my KSP.log with this particular mod installed

I'll make a special build of the mod and send it to you for testing

22 minutes ago, kurgut said:

Then Notes mod is definitely consistent for the issue

If that's the Notes made by Hashashin & Zer0Kerbal, that's not my mod

22 minutes ago, kurgut said:

Persistent rotation too (spams error which induce lag, but the icon doesn't turn purple tho).

I'll do this one.

Link to comment
Share on other sites

21 hours ago, linuxgurugamer said:

I'll do this one.

Just in case : FMRS actually does it every time too, AND, the icon turn purple too. Which does not happen with persistent rotation. So you might get more about it.

Edited by kurgut
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...