Jump to content

D3D9 error on startup


Recommended Posts

I am running KSP64 on Windows 10 and have been forever with no issues.

Patch Tuesday arrived last week (April 11 2017) and along with it the Windows 10 creator edition.   Ever since that update, KSP crashes almost immediately on startup with an invalid exception in D3D9.dll. KSPx64 runs fine when I force D3D11 from the command line.   

I've done a few things:
- forced a re-install of DirectX9C  (using the offline installer - the web installer said no updates were necessary)
- updated to the 381.x Nvidia drivers (no change)
- DXdiag passes with flying colors
- my older games that run in DX9 run just fine (eg, Silent Hunter) - only KSP blows up
- KSP runs fine in DX11 mode but has some artifacts with some of the mods I want to use
- I deleted Kerbal from the Steam game page, deleted the KSP folder completely, and re-installed from Steam - same issue (emphasis here that this happens with no mods)

 

My current specs:

I7 3770K
GTX 780 TI video
16gb memory
 

I'm a bit challenged.  Next thing I'll try is to install Unity 5.2.x and see if that fixes the problem.  I have an old version of Unity I used to have for KSP dev prior to 1.2.2 do perhaps I have some DLL hell created through that post patch Tuesday.  I'm also going to put a new computer build together soon anyway so hopefully that will clear that up but any words of wisdom appreciated!
 

Edited by ziporama
Link to comment
Share on other sites

Sal_Vager user to explain that previous major updates to Windows 10 would replace any third-party graphics driver with a Microsoft-supplied basic version of said driver. I figured that was to make sure the installation of the OS upgrade went smoothly; Builds 1511 and 1607 were effectively new installations treated like the original in-place upgrade from 7 or 8.

My own experience with those, is once you did the major upgrade, Windows Update would then fetch a vendor-supplied driver for your graphics card to replace the Microsoft-supplied one. In my case, NVidia's Windows Update driver included an updater of its own to get the latest WHQL drivers from their site. So that would be the next step I'd suggest: Get an updated driver from your card or chipset's manufacturer after completing the Build 1703 upgrade. You did this step already.

I'll try to verify this behaviour at home later today. My own PC hasn't tried to apply the Build 1703 upgrade yet, but I can run KSP in a virtual machine to test the new build. (Yes I can; my VMware Player has 3D graphics support enough to run DX9 games, and I demoed KSP in one on my channel.)

Edited by Gordon Fecyk
Link to comment
Share on other sites

I applied the most current Nvidia driver (381.x) and reinstalled Directx9c - same behavior. 
I suspect this is more related to an older version of Unity than to KSP as it's a crash on startup - so that is the Unity player doing that.
Interestingly, I don't have that issue on my laptop, which also went through the creator update, but that has completely different hardware.

Good news is I'm not stuck because I can force it as a D3D11 start, and all my older Dx9 titles run just fine although I think none of them are based on Unity.  The other thing is I'm building a new computer this week so that will have a fresh everything on it.

I don't remember if there's a config file the Unity player can use to set  any default startup options so I don't have to pass the command line to KSP64.exe every time as a batch file.

E

Link to comment
Share on other sites

45 minutes ago, ziporama said:

I don't remember if there's a config file the Unity player can use to set  any default startup options so I don't have to pass the command line to KSP64.exe every time as a batch file.

How about a shortcut to ksp64.exe then? Right-click on it, pick Create Shortcut. Then in the shortcut's properties you can tack on any command line arguments at the end. A little more elegant than a batch file, but the same end result.

Link to comment
Share on other sites

2 hours ago, Gordon Fecyk said:

Sal_Vager user to explain that previous major updates to Windows 10 would replace any third-party graphics driver with a Microsoft-supplied basic version of said driver.

Popping online!

Some minor updates caused the driver to either fail to load or somehow be uninstalled, leaving you with the built-in MS vga driver, though this is easy to spot as you lose the ability to do anything 3D.

@ziporama, I suggest you open your output_log.txt (in KSP_Data) and look to see if Unity is telling you why it isn't working.

It should be short so you could paste the contents here or use pastebin.com

Link to comment
Share on other sites

4 hours ago, sal_vager said:

Popping online!

Some minor updates caused the driver to either fail to load or somehow be uninstalled, leaving you with the built-in MS vga driver, though this is easy to spot as you lose the ability to do anything 3D.

@ziporama, I suggest you open your output_log.txt (in KSP_Data) and look to see if Unity is telling you why it isn't working.

It should be short so you could paste the contents here or use pastebin.com

The error is an exception in d3d9.dll.  I'll include the log file when I get home.   

No drivers were uninstalled because (1) other D3D9 games work just fine (2) I took the steps of forcing a re-install of D3D9C and re-installed the game and updated Nvidia drivers.  I assume that the setup program will check for necessary dependencies and re-install them as needed.   I also note that the DX web installer from MS indicates "all files are up to date" so no updates are needed from the Microsoft DX installer (web installer).  The manual install I forced was through the manual installer (not the web installer).

Will post the log file as soon as able.

Edited by ziporama
Link to comment
Share on other sites

I managed to install Windows 10 Build 1703 on my virtual machine test bed. The test results are in these log files.

I can't reproduce the problem. As a base line, I tested KSP 1.2.2 x64 under Build 1607 first, with the same environment used in the "Yes, Windows 10 can run KSP" video. The 1607 logs reported a VMware SVGA 3D driver for Direct3D 9 with both -force_d3d9 and -force_d3d11 switches, as VMware Player does not support DirectX 11. The 1703 logs reported similarly. Both had similar performance, that is: potato-like, but passable like an integrated graphics chip. I wouldn't install Scatterer on this VM.

I can only guess at a driver problem, as the DX9 runtime included in Win10 1703 seems to be the same as that included in Win10 1607.

Link to comment
Share on other sites

I've got the same problem as OP. Running:

* W10 64 bit, build 1703

* i7-4770, RX480

KSP 64 bit crashes immediately on startup application launch. KSP 32 bit runs fine, but can't handle the mods I need to continue my career save. I've tried graphics driver reinstallation and KSP reinstallation (sans mods).

 

error log - https://pastebin.com/4C9gy1WC

output log - https://pastebin.com/iPV2z1nV

 

EDIT: Able to force KSP 64 bit to run by using -force-d3d11

Edited by space-is-hard
clarity, bolding of workaround
Link to comment
Share on other sites

I need to make lots of backups before I dare to put Build 1703 on my physical computer and reproduce this.

One thing I'm noticing is the presence of the Steamworks Overlay in both of the crash log files. Are you two launching KSP_x64 from within the Steam client with the added parameters, or outside of the Steam client? My very first launch of KSP 1.0.5 within Steam broke the map view terribly, so I've been launching it directly ever since.

Link to comment
Share on other sites

44 minutes ago, Gordon Fecyk said:

One thing I'm noticing is the presence of the Steamworks Overlay in both of the crash log files. Are you two launching KSP_x64 from within the Steam client with the added parameters, or outside of the Steam client?

64 bit was broken regardless of where I launched from. This included Steam, CKAN's built-in launcher, and the plain old KSP_x64.exe. I used Steam to add the -force-d3d11 launch option to get it working again.

Link to comment
Share on other sites

7 hours ago, space-is-hard said:

64 bit was broken regardless of where I launched from. This included Steam, CKAN's built-in launcher, and the plain old KSP_x64.exe. I used Steam to add the -force-d3d11 launch option to get it working again.

In my case, either/or.  Crash on startup when running from within Steam, or directly via the .exe, same error, instant error log before entering graphics mode (so, entering the loading screen).    What's interesting is that it was working fine before the Windows patch, my only change made was the (automatic) install of the Creator edition at patch Tuesday.  

I did try a couple of video driver versions (376.x drivers and the 381.x drivers from Nvidia) - no change.
Changed video cards (just upgraded this week) - same problem (going from a GTX 780 to a 1080).
I re-installed DX9C using the MS offline installer (that wasn't easy to find on the MS web site - DX9 is very Windows XP/7), and just yesterday installed it again because it came with my new video card utility.  

All my other D3D9 apps work just fine so i don't think it's my DX9C stack that's causing the issue.  If I had a problem there, I assume I'd see issues with that.

I yet have to try to run in admin mode to see if that makes a difference in case the new patch changed things with UAC.

I'm still puzzled because it was my understanding that the Unity 5.x player would automatically start in DX11 mode if DX11 was available (my system goes all the way to DX12 obviously), so I fail to understand why it even attempts to start DX9 mode.  That seems to be what the Unity docs say, yet doesn't happen on my box, so is KSP forcing the player in DX9 mode by default, hence the requirement to force DX11 from the command line?

Up next, I'm building either today or tomorrow, UPS delivery permitting, a new Ryzen based box (can't wait!) and I'll report back as to what sort of trouble I get into.  That obviously will benefit from a completely fresh install of Windows 10 creator edition and eliminate any "historical" baggage.

A quick google search indicates no particular known issues with the creator edition and DX9. 
 

Edited by ziporama
Link to comment
Share on other sites

@ziporama can you check your registry at HKEY_CURRENT_USER/Software/Squad/Kerbal Space Program/ ?

There may be screen values that exceed your monitors resolution, if you delete those keys and the settings.cfg in the KSP folder it should start in a 1280x720 window without needing -force-d3d11

Link to comment
Share on other sites

1 hour ago, ziporama said:

I yet have to try to run in admin mode to see if that makes a difference in case the new patch changed things with UAC.

My potato virtual machine had UAC and hardware DEP enabled on both 1607 and 1703, plus my usual SRP that I do on 10 Pro. Still ran. I don't believe UAC has an impact, or your other D3D9 games would have failed similarly. Steam addresses UAC by making the Common folder read/write for the BUILTIN\Users group.

The VMware SVGA 3D driver is pretty generic though. It doesn't try to permit direct access to GPU hardware, so I tried again with an old AMD Athlon II X4 I found in a closet. That system had a Radeon HD 4250 graphics chip. This is potato computing at its finest, and it plays ksp_x64 on build 1703 without error. I'll try once more with a Core i3 and more modern Radeon card when I get time today.

So if nothing else, a clean installation might solve whatever's causing this.

Link to comment
Share on other sites

1 hour ago, sal_vager said:

@ziporama can you check your registry at HKEY_CURRENT_USER/Software/Squad/Kerbal Space Program/ ?

There may be screen values that exceed your monitors resolution, if you delete those keys and the settings.cfg in the KSP folder it should start in a 1280x720 window without needing -force-d3d11

I will try that.  I have a couple of monitors, one regular HD, the other WQHD - the primary monitor is WQHD.  Perhaps that confuses it.  

 

Thanks for the tips guys, I appreciate it.

I think at this point since I'm reinstalling Windows on the new build from scratch, I'll go that route and see what happens next.  Nothing ever goes wrong with new hardware, especially completely new hardware like the Ryzen AM4 platform on a new release of Windows with the BIOS still changing.  I must like self inflicted wounds.

Link to comment
Share on other sites

On ‎4‎/‎19‎/‎2017 at 9:07 AM, ziporama said:

Nothing ever goes wrong with new hardware.

That's what I thought when I bought one of Intel's last desktop boards ever, their DZ87KLT-75k, back in 2014. Of course I do a lot of strange things; RAID-0 with four HDDs and such. Learned not to use anything but the first four SATA ports for RAID arrays. But hell yes things go wrong with new hardware, especially when one's been out of the PC building game for a decade.

That Z87 board's since been rebuilt into a new PC by pros, just missing storage and I'm ordering that soon. I'll provide notes later on to see how Build 1703 and KSP 1.2.2 x64 behave on it, assuming they do.

Link to comment
Share on other sites

@ziporama, @space-is-hard, you both have RivaTuner stuff hooking into memory, memory hooks from many programs are known to cause trouble and RivaTuna appears to be one of them.

From the output_log.txt

C:\Program Files (x86)\RivaTuner Statistics Server\RTSSHooks64.dll:RTSSHooks64.dll (0000000180000000), size: 225280 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\RivaTuner Statistics Server\RTSSHooks64.dll'

Can you test with RivaTuner off?

Link to comment
Share on other sites

1 hour ago, sal_vager said:

@ziporama, @space-is-hard, you both have RivaTuner stuff hooking into memory, memory hooks from many programs are known to cause trouble and RivaTuna appears to be one of them.

From the output_log.txt


C:\Program Files (x86)\RivaTuner Statistics Server\RTSSHooks64.dll:RTSSHooks64.dll (0000000180000000), size: 225280 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\RivaTuner Statistics Server\RTSSHooks64.dll'

Can you test with RivaTuner off?

That's a good question.  RivaTuner server comes these days with MSI Afterburner 4.3 - it's a usual monitoring / tuning for most video cards and I use it for tuning but also for grabbing screenshots or video.   I had AB installed before the April 11 Windows 1703 "Creator" patch without issue with KSP.    I found an old error report with Unity where 3.x would bomb on initialization if you have dual monitors (which I do) .  The issue is fixed by disabling one of the monitors.  Of course I can't test that because I just re-installed windows on a new build I just put together yesterday -  still installing software.  I didn't get to install Kerbal yet, will do so soon (tm).   I'm completely convinced something in the Windows patch is confusing Unity, wouldn't be the first time, and very much part of life of being in the bleeding edge of Windows service packs (not that they are called SPs anymore).  I also note that KSP is not on the most current version of Unity - this may have something to do with it as well.  Live and learn I guess.

Will report back as soon as I get KSP installed - speaking of bleeding edge - this will be on a Ryzen build.  Nothing will possibly go wrong...

Link to comment
Share on other sites

Oh Hell. Some third-party overclocking tool. No wonder I couldn't reproduce the problem.

Guru3D tells me RivaTuner's outdated and has been replaced with Afterburner. I don't use it normally myself, but I'll try it on this ATI test bed I found. I use an MSI-built GTX 760 card but I don't install any of MSI's tools.

Edited by Gordon Fecyk
Link to comment
Share on other sites

1 minute ago, Gordon Fecyk said:

Oh Hell. Some third-party overclocking tool. No wonder I couldn't reproduce the problem.

Guru3D tells me RivaTuner's outdated and has been replaced with Afterburner. I don't use it normally myself, but I'll try it on this ATI test bed I found.

Well some better news.  I manually uninstalled the part of Afterburner that is RivaTuner Statistics Server, and KSP ran, so it's specific to the statistics server piece looks like.   Note that I'm running the current 4.3.0 version from the MSI site (from late last year).  What's very odd is I didn't have that issue with KSP before the Creator edition (so with RivaTuner Stat server installed).  Must be something with the new patch that causes that.

Link to comment
Share on other sites

Just now, ziporama said:

What's very odd is I didn't have that issue with KSP before the Creator edition (so with RivaTuner Stat server installed).  Must be something with the new patch that causes that.

This would be worth reporting to the Guru3D folks or to MSI. They'll want to fix their statistics server to work with Build 1703.

Glad to see the root cause discovered, and +1 to Sal for finding it.

Link to comment
Share on other sites

20 minutes ago, Gordon Fecyk said:

Oh Hell. Some third-party overclocking tool. No wonder I couldn't reproduce the problem.

Guru3D tells me RivaTuner's outdated and has been replaced with Afterburner. I don't use it normally myself, but I'll try it on this ATI test bed I found. I use an MSI-built GTX 760 card but I don't install any of MSI's tools.

RivaTuner isn't the overclocking software, it's only for monitoring; Afterburner does all the overclocking. I use it to give me a HUD showing FPS, GPU utilization, etc that can be turned on and off in any game via the scroll lock key.

Link to comment
Share on other sites

46 minutes ago, Gordon Fecyk said:

This would be worth reporting to the Guru3D folks or to MSI. They'll want to fix their statistics server to work with Build 1703.

Glad to see the root cause discovered, and +1 to Sal for finding it.

To confirm, re-installing RivaTuner statistics server (which is included with Afterburner 4.3.0 during the install process) - causes KSP 1.2.2 x64 to crash on startup.  So far it only seems to happen with build 1703 of Windows 10 x64 "creator update" edition released April 11, 2017.


Afterburner is unable to monitor frame rates or frame times without RivaTuner installed - and I need that for the testing I do for other games (I'm in a beta program and it's a must-have for me).  I also use AB to record gameplay and/or take screenshots - also a requirement.

The workaround is thus: (a) force DX11 mode via the command line, or (b) uninstall RivaTuner statistics server (which will impact functionality in Afterburner).

The fact this occurs only with KSP and not other titles points to an issue with Unity player as used by KSP and RivaTuner.  Cities Skylines, also a game based on Unity, doesn't have this issue (runs just fine with Rivatuner SS installed).  Not sure if that uses the same version of Unity.

 

Edited by ziporama
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...