Manuel Klein
2007-10-09 02:14:03 UTC
Hi,
I managed to narrow the problem down to a very very basic application.
Whenever I start it, the computer locks or shows a BSOD in nv4_disp.dll
after max 2 seconds. So, be careful if you intend to reproduce it!
This is very strange because it almost does nothing. I can play recent
games or do whatever else without any problem, so believe me, the machine is
fine. Latest graphics driver installed (and the one before tested either).
Using a Geforce 6800.
We could discuss about details in this sample code, but IMO that's not
important, because in the end it never should crash the machine! Without
"dev.clear" the crash does /not/ occur. (haven't tested w/o
BeginScene/EndScene yet)
Then I switched to the reference rasterizer (of course using the initial
code that includes dev.clear). Maximum checks, maximum debug output and
unmanaged debugging is enabled. Result: No problem occurs. No warning or
error in the debug output, only debug information (so, debug output for sure
does work). But, this doesn't say very much because I get 2,000 FPS using
HAL device and 80 FPS using the ref rasterizer, so it takes much longer
to wait for the problem - if it occurs at all. I waited 2 minutes, but
it didn't crash.
How can this code cause such a problem? IMO it must not in any case! Can you
repro it? Add the class to a new Winforms application and set Sub Main as
the startup object. You might please adjust 1280x1024 in the code to your
screen size.
Thanks in advance.
Manuel
'========= Code ===========
Imports Microsoft.DirectX
Imports Microsoft.DirectX.Direct3D
Friend Class Main
Shared Sub Main()
Dim f As Form1
Dim dev As Device
Dim pp As PresentParameters
f = New Form1
With f
.FormBorderStyle = Windows.Forms.FormBorderStyle.None
.ControlBox = False
.Text = String.Empty
.Size = New Size(1280, 1024)
.Location = Point.Empty
.WindowState = FormWindowState.Maximized
.Show()
.Refresh()
End With
pp = New PresentParameters
With pp
.Windowed = True
.PresentationInterval = PresentInterval.Immediate
.SwapEffect = SwapEffect.Flip
.BackBufferCount = 1
End With
dev = New Device(0, DeviceType.Hardware, f,
CreateFlags.HardwareVertexProcessing, pp)
Do
dev.BeginScene()
dev.Clear(ClearFlags.Target, &HFF2080E0, 1, 0)
dev.EndScene()
'dev.Present()
Application.DoEvents()
Loop While f.IsHandleCreated
dev.Dispose()
End Sub
End Class
I managed to narrow the problem down to a very very basic application.
Whenever I start it, the computer locks or shows a BSOD in nv4_disp.dll
after max 2 seconds. So, be careful if you intend to reproduce it!
This is very strange because it almost does nothing. I can play recent
games or do whatever else without any problem, so believe me, the machine is
fine. Latest graphics driver installed (and the one before tested either).
Using a Geforce 6800.
We could discuss about details in this sample code, but IMO that's not
important, because in the end it never should crash the machine! Without
"dev.clear" the crash does /not/ occur. (haven't tested w/o
BeginScene/EndScene yet)
Then I switched to the reference rasterizer (of course using the initial
code that includes dev.clear). Maximum checks, maximum debug output and
unmanaged debugging is enabled. Result: No problem occurs. No warning or
error in the debug output, only debug information (so, debug output for sure
does work). But, this doesn't say very much because I get 2,000 FPS using
HAL device and 80 FPS using the ref rasterizer, so it takes much longer
to wait for the problem - if it occurs at all. I waited 2 minutes, but
it didn't crash.
How can this code cause such a problem? IMO it must not in any case! Can you
repro it? Add the class to a new Winforms application and set Sub Main as
the startup object. You might please adjust 1280x1024 in the code to your
screen size.
Thanks in advance.
Manuel
'========= Code ===========
Imports Microsoft.DirectX
Imports Microsoft.DirectX.Direct3D
Friend Class Main
Shared Sub Main()
Dim f As Form1
Dim dev As Device
Dim pp As PresentParameters
f = New Form1
With f
.FormBorderStyle = Windows.Forms.FormBorderStyle.None
.ControlBox = False
.Text = String.Empty
.Size = New Size(1280, 1024)
.Location = Point.Empty
.WindowState = FormWindowState.Maximized
.Show()
.Refresh()
End With
pp = New PresentParameters
With pp
.Windowed = True
.PresentationInterval = PresentInterval.Immediate
.SwapEffect = SwapEffect.Flip
.BackBufferCount = 1
End With
dev = New Device(0, DeviceType.Hardware, f,
CreateFlags.HardwareVertexProcessing, pp)
Do
dev.BeginScene()
dev.Clear(ClearFlags.Target, &HFF2080E0, 1, 0)
dev.EndScene()
'dev.Present()
Application.DoEvents()
Loop While f.IsHandleCreated
dev.Dispose()
End Sub
End Class