RE: [GD-Windows] Windows paints my window!
Brought to you by:
vexxed72
From: Grills, J. <jg...@so...> - 2002-09-11 15:58:33
|
There is an issue between some drivers and the D3D runtime which will cause D3D to return invalid pointers when you lock resources. This is apparently not fixable in the drivers, so it has to be worked around in the app. We see this a lot filling dynamic vertex buffers. You can use IsBadWritePtr() or some other exception handling technique to deal with this. Hopefully DX9 will fix this. j -----Original Message----- From: Javier Arevalo [mailto:ja...@py...] Sent: Wednesday, September 11, 2002 5:02 AM To: gam...@li... Subject: Re: [GD-Windows] Windows paints my window! Brian Sharon <bs...@mi...> wrote: > Who said you have to actually process the messages? :) From MSDN: > IsHungAppWindow [...] > Call PeekMessage when you update your progress bars and all should be > well. --brian Thanks guys, with either the hollow brush thing or the PeekMessage trick, the window is now fine. However, when we put PeekMessage inside our KeepAlive call (which we call frequently from various load functions), we got a nasty DirectX crash if we Alt-Tab repeatedly. Until now we had only been able to generate this crash in convoluted Ctrl-Alt-Del sequences... it bombs in the middle of a vertex buffer refill: Device was ok, Lock() call was ok, the vertex buffer memory was accesible, but somewhere in the middle of the vertex buffer fill loop, the vertex buffer memory is lost and the rep movsd crashes halfway. I was under the impression that the only way to lose the device when fullscreen was either by Ctrl-Alt-Del (which has special considerations and doesn't take away locked memory), or by actually processing messages and letting your app be deactivated. We PeekMessage with PM_NOREMOVE during load, don't actually process messages, and most certainly don't call that function inside the vertex buffer fill loops, so AFAIK the only effect this PeekMessage should have is to let windows know we're not dead. Will cross-post this to the DirectXDEV list and see what people think. [ Note: funny thing, the crash showed up when I was using Photoshop, had the color picker dialog up, and tried to set the game to fullscreen 640x480 resolution. For some reason, Photoshop's color picker will not let any other app go fullscreen 640x480 (any other resolution is fine). You can try it with the DX samples. Bummer. ] Javier Arevalo Pyro Studios ------------------------------------------------------- In remembrance www.osdn.com/911/ _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |