Skip to content
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

Could not create swapchain! Error Code: The operation completed successfully. (0x00000000) #214

Open
Chicken-Bones opened this issue Oct 14, 2024 · 1 comment
Labels

Comments

@Chicken-Bones
Copy link

Chicken-Bones commented Oct 14, 2024

Requesting some help from a tML issue that has affected a number of users. I don't have a reproduction myself, but I'm having difficulty ascertaining the cause of the error.

[19:15:52.051] [Main Thread/INFO] [tML]: High DPI Display detected: setting FNA to highdpi mode
[19:15:52.053] [Main Thread/DEBUG] [FNA]: Querying linked library versions...
[19:15:52.054] [Main Thread/DEBUG] [FNA]: SDL v2.28.2
[19:15:52.054] [Main Thread/DEBUG] [FNA]: FNA3D v23.10.0
...
[19:15:53.228] [Main Thread/INFO] [FNA]: SDL Video Diver: windows
[19:15:53.228] [Main Thread/INFO] [FNA]: FNA3D Driver: D3D11
[19:15:53.228] [Main Thread/INFO] [FNA]: D3D11 Adapter: NVIDIA GeForce RTX 4060 Laptop GPU
[19:15:53.277] [Main Thread/ERROR] [FNA]: Could not create swapchain! Error Code: The operation completed successfully. (0x00000000)
[19:15:53.295] [Main Thread/WARN] [tML]: Silently Caught Exception: 
System.InvalidOperationException: Could not create swapchain! Error Code: The operation completed successfully. (0x00000000)
   at Microsoft.Xna.Framework.FNALoggerEXT.FNA3DLogError(IntPtr msg)
   at Microsoft.Xna.Framework.Graphics.FNA3D.FNA3D_CreateDevice(FNA3D_PresentationParameters& presentationParameters, Byte debugMode)
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, PresentationParameters presentationParameters)
   at Microsoft.Xna.Framework.GraphicsDeviceManager.Microsoft.Xna.Framework.IGraphicsDeviceManager.CreateDevice()

We're still running FNA3D 23.10, so I imagine it's going through D3D11_INTERNAL_LogError. The only way I can see to get an error code of 0 is if ID3D11Device_GetDeviceRemovedReason is returning 0 but I don't have any ideas from there

if (res == DXGI_ERROR_DEVICE_REMOVED)
{
	res = ID3D11Device_GetDeviceRemovedReason(device);
}

Original issue: tModLoader/tModLoader#4417

@flibitijibibo
Copy link
Member

Working backwards is probably the way to go - figuring out why it calls the error reporting function will help a bit, the HRESULT is getting absorbed by this... really odd error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants