question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting SharpDX.SharpDXException while running demo with Visual Studio 2019

See original GitHub issue

SharpDX.SharpDXException HResult=0x80070057 Message=HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect.

Source=SharpDX StackTrace: at SharpDX.Result.CheckError() at SharpDX.Direct3D11.Device.CreateVertexShader(IntPtr shaderBytecodeRef, PointerSize bytecodeLength, ClassLinkage classLinkageRef, VertexShader vertexShaderOut) at SharpDX.Direct3D11.VertexShader…ctor(Device device, Byte[] shaderBytecode, ClassLinkage linkage) at DemoRenderer.ShapeDrawing.RayTracedRenderer`1…ctor(Device device, ShaderCache cache, String shaderPath, Int32 maximumInstancesPerDraw) in C:\Work\Games\bepuphysics2-master\DemoRenderer\ShapeDrawing\RayTracedRenderer.cs:line 70 at DemoRenderer.Renderer…ctor(RenderSurface surface) in C:\Work\Games\bepuphysics2-master\DemoRenderer\Renderer.cs:line 71 at Demos.GameLoop…ctor(Window window) in C:\Work\Games\bepuphysics2-master\Demos\GameLoop.cs:line 33 at Demos.Program.Main(String[] args) in C:\Work\Games\bepuphysics2-master\Demos\Program.cs:line 16

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
RossNordbycommented, Mar 10, 2020

Oops, good catch! FlipDiscard does indeed only work on win10. That’s what I get for copying from the DX12 codebase 😛

Fixed in 65b2c321cd8e32ce6ef2eda569015ab9281a7a61.

1reaction
RossNordbycommented, Jun 13, 2020

Another potential cause: not having the SDK installed, and attempting to run in debug mode. By default, the demos renderer enabled the device debug layer, which would then fail on launch. Running in release would still work.

1751f48f16b5349afda3ec17e065b4ff89c0257e defaults the debug layer to off always.

To enable the debug layer to investigate other rendering issues, change the last parameter to true here: https://github.com/bepu/bepuphysics2/blob/1751f48f16b5349afda3ec17e065b4ff89c0257e/Demos/GameLoop.cs#L26

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception in SharpDX.dll
We're writing a game in C# and Monogame. They pass around the source code without any problems, but I cannot run the program....
Read more >
Usage
In SharpDX, most of the methods automatically throw a SharpDXException if the HRESULT is < 0 . The exception contains the HRESULT code....
Read more >
SharpDX Exception when trying to Load Song under Win7 ...
However, when I run the compiled program under my Win7 x86 (32bit) I get a SharpDX Exception. A Try/Catch of game.Run(); gave the...
Read more >
Program not running in Visual Studio 2019
Hello, I just installed Visual Studio 2019 onto my laptop and I can't run or debug anything since I installed the program.
Read more >
How to Run and Interpret Unit Tests with Visual Studio ...
Executing All Tests. Assuming you have Visual Studio Test Explorer open in the tutorial's project, to run all tests, click the left play...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found