Hi,
I am trying to get MonoGame running with a x64 Mono runtime on Windows. This is a default MonoGame project, nothing special.
It crashes though with the error below. By Googling around it seemed that some of the parameters of CreateSwapChain
weren’t correct. Analyzing them using the MonoDevelop Soft Debugger didn’t show anything invalid though, and the same code does works on 32-bit.
Then for the _com_error
some people posted about registering the .NET dll using the x64 RegAsm.exe, doing that didn’t help me either though.
So I hope someone has an idea where I should look.
PS. Which version of SharpDX doesn MonoGame use at the moment? (3.3)
First-chance exception at 0x00007FFE79EE8B9C in mono.exe: Microsoft C++ exception: _com_error at memory location 0x000000371BA9E260.
First-chance exception at 0x00007FFE79EE8B9C in mono.exe: Microsoft C++ exception: _com_error at memory location 0x000000371BA9E260.
Unhandled Exception:
SharpDX.SharpDXException: HRESULT: [0x887A0001], Module: [SharpDX.DXGI], ApiCode: [DXGI_ERROR_INVALID_CALL/InvalidCall], Message: The application made a call that is invalid. Either the parameters of the call or the state of some object was incorrect.
Enable the D3D debug layer in order to see details via debug messages.
at SharpDX.Result.CheckError () [0x00000] in <filename unknown>:0
at SharpDX.DXGI.Factory.CreateSwapChain (SharpDX.ComObject deviceRef, SharpDX.DXGI.SwapChainDescription& descRef, SharpDX.DXGI.SwapChain swapChainOut) [0x00000] in <filename unknown>:0
at SharpDX.DXGI.SwapChain..ctor (SharpDX.DXGI.Factory factory, SharpDX.ComObject device, SwapChainDescription description) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.CreateSizeDependentResources (Boolean useFullscreenParameter) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformInitialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Initialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor (Microsoft.Xna.Framework.Graphics.GraphicsAdapter adapter, GraphicsProfile graphicsProfile, Microsoft.Xna.Framework.Graphics.PresentationParameters presentationParameters) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.GraphicsDeviceManager.Initialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.GamePlatform.BeforeInitialize () [0x00000] in <filename unknown>:0
at MonoGame.Framework.WinFormsGamePlatform.BeforeInitialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Game.DoInitialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Game.Run (GameRunBehavior runBehavior) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Game.Run () [0x00000] in <filename unknown>:0
at Game3.Program.Main () [0x00000] in <filename unknown>:0