Debugging SlimDX调试帮助-第一次机会异常';slimdx.direct3d11.direct3d11异常';

Debugging SlimDX调试帮助-第一次机会异常';slimdx.direct3d11.direct3d11异常';,debugging,exception,directx,slimdx,Debugging,Exception,Directx,Slimdx,C# 我从SlimDX收到此错误: 第一次机会异常“slimdx.direct3d11.direct3d11异常” 但我似乎不明白为什么/在哪里/什么时候。我已经打开了各种可能的调试,我的D3D设备处于调试模式,我已经启用了非托管调试,我在DirectX控制面板中打开了各种形式的消息传递/中断等 奇怪的是,当这个错误消息出现时,我的程序一直完美地运行,并且没有中断。如果没有输出窗口中的消息,它甚至不会被注意到。我试着把事情记录到控制台上,但是很难知道一件事情从哪里开始,另一件事情从哪里结束,因为

C# 我从SlimDX收到此错误: 第一次机会异常“slimdx.direct3d11.direct3d11异常”

但我似乎不明白为什么/在哪里/什么时候。我已经打开了各种可能的调试,我的D3D设备处于调试模式,我已经启用了非托管调试,我在DirectX控制面板中打开了各种形式的消息传递/中断等

奇怪的是,当这个错误消息出现时,我的程序一直完美地运行,并且没有中断。如果没有输出窗口中的消息,它甚至不会被注意到。我试着把事情记录到控制台上,但是很难知道一件事情从哪里开始,另一件事情从哪里结束,因为我使用了多个线程等等。我试着使用一个参考设备,但我的应用程序挂起时,我这样做,我已经在PIX运行了这个,但我没有看到任何错误,当我这样做

有点奇怪。如果它能正常地断开,我就可以调试它了

有什么想法吗


现在我看到:
nART.exe中引发的FirstChanceException事件:D3D11错误文件未找到文件:未找到文件(-2005139454)


这可能会让我走上正确的道路。我现在可以使用断点,我想我已经接近找到罪魁祸首了。

您应该能够打开调试>异常并检查“抛出的公共语言运行时异常”,这将中断所有托管库异常的执行,即使它们已被处理

D3D11: INFO: Create InputLayout: Name="unnamed", Addr=0x06C91304, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097264: CREATE_INPUTLAYOUT ] D3D11: INFO: Create BlendState: Name="unnamed", Addr=0x06C917BC, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097270: CREATE_BLENDSTATE ] D3D11: INFO: Create DepthStencilState: Name="unnamed", Addr=0x06C919AC, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097273: CREATE_DEPTHSTENCILSTATE ] D3D11: INFO: Create Texture2D: Name="unnamed", Addr=0x06C03B64, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D ] D3D11: INFO: Create ShaderResourceView: Name="unnamed", Addr=0x06C91DE4, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097240: CREATE_SHADERRESOURCEVIEW ] D3D11: INFO: Create Texture2D: Name="unnamed", Addr=0x06C0401C, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D ] D3D11: INFO: Create ShaderResourceView: Name="unnamed", Addr=0x06C038EC, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097240: CREATE_SHADERRESOURCEVIEW ] D3D11: INFO: Create Texture2D: Name="unnamed", Addr=0x06C04A34, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D ] D3D11: INFO: Create ShaderResourceView: Name="unnamed", Addr=0x06C041F4, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097240: CREATE_SHADERRESOURCEVIEW ] D3D11: INFO: Create Texture2D: Name="unnamed", Addr=0x06C05024, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D ] D3D11: INFO: Create ShaderResourceView: Name="unnamed", Addr=0x06C04594, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097240: CREATE_SHADERRESOURCEVIEW ] D3D11: INFO: Create Texture2D: Name="unnamed", Addr=0x06C04C0C, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D ] D3D11: INFO: Create ShaderResourceView: Name="unnamed", Addr=0x06C043B4, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097240: CREATE_SHADERRESOURCEVIEW ] D3D11: INFO: Create Buffer: Name="unnamed", Addr=0x06C00264, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER ] D3D11: INFO: Create VertexShader: Name="unnamed", Addr=0x06C004F4, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097249: CREATE_VERTEXSHADER ] D3D11: INFO: Create PixelShader: Name="unnamed", Addr=0x06C008AC, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER ] D3D11: INFO: Create InputLayout: Name="unnamed", Addr=0x06C00C74, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097264: CREATE_INPUTLAYOUT ] D3D11: INFO: Create RasterizerState: Name="unnamed", Addr=0x06C054C4, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097276: CREATE_RASTERIZERSTATE ] D3D11: INFO: Create Sampler: Name="unnamed", Addr=0x06C05684, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097267: CREATE_SAMPLER ] D3D11: INFO: Create Texture2D: Name="unnamed", Addr=0x06C05CDC, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D ] A first chance exception of type 'SlimDX.Direct3D11.Direct3D11Exception' occurred in SlimDX.dll D3D11: INFO: Destroy RenderTargetView: Name="new_ToScreenView", Addr=0x06BEEE44 [ STATE_CREATION INFO #2097245: DESTROY_RENDERTARGETVIEW ] D3D11: INFO: Destroy Texture2D: Name="new_Swapchain_Texture", Addr=0x06BE9C04 [ STATE_CREATION INFO #2097236: DESTROY_TEXTURE2D ] D3D11: INFO: Create Texture2D: Name="unnamed", Addr=0x06C05AFC, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D ] D3D11: INFO: Create RenderTargetView: Name="unnamed", Addr=0x06BEEE44, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097243: CREATE_RENDERTARGETVIEW ] D3D11: INFO: Destroy DepthStencilView: Name="unnamed", Addr=0x06BF20D4 [ STATE_CREATION INFO #2097248: DESTROY_DEPTHSTENCILVIEW ] D3D11: INFO: Destroy Texture2D: Name="D3D_depthStencil", Addr=0x06BEF1B4 [ STATE_CREATION INFO #2097236: DESTROY_TEXTURE2D ] D3D11: INFO: Create Texture2D: Name="unnamed", Addr=0x06BEF1B4, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D ] D3D11: INFO: Create DepthStencilView: Name="unnamed", Addr=0x06C060AC, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097246: CREATE_DEPTHSTENCILVIEW ] D3D11: INFO: Create Buffer: Name="unnamed", Addr=0x0AC90614, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER ] D3D11: INFO: Create VertexShader: Name="unnamed", Addr=0x0AC9086C, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097249: CREATE_VERTEXSHADER ] D3D11: INFO: Create PixelShader: Name="unnamed", Addr=0x0AC90C04, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER ] D3D11: INFO: Create InputLayout: Name="unnamed", Addr=0x06C0639C, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097264: CREATE_INPUTLAYOUT ] D3D11: INFO: Create Buffer: Name="unnamed", Addr=0x06C067CC, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER ] D3D11: INFO: Create Buffer: Name="unnamed", Addr=0x06C06B54, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER ] D3D11: INFO: Create Buffer: Name="unnamed", Addr=0x06C06F2C, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER ] D3D11: INFO: Create Buffer: Name="unnamed", Addr=0x06C07304, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] A first chance exception of type 'SlimDX.Direct3D11.Direct3D11Exception' occurred in SlimDX.dll D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: Create Buffer: Name="unnamed", Addr=0x06C07C04, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: Create Buffer: Name="unnamed", Addr=0x0AC9187C, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER ] D3D11: INFO: Create VertexShader: Name="unnamed", Addr=0x0AC91B0C, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097249: CREATE_VERTEXSHADER ] D3D11: INFO: Create PixelShader: Name="unnamed", Addr=0x0AC91EC4, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER ] D3D11: INFO: Create InputLayout: Name="unnamed", Addr=0x06BF393C, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097264: CREATE_INPUTLAYOUT ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] A first chance exception of type 'SlimDX.Direct3D11.Direct3D11Exception' occurred in SlimDX.dll D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: Create Buffer: Name="unnamed", Addr=0x06BF43EC, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: Create Buffer: Name="unnamed", Addr=0x0AC93CB4, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER ] D3D11: INFO: Create VertexShader: Name="unnamed", Addr=0x0AC93F44, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097249: CREATE_VERTEXSHADER ] D3D11: INFO: Create PixelShader: Name="unnamed", Addr=0x06BF4CAC, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER ] D3D11: INFO: Create InputLayout: Name="unnamed", Addr=0x06BF5074, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097264: CREATE_INPUTLAYOUT ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] D3D11: INFO: ID3D11DeviceContext::Draw: The Pixel Shader unit expects a Shader Resource View at Slot 0, but none is bound. This is OK, as reads of an unbound Shader Resource View are defined to return 0. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Shader Resource View here. [ EXECUTION INFO #353: DEVICE_DRAW_SHADERRESOURCEVIEW_NOT_SET ] A first chance exception of type 'SlimDX.Direct3D11.Direct3D11Exception' occurred in SlimDX.dll
AppDomain.CurrentDomain.FirstChanceException += 
    (object source, FirstChanceExceptionEventArgs e) =>
    {
        Console.WriteLine("FirstChanceException event raised in {0}: {1}",
            AppDomain.CurrentDomain.FriendlyName, e.Exception.Message);
    };