Jump to content

[DEV/KSP core] make KSP less vulnerable to plug-in exceptions


Recommended Posts

Hi,

as it is now, KSP is very weak against plug-in mess and particulary when exceptions occurred in a loop (or what is look to be in a loop as there is a bunch of exception in log repeated many time in a consistent pattern) and it makes the entire game almost freeze, slow down terribly (FPS might be close to 1 or even lower).

KSP itself should not behave like this, is like some apps which crash entirely because of one single tiny plug-in crash (example: 3ds max 2015/PNG plug-in on some export of texture), it should behave mostly like better apps like the Gimp which is able to survive a plug-in crash.

It would be a lot more better than some "half done" features like 0.23 career mode IMHO.

Regards.

Link to comment
Share on other sites

If a plugin is causing rapid exceptions like this (presumably when the plugin is called for each frame) then the plugin needs fixing, not KSP. Adding any kind of mechanism to better protect against plugin bugs will make the game run slower and it is not really worth it.

I also think that your criticism of 0.23 career mode is totally unjustified. A lot of people have quite a lot of fun playing it and it is definitely required for scope completion whereas virtually pointless (and probably performance affecting) protection against mod bugs is not...

Link to comment
Share on other sites

If a plugin is causing rapid exceptions like this (presumably when the plugin is called for each frame) then the plugin needs fixing, not KSP. Adding any kind of mechanism to better protect against plugin bugs will make the game run slower and it is not really worth it.

I also think that your criticism of 0.23 career mode is totally unjustified. A lot of people have quite a lot of fun playing it and it is definitely required for scope completion whereas virtually pointless (and probably performance affecting) protection against mod bugs is not...

Here here.

Link to comment
Share on other sites

If a plugin is causing rapid exceptions like this (presumably when the plugin is called for each frame) then the plugin needs fixing, not KSP. Adding any kind of mechanism to better protect against plugin bugs will make the game run slower and it is not really worth it.

I also think that your criticism of 0.23 career mode is totally unjustified. A lot of people have quite a lot of fun playing it and it is definitely required for scope completion whereas virtually pointless (and probably performance affecting) protection against mod bugs is not...

I'm thinking that if the mechanism can be done in a manner that doesn't cause issues. Better isolation and abstraction sockets would be nice. They have almost no impact on newer versions of Unity. This would reduce issues with version compatability as well as reducing platform-specific bugs.

Reporting problems with mods to the user with a popup and allowing the user to block future notices would be a nice feature. (Default notice should depend on mode. In strict mode, activated in the debug menu, the notice should trigger on the first non-fatal exception. In normal mode it should only be triggered on a string of 8 or more non-fatal exceptions or one fatal exception from the mod. This number, of course, doubles each time the notice is blocked.)

Additionally on the topic of reducing impact of faults, in mods or otherwise, performance impact on logging repeat messages could be reduced by improved by combining repeat entries, options to select what to log (Fatal Errors, All Errors, Warnings, Debug or Trace) on each catigory of notice.

Setting it to just log fatal errors could really improve performance while still providing the basic information needed to diagnose the problem. If you need more information about a problem, you can always increase it to warning or debug, depending on the issue. It is rare that you would need to set anything to trace, other than possibly VAB bugs. (Yeah we all know those!)

Additionally, having an option to place a substantial (64KB-1MB) buffer the log file would allow you to reduce filesystem writes, while risking loss of log entries in the event of a crash. Such a buffer uses almost no memory and could greatly accelerate the game for normal play, and if you are trying to diagnose a crash, and aren't getting a full log, you should turn this off.

Also I agree on the carreer mode. It's pretty good considering that it is incomplete. However, I look forward to having actual game assigned missions, instead of just trying to gather science.

Link to comment
Share on other sites

As a creator of a mod that got stuck causing exactly this issue during development, I can see where you are coming from. Yet at the same time I have to disagree with you.

(For the record, when you mess up KSP's save/load routine, you get some very interesting Kraken summonings.)

The reason being is I can't see how Squad could make KSP more resistant to plug-in problems without restricting the access we (the community) currently have to make pretty much any mod we want.

To create the sort of resistance you are talking about to a plugin screwing up would require Squad to stick a filter between the game engine and mods and only allow sanitized data back and forth which means Squad would have to specifically allow, and set limits on, what modders could do.

Even just detecting an error is tricky, what qualifies as an error? One of the krakens I summoned was with a single error that KSP "recovered" from the next update pass and was able to continue as normal. No further error messages were being logged, everything was functioning normally as far as the KSP engine was concerned.

The fact that my rover I had just launched to at the KSP launchpad for testing was on a self-propelling fast-track to solar orbit meant the error was game breaking, but as far as KSP was concerned there was no error present.

I suppose what I'm trying to say that was you are asking for is technically possible, but in my opinion it is not worth Squad's time investment to setup, not worth the loss of access to the game for mods that I expect would be required, and with how responsive mod creators are to fixing issues with there mods, I don't see the sort of hardening you are asking for as being worth it.

D.

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...