[source lang = "c#"]
Color bg = Color.Transparent;
// Color bg = Color.Black;
if (this.clearRequired)
{
this.initializer.Device.Clear(ClearFlags.Target, bg, 1, 0);
this.clearRequired = false;
}
Device.Clear() causes crash...
The following code crashes my Managed DirectX app but only when DirectX is in debug mode...
Anybody know how this could happen?
Thanks in advance,
Devin
This is probably one of the debug assertations. Since you use the debug runtimes you ought to see a nice error description in the debug output view.
This usually indicates a wrong parameter or state.
This usually indicates a wrong parameter or state.
Thanks, but what's the debug output view? Is that something in DirectX or Visual Studio?
-Devin
-Devin
I believe he's referring to the Output window in Visual Studio, at the bottom of the screen.
Yep, sorry, i meant the default output view of Visual Studio.
Note that on assertations i sometimes have to press Ignore once to actually get the debug info in the output view. I don't know if that applies to managed DirectX as well.
Note that on assertations i sometimes have to press Ignore once to actually get the debug info in the output view. I don't know if that applies to managed DirectX as well.
OK. I see now. I wasn't sure what the output window even was. I'm somewhat new to VS and am still learning. I usually get the debug window and fix the errors I see in that window. But this is the portion that has errors in the output window (I'm not sure what to do with it though? Help?)...
A first chance exception of type 'System.NullReferenceException' occurred in DirectX.dll
A first chance exception of type 'Microsoft.DirectX.Direct3D.InvalidCallException' occurred in Microsoft.DirectX.Direct3D.dll
A first chance exception of type 'Microsoft.DirectX.Direct3D.InvalidCallException' occurred in Microsoft.DirectX.Direct3D.dll
A first chance exception of type 'System.NullReferenceException' occurred in DirectX.dll
A first chance exception of type 'System.NullReferenceException' occurred in DirectX.dll
A first chance exception of type 'Microsoft.DirectX.Direct3D.InvalidCallException' occurred in Microsoft.DirectX.Direct3D.dll
'DirectFormsSample.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
A first chance exception of type 'System.NullReferenceException' occurred in DirectX.dll
A first chance exception of type 'Microsoft.DirectX.Direct3D.InvalidCallException' occurred in Microsoft.DirectX.Direct3D.dll
A first chance exception of type 'Microsoft.DirectX.Direct3D.InvalidCallException' occurred in Microsoft.DirectX.Direct3D.dll
A first chance exception of type 'System.NullReferenceException' occurred in DirectX.dll
A first chance exception of type 'System.NullReferenceException' occurred in DirectX.dll
A first chance exception of type 'Microsoft.DirectX.Direct3D.InvalidCallException' occurred in Microsoft.DirectX.Direct3D.dll
'DirectFormsSample.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement