-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Hello world crashes when creating swap chain. Access violation #847
Comments
With all those 'unknowns' you should enable the Microsoft Symbol Server |
Thanks for the tip. (I'm new to Windows programming.) Now copying the stack trace gives more info...
|
@walbourn I made some progress. It's the debug layer triggering it. If I comment out this line, the program runs. Not a show-stopper anymore, but I'd still like to fix it so I can use the debug layer. // debugController->EnableDebugLayer(); DirectX-Graphics-Samples/Samples/Desktop/D3D12HelloWorld/src/HelloTriangle/D3D12HelloTriangle.cpp Line 42 in b5f92e2
|
If you leave on the debug layer and look at the Debug Output Window, what is the warning that's firing? That's probably the thing that needs "Fixing". |
@rnikander , would you mind saving a crash dump and sending it to us so we can take a look? |
The "Output" window shows the lines below. (Show output from: "Debug" - is selected.) I thought I'd see some kind of message about a malformed parameter or something, but I don't.
|
@clandrew I tried creating that file and it's 220 MB, so I can't upload here. Here it is in a cloud drive: https://drive.google.com/file/d/13YY0GIMi6kjPMVnqslPO-577tiF8rhCE/view?usp=sharing Let me know if that works. I'm happy to try again if I didn't do it right. |
You somehow have a mismatch between the D3D12Core.dll and the D3D12SDKLayers.dll on your system. Try uninstalling and reinstalling the graphics tools feature-on-demand. |
Mm, interesting. It's a new laptop; I wonder if it came like that. I will need to research how to follow this advice, since I'm pretty new to Windows. Looks like this |
I tried something but the D3D12SDKLayers.dll got older, not newer, and the crash persists. I'll try again tomorrow. > ls \Windows\system32\d3d12*
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 11/27/2023 1:17 AM 166696 D3D12.dll
-a---- 11/27/2023 1:17 AM 2104608 D3D12Core.dll
-a---- 11/26/2023 11:07 PM 5423104 d3d12SDKLayers.dll
> DISM /Online /Remove-Capability /CapabilityName:Tools.Graphics.DirectX~~~~0.0.1.0
...
> DISM /Online /Add-Capability /CapabilityName:Tools.Graphics.DirectX~~~~0.0.1.0
...
> ls \Windows\system32\d3d12*
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 11/27/2023 1:17 AM 166696 D3D12.dll
-a---- 11/27/2023 1:17 AM 2104608 D3D12Core.dll
-a---- 5/6/2022 3:47 PM 5423104 d3d12SDKLayers.dll |
@jenatali Any advice on how to do this? I'm kind of new to Windows. I just tried to copy the |
I went to the Windows "Settings" app, and then Apps > Optional Features. The "Graphics Tools" are there. I uninstalled. I could see the DLL at |
Is your system using Windows Enterprise or Home or Professional? In 'managed enterprise' networks, the admin can control the Windows Update features (WSUS) and that may need a fix. |
It's Windows 11 Home. I ended up getting around this problem by using the Agility SDK. |
I can't get these samples to run on my new laptop. I get a crash here at the call to CreateSwapChain:
DirectX-Graphics-Samples/Samples/Desktop/D3D12HelloWorld/src/HelloTriangle/D3D12HelloTriangle.cpp
Line 94 in b5f92e2
The error message doesn't help me:
Any idea what that is? Or how I might debug it? I had sample code running on a Microsoft Surface, but when I tried this Asus Zenbook, this happens.
The stack trace in Visual Studio...
The text was updated successfully, but these errors were encountered: