Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Full) Database Reload on Module Manager (Alt-F11 menu) triggers KSPe's safeties, closing KSP #62

Open
Lisias opened this issue Oct 15, 2023 · 9 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request question Further information is requested

Comments

@Lisias
Copy link
Collaborator

Lisias commented Oct 15, 2023

As the tittle says, Full description is WIP.

See #17 (comment) for details for while.

@Lisias
Copy link
Collaborator Author

Lisias commented Oct 15, 2023

I don't know if this is a bug on KSPe or in Module Manager. Need to check the code and the intended use cases (and alternatives) to decide. (this one is going to be tricky…)

@Lisias Lisias added bug Something isn't working question Further information is requested labels Oct 15, 2023
@Lisias
Copy link
Collaborator Author

Lisias commented Oct 15, 2023

Damn. I don't even know if TweakScale and the Companions are safe to be reloaded this way!!!

@Lisias
Copy link
Collaborator Author

Lisias commented Oct 15, 2023

Note: I will not manage to walk from this one, restarting KSP takes longer on the users machines apparently (why not on mine? need to do some new benchmarks).

As a matter of fact, ideally only the new/changed parts should be reloaded - that would be a very useful use-case for the Welding tool. But first things first.

@Lisias
Copy link
Collaborator Author

Lisias commented Oct 15, 2023

Another note: how exactly this feature used to work on KSP 1.3 and 1.4 to 1.7.3 era? Reloading DLLs at that time invariably created a new App Domain, wasting lots of memory and making things pretty slower due Serialization…

@Lisias
Copy link
Collaborator Author

Lisias commented Oct 17, 2023

Yet another note to myself: I remember an add'on I stumble in 2018 that implemented IIRC hot loading of configs. Of course Mr Alzheimer passed around and I forgot the name and the features of that damned thing, but I clearly remember reading that code. As soon as I remember the name of the damned thing, I will edit this post and create a task for this.

@Nemipune
Copy link

Hello @Lisias !
First of all thanks for the amazing work and support you provide here, it's really appreciated !

I'm trying out the Welding mod and encountered the same assembly error (something being loaded twice) and was wondering if you managed to find/fix the issue ?

It's well beyond my competency and I have lots of mods installed, so restarting can take a while indeed (up to 3 minutes and I have a high end computer)

Wish you the best, thanks for the work, cheers

@Lisias
Copy link
Collaborator Author

Lisias commented Feb 11, 2024

Hi, @Nemipune .

I'm kinda screwed on this one because none of my assemblies are meant to be reloaded, and this is exactly what this feature is meant to do - reaload everything, including assemblies. I think that most assemblies on KSP neither, but - obviously - can't affirm that with 100% of accuracy.

Additionally, this reload will not reapply patches - so your rig would be inconsistent even if I manage to pull a stunt from the hat on the Assemblies.

I'm trying to understand how to load Parts and Meshes into memory (I already understand how to load textures). I think this would be the best way to go - creating a tool on MM to load the new Part into memory, instead of making the MM to reload everything in a half baked state.

I completely understand the annoyance a KSP cold restart can be - it's the reason I recommend having a side KSP instalment only to weld things, and then once satisfied copy the welded parts to the rig where they will be really used.

If by any means you became aware of how to load a Mesh and a Part into memory, please post the hint here and I will follow it.

@Nemipune
Copy link

Alright ! Thanks for the quick answer

I'm not sure I'll manage to find a solution on my own but I'll ask around, I have a few tech savvy friends that play the game, maybe something will come out of it.

Will keep you posted if I find anything, thanks again for the good work !

Cheers

@Lisias Lisias added the enhancement New feature or request label Mar 24, 2024
@Lisias
Copy link
Collaborator Author

Lisias commented Mar 24, 2024

Changed to enhancement, as I will built something on KSPe to load a PART from a config in runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants