Page 1 of 2

error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3d9.d

Posted: 13. Nov 2016, 21:37
by osaka
Problem Description:
I am getting a windows popup error on many application:
"error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3d9.dll", please attached screenshot.

For example if i try to run "jalview.jnlp please check jalview org " i will Always get this error and the application will start in the background actually any jnlp file will generate that error, the error also appears with other applications not necessarily jnlp files and not even java related.

Another example: if I open any Powerpoint file and I click file menu , Powerpoint crashes!

Below is some information that I assume might be useful:

Machine :
Mac mini
Intel Core i7 CPU 3615QM
Ivy Bridge
2.3 GHz
8 GB 1600 MHz DDR3
Intel HD Graphics 4000 1536 MB
OS: OS X 10.11.6 Build 15G1108 (El Capitan)

Software:
I am running Oracle Virtual box Version 5.1.8 r111374 (Qt5.5.1) and my guest OS is windows 10 pro 64bit , Guest Addition installed is 5.1.8.


please let me know if you need any other logfiles.

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 14. Nov 2016, 07:42
by BillG
I doubt that VirtualBox has anything to do with that. It looks like a standard Windows error message to me. You probably need to replace the faulty dll .

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 14. Nov 2016, 11:13
by mpack
Google for "sfmDxGetSwapChainStats".

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 14. Nov 2016, 12:21
by socratis
Or even better, since this is a Java app, run it natively on OSX?

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 14. Nov 2016, 16:06
by osaka
I think I found my answer under "ticket 10071".

I have been using Virutalbox for a long time and was hoping that a fix for this message will be available in future releases, it seems that my problem started after 4.1.8.

I will copy and paste the section:
-------- start of copy ------
The "Your Direct X driver is corrupt or incorrect..." message displayed by VBox Guest Additions installer v 4.1.8 is intended behavior.
The problem is that pre-4.1.8 Guest Additions installer had a bug that caused removal of original system d3d9.dll and d3d8.dll files
We've fixed this issue with 4.1.8, however there is no way we can restore original system d3d files on the guest system
. So we've implemented a warning/error dialog that prints a warning and allows to continue for "basic" (aka XPDM) D3D support and prints err and does not allow to continue for WDDM D3D support since system d3d files is a must for it. And we added a step-by-step description of how to restore d3d files manually in the "Troubleshooting" section of VBox manual. So please refer to it for more detail on restoring the d3d files.
As for the pre-4.1.8 Guest Additions installer, it simple did not do any checks and allowed to continue (besides removing the original system files).
I think the reason Aero could work for you is because desktop window manager is using d3d10.dll rather than d3d9.dll for rendering on win7 (unlike Vista). But all d3d<=9 apps would be broken, at least for the "Aero on" case.
So it might be reasonable to allow Guest Additions + WDDM installation to continue on Win7 to allow using Aero on the broken system. We'll consider this option and get back to you.
I'll keep the bug open so far..
-------- End of copy ------
please refer to the original ticket for details.

I used " System File Checker tool to repair missing or corrupted system files " from Microsoft using sfc from command line screen as admin :
sfc /scannow


Attached (sfcdetails.txt) is the filtered output of the tool.

it is clearly mentioned that d3d9.dll and d3d8.dll files are corrupted,as per Microsoft kb 929833 "get a known good copy of the system file from another computer that is running the same version of Windows with your computer.", there are few steps you need to follow in order to replace a dll file mentioned, please refer to Microsoft kb 929833 for more details.

Thank you guys for your suggestions, I think the only way is to replace the dll file(s),

Regards

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 27. Dec 2016, 13:39
by osaka
Finally I have worked this out, please note that I am sharing a solution that worked for me, make sure you take backup of your system before you try anything out.

Steps that solved my problem:
1) from windows cmd privileged window run command below:

Code: Select all

  DISM /Online /Cleanup-Image /RestoreHealth 
for more details refer to https://answers.microsoft.com/en-us/win ... 5b60477a93.

2) step 1 provided me with the version of the dll file in mycase it was "Image Version: 10.0.10586.0" .

3) I downloaded d3d9.dll from https://www.dll-files.com/d3d9.dll.html, make sure you download the correct version.

4) replaced dll file by following the procedure mentioned in : https://www.dll-files.com/support/#2083358955

5) reboot

if it solves your issue, please leave a comment. Good Luck!

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 27. Dec 2016, 14:55
by socratis
Thanks for sharing!

Moving this from "OSX Hosts" to "Windows Guests" since the host is not relevant.

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 13. Sep 2017, 17:36
by simulated_tea
Hrmpf.

What do I do, if the version I seek (10.0.15063) is not (yet?) available in "the internet"?

Upload it myself from another Windows-Machine I happen to have lying around?

Btw, the fact, that this keeps coming back with VB updates suggests to me, that Guest Addition Installer breaks something when patching the d3d DLLs. (Or is build from an outdated souce.)

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 13. Sep 2017, 17:45
by mpack
simulated_tea wrote: Btw, the fact, that this keeps coming back with VB updates suggests to me, that Guest Addition Installer breaks something when patching the d3d DLLs. (Or is build from an outdated souce.)
I'm not surprised. It'll be one of the Direct3D9 guest OS DLLs which the GAs replace when 3D acceleration is enabled and the GAs are installed in the guest, as described in the user manual. However the exact error message is not because the DLL got replaced, it's because some other app is looking for a function that isn't required to exist. It isn't the DLL that's at fault, it's some app making invalid assumptions about the D3D9 implementation.

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 10. Oct 2017, 17:04
by simulated_tea
It isn't the DLL that's at fault, it's some app making invalid assumptions about the D3D9 implementation.
DirectX -> Microsoft
Lync -> Microsoft (which is the app failing on me)
(also had problems with Office365, but that seems to work again, lately...)

hmmm... on a superficial level, that's hilarious. :D

My .dll's showed up in the meantime, btw, and the variant described by osaka worked for me. \o/

Maybe worth mentioning that its only working as long as 3D / 2D Acceleration are kept off in the VBox Settings > Display.

(Which makes sense, since I practially undo whatever support GuestAdditions are trying to patch into those files.)

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 10. Oct 2017, 17:13
by socratis
simulated_tea wrote:Lync -> Microsoft (which is the app failing on me)
You didn't mention your VirtualBox version, but if this is 5.1.28, this is a known issue. The solution is to upgrade your Guest Additions to the latest 5.1.29 ones from the Test Builds area (https://www.virtualbox.org/wiki/Testbuilds).

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 22. Mar 2018, 07:37
by Leprechaun
Is there any way to fix this without using guest additions? I can't run guest additions (Long story). I've tried the DLL replacement, they don't have my version. I've tried other versions with no luck, as stated before I don't think it's the DLL, it seemed to be referenced incorrectly.

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 22. Mar 2018, 10:47
by mpack
The question is irrelevant if you aren't using the Guest Additions. The question is about the functions present (or not) in a GAs DLL.

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 26. Mar 2018, 07:33
by Leprechaun
Well I WAS using GA, which is where I assume the problem is coming from. But I can no longer install GA. I need to fix this more "manually".

Thank you

Re: error SfmDxGetSwapChainStats could not be located in dynamic link library C:\WINDOWS\SYSTEM32\d3

Posted: 10. Apr 2018, 17:08
by MichaelB12
Hi,

I have similar problem with Virtualbox 5.2.8 installed on Ubuntu 16.04 with Windows 10 guest.
All works fine expect Powerpoint (Office 365). When i open a presentation or just add image in a slide and click on File menu on the top.. it crash with the error SfmDxGetSwapChainStats d3d9.dll
So is unusable :(

What the solution to resolve that? or Workaround?

Thanks for your help.