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

Discussions about using Windows guests in VirtualBox.

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

Postby osaka » 13. Nov 2016, 21:37

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.
Attachments
VBoxManage_showvminfo.txt
vbox info
(5.64 KiB) Downloaded 23 times
VBox.log
virtualbox log
(111.33 KiB) Downloaded 20 times
error.png
windows error
error.png (9.38 KiB) Viewed 6164 times
Last edited by osaka on 27. Dec 2016, 13:49, edited 2 times in total.
osaka
 
Posts: 3
Joined: 13. Nov 2016, 20:54

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

Postby BillG » 14. Nov 2016, 07:42

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 .
Bill
BillG
Volunteer
 
Posts: 4114
Joined: 19. Sep 2009, 04:44
Location: Sydney, Australia
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 7,8,Server

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

Postby mpack » 14. Nov 2016, 11:13

Google for "sfmDxGetSwapChainStats".
mpack
Site Moderator
 
Posts: 29004
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

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

Postby socratis » 14. Nov 2016, 12:21

Or even better, since this is a Java app, run it natively on OSX?
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 23200
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

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

Postby osaka » 14. Nov 2016, 16:06

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
Attachments
sfcdetails.txt
I used === findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt" === to filter the original output
(65.61 KiB) Downloaded 62 times
osaka
 
Posts: 3
Joined: 13. Nov 2016, 20:54

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

Postby osaka » 27. Dec 2016, 13:39

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   Expand viewCollapse view
  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!
osaka
 
Posts: 3
Joined: 13. Nov 2016, 20:54

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

Postby socratis » 27. Dec 2016, 14:55

Thanks for sharing!

Moving this from "OSX Hosts" to "Windows Guests" since the host is not relevant.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 23200
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

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

Postby simulated_tea » 13. Sep 2017, 17:36

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.)
simulated_tea
 
Posts: 2
Joined: 13. Sep 2017, 17:32

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

Postby mpack » 13. Sep 2017, 17:45

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.
mpack
Site Moderator
 
Posts: 29004
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

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

Postby simulated_tea » 10. Oct 2017, 17:04

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.)
simulated_tea
 
Posts: 2
Joined: 13. Sep 2017, 17:32

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

Postby socratis » 10. Oct 2017, 17:13

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).
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 23200
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

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

Postby Leprechaun » 22. Mar 2018, 07:37

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.
Leprechaun
 
Posts: 2
Joined: 22. Mar 2018, 07:35

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

Postby mpack » 22. Mar 2018, 10:47

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.
mpack
Site Moderator
 
Posts: 29004
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

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

Postby Leprechaun » 26. Mar 2018, 07:33

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
Leprechaun
 
Posts: 2
Joined: 22. Mar 2018, 07:35

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

Postby MichaelB12 » 10. Apr 2018, 17:08

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.
MichaelB12
 
Posts: 3
Joined: 10. Apr 2018, 17:00

Next

Return to Windows Guests

Who is online

Users browsing this forum: No registered users and 12 guests