Jump to content

Alt+Tab is NOT your friend (Game Crashing)


Brian444444

Recommended Posts

I am not a developer so keep in mind these observations are that of a layperson. This is intended to help others that may be experiencing similar problems and pulling their hair out like I was.

I started playing KSP when 1.0 was released and recently upgraded to 1.1. I know 1.1 is using a newer version of Unity than 1.0. This problem I am describing seems to be a Unity issue that plagued both versions. (Although for my money it seems to be far worse with the new version versus the older) I say this is a Unity problem and NOT a KSP problem because a simple Google search turns up mountains of information about this problem occurring in other places Unity is used and not exclusive to KSP.

So what is this issue? If you alt-tab out of a full screen game (To check email or what have you) then a crash in KSP is all but certain if you are mid-flight. It happens while not in flight as well but not with as much frequency. This can also occur if you minimize the game and lock the PC for any length of time.  Additionally, if running the game in a window and you Alt-Tab away from the window to another app this will happen as well although not with as much frequency. KSP crashes and produces the following in the output_log.txt file:

(There will be 100's if not 1000's of these entries)

HandleD3DDeviceLost
  HandleD3DDeviceLost: still lost
Skipped frame because GfxDevice is in invalid state (device lost) 
 

culminating in the following:

HandleD3DDeviceLost
  HandleD3DDeviceLost: needs reset, doing it
FullResetD3DDevice
ResetD3DDevice
dev->Reset
D3Dwindow device not lost anymore
Crash!!!

 

I use Windows 10 64x with a pile of RAM and have tested this issue on 64 bit as well as 32 bit and the end result is the same. As I said, this post is mostly intended to help other who may be having this problem with the workaround for me being NEVER minimize the game. But I optimistically am hoping maybe someone knows a work around or fix to this issue that would allow Alt-tabbing or minimizing the game.

 

Link to comment
Share on other sites

I've always run in windowed mode (uncheck fullscreen in the settings) and that seems to be pretty stable for switching to other windows.
There is an odd issue in KSP currently when switching away; if you are in map mode and your craft is rotating, when you select a window ie your browser, the map will rotate in the same way your craft is rotating.  Also happens with some in game windows from mods ie mechjeb interface. 

Link to comment
Share on other sites

First of all, run with -popupwindow in borderless window, it's always better. Second, a guess: you're on a laptop. This is a common issue in Win8+ on switchable graphics with latest Nvidia drivers, I've seen it in some games (not restricted to Unity), and usually setting Win7 compatibility mode helps as well (not for the sleep mode, afaik, that's probably an OS issue anyway, just like network connections' or VPN issues).

Edited by J.Random
Link to comment
Share on other sites

3 minutes ago, J.Random said:

First of all, run with -popupwindow in borderless window, it's always better. Second, a guess: you're on a laptop. This is a common issue in Win8+ on switchable graphics with latest Nvidia drivers, I've seen it in some games (not restricted to Unity), and usually setting Win7 compatibility mode helps as well.

Could you please explain to me in more detail how to do these 2 things exactly?

I run Win8 and Nvidia stuff too.

Many thanks in advance

Link to comment
Share on other sites

Thanks for the replies fellows. I will certainly try what you have recommended.

9 minutes ago, J.Random said:

First of all, run with -popupwindow in borderless window, it's always better. Second, a guess: you're on a laptop. This is a common issue in Win8+ on switchable graphics with latest Nvidia drivers, I've seen it in some games (not restricted to Unity), and usually setting Win7 compatibility mode helps as well.

You are correct about my using an NVidia card. However its a desktop and not a laptop. I use GTX 980.

Link to comment
Share on other sites

34 minutes ago, Dafni said:

Could you please explain to me in more detail how to do these 2 things exactly?

I run Win8 and Nvidia stuff too.

Many thanks in advance

1. If you bought KSP in Squad store, edit the shortcut properties, add -popupwindow in the "target" field and disable fullscreen in game options. If Steam, right-click on the game in library, Properties -> Set launch options, add -popupwindow.

2. Find KSP.exe or KSP_x64.exe, depending on which you're using (for Steam, easiest way is through the same Properties window, Local files tab -> Browse local files), right-click exe file, Properties -> Compatibility tab, set Run in compatibility mode and choose Windows 7.

29 minutes ago, Brian444444 said:

You are correct about my using an NVidia card. However its a desktop and not a laptop. I use GTX 980.

Desktop? No idea then, try -popupwindow. Never seen this error on desktop (except for sleep mode).

Edited by J.Random
Link to comment
Share on other sites

38 minutes ago, J.Random said:

1. If you bought KSP in Squad store, edit the shortcut properties, add -popupwindow in the "target" field and disable fullscreen in game options. If Steam, right-click on the game in library, Properties -> Set launch options, add -popupwindow.

2. Find KSP.exe or KSP_x64.exe, depending on which you're using (for Steam, easiest way is through the same Properties window, Local files tab -> Browse local files), right-click exe file, Properties -> Compatibility tab, set Run in compatibility mode and choose Windows 7

Thank you. I own the game from steam, however I move my KSP folders to a different location and maintain different installs of different versions. Is there a way to do this without having to go through steam? Sorry for bothering you and thanks again.

Link to comment
Share on other sites

1 hour ago, J.Random said:

1. If you bought KSP in Squad store, edit the shortcut properties, add -popupwindow in the "target" field and disable fullscreen in game options. If Steam, right-click on the game in library, Properties -> Set launch options, add -popupwindow.

2. Find KSP.exe or KSP_x64.exe, depending on which you're using (for Steam, easiest way is through the same Properties window, Local files tab -> Browse local files), right-click exe file, Properties -> Compatibility tab, set Run in compatibility mode and choose Windows 7.

Thank you. I only wanted to try one thing at a time to try and actually know what fixed it instead of guessing. That being said, I decided to run the x64 exe in compatibility mode to windows 7 first. That actually seems to be the magic bullet. I have launched a heavy launch refuel-er I have approximately 10x thus far and the problem is gone. This rocket was a guaranteed crash with each launch prior to this change if I alt-tabbed out of game. This is running full screen mode and not with a border-less window and alt-tabbing out about 50x while it reached solar orbit.

 

So far so good. Thank you for the very helpful suggestions everyone. If I have any problems going forward I am supremely confident that your suggestions of running -popupwindow will solve it for sure.

Link to comment
Share on other sites

2 hours ago, Dafni said:

Thank you. I own the game from steam, however I move my KSP folders to a different location and maintain different installs of different versions. Is there a way to do this without having to go through steam? Sorry for bothering you and thanks again.

Well, if you copied KSP elsewhere then it's basically the same as with Squad store's version. You already know where the copy is, you know which exe you launch, just create the shortcut if you didn't already and edit its properties.

Link to comment
Share on other sites

11 hours ago, J.Random said:

Well, if you copied KSP elsewhere then it's basically the same as with Squad store's version. You already know where the copy is, you know which exe you launch, just create the shortcut if you didn't already and edit its properties.

Thank you. Now I feel kinda dumb for not figuring this out myself  :blush:

Link to comment
Share on other sites

Can confirm the -popupwindow flag works great for me with my older nVidia card. Multiple monitors, KSP regularly backgrounded/minimised, never crashed because of it.

Crashes for other reasons, just not for this one :) 

Link to comment
Share on other sites

  • 4 weeks later...

I know I have problems in other games with alt-tab (a few others want to switch more KSP).  It seems to be more of an issue with win8, which is impressive since on of the big pushes it has it "full screen apps".  Note that I've had a nvidia card since before switching to win8, that combination is listed above as an issue.

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