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

[BUG] KSP fails to load when launched by VS Code unless VS Code is ran as administrator. #150

Open
kaufman-bryce opened this issue Apr 28, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@kaufman-bryce
Copy link
Contributor

Describe the bug
When launching KSP via 'KOS: Start Kerbal Space Program', KSP loads files at a drastically reduced rate. During loading, KSP seems to stall and no further loading progress is made. In older KSP versions (1.3.1) this stall occurs when the loading bar is full. On newer versions (1.8.1 and 1.9.1), this stall occurs when the bar is ~75% full. The backgrounds continue to cycle, as does the loading text, but no further loading occurs and the main menu is never reached. Somehow, it also fails to produce it's own log file when called from VS Code as well, so I'm not sure how to troubleshoot.
Works fine if VS Code is launched as administrator. Game loads at full speed, reaches menu, performs as normal.

To Reproduce

  1. Configure "kos-vscode.kerbalSpaceProgramPath" to point to desired location (or don't, doesn't seem to matter)
  2. While editing a .ks file, open command palette and select the command to start KSP.
  3. Observe slower than normal file loading
  4. Get stuck after all files have loaded, have no log to read.
  5. After closing the stuck KSP, open it by hand via Windows Explorer. Loads quickly, reaches menu, writes log.

Expected behavior
KSP launches the same as if it were manually launched.

Editor (please complete the following information):

  • OS: Windows 10
  • Editor: vscode, system install
  • Extension Version: 1.1.2

Additional context
I have tried multiple versions of KSP, in custom directories on multiple drives and the default Steam install. This issue occurs with all of them. All of them load successfully when launched normally (via Windows Explorer or a shortcut).
I have checked the Event Viewer (no events), double-checked file permissions. The only Extension Host log item in VS Code for your extension is it's initial activation for that session, and the only contents of it's own log are warnings about references to other KS files in my kerboscript files that it can't resolve, all of which are valid errors. Those .ks files are, in fact, absent.

@jonnyboyC
Copy link
Owner

I'll have to fire up my windows machine to investigate. Likely it has to do with node's spawn method in this file https://github.com/jonnyboyC/kos-language-server/blob/master/clients/vscode/src/commands/kspProvider.ts. I'll try to investigate both the admin needs as well as the slow loading times.

@jonnyboyC jonnyboyC added the bug Something isn't working label Apr 28, 2020
@kaufman-bryce
Copy link
Contributor Author

I suspect the slow load time is the same issue as being unable to write it's own log file, and that it is caused by some sort of permission error. I just don't know enough about Node to be helpful in diagnosing. I think I remember seeing a forum thread years and years ago with a similar issue and the root cause was permissions, but I can't seem to locate it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants