Jump to content

Bug : Launching KSP and default initialisation


Recommended Posts

This is a old bug I though was related to mods, but it's not.

Symptoms

The DOVE stock plane should partially blow when ascending (or at least overheats). It didn't at all. I could get up to 1600m/s at 10000m (with another plane) without any sweat.

KER said the convection flux was 0.00W and never changed

(There could be other anomalies of such kind)

Failed search for the mod

First I though of a mod, or editing I did, that wrecked the squad files. I did a fresh install and removed Physics.cfg and tested it. I got heating.

Then I added mods and didn't get any... Then I restarted and did a fresh install, removing physics.cfg again and didn't get any heating. So mods weren't the cause. I even noticed the Physic.cfg wasn't recreated !

The truth is elsewhere

For some reason, on my second test run, the physics.cfg wasn't recreated. There is a dependency on HOW the game is started. I remembered that the first time I double clicked on KSP.exe in the KSP folder. I usually start the game from Windows 10 tile added by TILECREATOR app.

W10 TileCreator App call for a proxy that run the game. That proxy simply call the EXE BUT it doesn't set the starting folder.

I think that behaviour can be emulated by running the game from a command line in the console without being in the KSP folder.

Correct game start

- Shortcut (by default, the starting folder is set to the exe folder)

- Double click from KSP folder

- Use the uncooperative stock launcher

Incorrect game start

- Direct EXE launch (example command-line)

- Proxy or launcher that doesn't set the starting folder (such as TileCreator app & proxy)

My understanding of the bug

When the game starts, it checks for Physics.cfg. If it doesn't find it it creates it and initialise parameters.

THEN it forces the current folder despite of the starting folder (most software do that)

The game runs correctly because most of the files are initialised after the folder change, but not all of them.

BUG : the current folder is not changed soon enough so few parameter aren't initialize correctly causing few but hard to find bugs.

I hope that description helps.

Edited by Warzouz
Link to comment
Share on other sites

Thanks for your detailed explanation, it would have been pretty hard to get what the issue is without it.

But, at least IMO, you made a great description of a bug with TileCreator. It is the proxy set by TileCreator that should also set the folder path, exactly as it works with desktop shortcuts.

Could be KSP.exe could be modified to change to its install folder earlier (but please know, that file is actually a Unity 4.6.4 runtime exe, as such there may be very little Squad may do to change its behaviour).

Other software expect to access files from the folder the system has set for them, so would not work at all if started with the proxy.

Link to comment
Share on other sites

OK, I mentioned a discrepancy on how the game is started. If it's a unity feature, then it can't be fixed, but some heating data aren't initialized as other. This doesn't seem to be a Unity problem.

I found a workaround but this bug might cause other misbehaviour of KSP which is quite hard to find. There are many ways of starting apps, not only shortcut or double click.

Any software should always be sure of the folder it runs into (except if designed to run into various folder such as user data folders which is not the case of KSP). As a former developer myself, I always deal with folder even before loading parameters and data (language files are sometime an exception to deal with user error messages).

Of course this is not a major bug, but some test could be run on Unity 5 dev version.

Link to comment
Share on other sites

The trouble is that most software is installed, so the paths the program can use are set in the Windows registry and you are given a shortcut in the menu to start the program.

If you move most of these programs out of their install folder, such as from Program Files to the Desktop, they can fail to work correctly because they ask the registry for the absolute path to where their files are, but because they were moved they can't find them.

KSP from Steam and from GoG have an installer and provide a shortcut in your menu, but both of these are based on the store version of KSP that is simply unzipped to a location, if you move these versions of KSP from their install folder they will still work because they look for files relative to themselves, and don't need to ask the registry, but they also can't find their files if started from some other folder.

This also happens with other programs that aren't installed, they expect to find files relative to where they were started so you're usually asked to start the program.exe directly.

This is one reason why installers exist, as most people don't mess with their installed files, just use the shortcut in the menu and never know that this issue exists.

Users of mobile applications will run into this from time to time, though usually they just use the program.exe anyway.

As for the Dove, there were jet engine changes and the Dove is a spaceplane so it'd not be much use if it couldn't take some heat, as for KER, please make sure your mods are up to date, and don't rule out bugs in the mods as well.

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