Discussion:
Failure when Form minimized
(too old to reply)
curious
2008-05-05 05:35:02 UTC
Permalink
I have a MDX program that is written in C#. Everything works fine as long as
I do not minimize the main form. As soon as I minimize the main form I get
the following error. I create the device in a usercontrol. I check for
DeviceLost and Reset the device in my program but it does not help. Any help
is appreciated.

Thanks.

Error in the application.
-2005530585 (D3DERR_DRIVERINTERNALERROR)
at Microsoft.DirectX.Direct3D.Device.Reset(PresentParameters[]
presentationParameters)
at Microsoft.DirectX.Direct3D.Device.OnParentResized(Object sender,
EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnResize(EventArgs e)
at System.Windows.Forms.UserControl.OnResize(EventArgs e)
at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32
width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
--
MDX fan
Giorgio Tino
2008-05-05 06:04:52 UTC
Permalink
Well, as far as I know from my experience (I've got plenty of those kind
of problems and I'm still trying to solve them) when you get a
D3DERR_DRIVERINTERNALERROR it usually means that something went wrong in
your graphic card driver and there is probably not so much you can do
about it... Let me ask you something:

1) Run your application on another machine. Does it crash there too?
2) Try to create a Reference device instead of an Hardware one. Does it
crash in this case?

If the answer is NO for both of the previous questions, the problem can
really be in your graphic card driver... You can try to download the
latest drivers and try again...

As far as I know, my rule of thumb is: when I get a D3DERR_INVALIDCALL I
know I'm doing something wrong, and I know that I will get the same
exception no matter where I run the application. If I get a
D3DERR_DRIVERINTERNALERROR, it is usuallay something that fails on a
specific machine only, and the bug is probably not on my side...

Hope this helps,
Giorgio Tino
Post by curious
I have a MDX program that is written in C#. Everything works fine as long as
I do not minimize the main form. As soon as I minimize the main form I get
the following error. I create the device in a usercontrol. I check for
DeviceLost and Reset the device in my program but it does not help. Any help
is appreciated.
Thanks.
Error in the application.
-2005530585 (D3DERR_DRIVERINTERNALERROR)
at Microsoft.DirectX.Direct3D.Device.Reset(PresentParameters[]
presentationParameters)
at Microsoft.DirectX.Direct3D.Device.OnParentResized(Object sender,
EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnResize(EventArgs e)
at System.Windows.Forms.UserControl.OnResize(EventArgs e)
at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32
width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
curious
2008-05-08 02:57:00 UTC
Permalink
Thanks for the response. The answers to your questions are:
1) yes it crshes on other machines too.
2) I did try reference device; it makes my program very slow and it still
crashes.

As I mentioned in my first post, it crashes as soon as I minimize my main
window. I think it has to do with losing the device. I try to Reset the
device but it does not help.

Thanks anyway.
--
curious
Post by Giorgio Tino
Well, as far as I know from my experience (I've got plenty of those kind
of problems and I'm still trying to solve them) when you get a
D3DERR_DRIVERINTERNALERROR it usually means that something went wrong in
your graphic card driver and there is probably not so much you can do
1) Run your application on another machine. Does it crash there too?
2) Try to create a Reference device instead of an Hardware one. Does it
crash in this case?
If the answer is NO for both of the previous questions, the problem can
really be in your graphic card driver... You can try to download the
latest drivers and try again...
As far as I know, my rule of thumb is: when I get a D3DERR_INVALIDCALL I
know I'm doing something wrong, and I know that I will get the same
exception no matter where I run the application. If I get a
D3DERR_DRIVERINTERNALERROR, it is usuallay something that fails on a
specific machine only, and the bug is probably not on my side...
Hope this helps,
Giorgio Tino
Post by curious
I have a MDX program that is written in C#. Everything works fine as long as
I do not minimize the main form. As soon as I minimize the main form I get
the following error. I create the device in a usercontrol. I check for
DeviceLost and Reset the device in my program but it does not help. Any help
is appreciated.
Thanks.
Error in the application.
-2005530585 (D3DERR_DRIVERINTERNALERROR)
at Microsoft.DirectX.Direct3D.Device.Reset(PresentParameters[]
presentationParameters)
at Microsoft.DirectX.Direct3D.Device.OnParentResized(Object sender,
EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnResize(EventArgs e)
at System.Windows.Forms.UserControl.OnResize(EventArgs e)
at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32
width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Giorgio Tino
2008-05-08 15:45:38 UTC
Permalink
Ok, this has probably to do with losing the device, as you pointed out.
I don't know how you are handling the DeviceLost scenario in your
application, but here is a link where it is explained pretty well...

http://www.pluralsight.com/wiki/default.aspx/Craig.DirectX/DeviceRecoveryTutorial.html

To be honest, I started from that post for my application, but then I
had to modify that code because of a another problem I was
experiencing... Anyways, try to see if that can help... If you are
already handling the DeviceLost scenario, please post here the code for
that so maybe I can help you a little bit more looking through the code.

Let me know,
Giorgio Tino
Post by curious
1) yes it crshes on other machines too.
2) I did try reference device; it makes my program very slow and it still
crashes.
As I mentioned in my first post, it crashes as soon as I minimize my main
window. I think it has to do with losing the device. I try to Reset the
device but it does not help.
Thanks anyway.
Loading...