VC++ 2005 beta 2 and directx9 = screen corruption?

Hello,

I am new to the forum and I am having the strangest problem with compiling directx...
Things will compile fine and run fine for a while, generally about 30 min of active running...then strange artifacts will begin to appear on the screen, first little shimmers, this is just in the directx window mind you, then the whole window will be covered in a haze of short vertical blue lines.

Then, when I close the window, it will spread to the entire screen and dramatically distort any geometry in subsequent runnings.  Shutting down does not make a difference, the lines appear regardless of the screen mode and are to scale with the screen mode (blue lines made of up blue text boxes when the computer starts up, thicker blue lines when its in the 640x480  or 800x600 or whatever mode windows xp goes into when it is showing the windows logo till it gets into windows where they remain.

It seems to take about 30-45 minutes for them to disappear on their own...but 30-45 minutes of the computer being on, if I turn the computer off right after the lines show up then go to bed, they will still hang around when I turn my computer on in the morning for a while. 

At first, because it was only happening with the things I wrote, so I thought that maybe I was doing something bad with the way I was coding and the corruption was my video card's way of saying 'don't do that' so I went around, posting messages in a couple places and sending a request and a screenshot to ATI, but received no useful responses. But, strangely, the corruption does not go away when I disable the display adapter in the device manager.

Then, it happened when I ran someone elses code I compiled on my computer  but wasnt happening when I ran their own binary compiled, presumably on their own machine.  Thats when I began to wonder if it was somehow the compiler or some kind of crossed-wires linking   Somehow the result of strange interactions in the Beta version software.  The reason I have not updated to the release version of 2005 is because I am waiting for my school to release the full version through MSDNAA.

It has been confusing me to no end for about two months now and I have finally resolved to try wiping my hd and reinstalling everything but I still would like to know whats going on if anyone has any ideas.  I have a project I need to be working on for class but I am afraid to because of the bizzare side affects.

For reference, to give you an idea of what both the blue lines and the geometry corruption look like, I have posted a screenshot I took of the credit page for Quake 3 (I was testing to see if OpenGL vs. DirectX made a difference) at http://www-personal.engin.umd.umich.edu/~jaagari/

Also, I am using VC++ 2005 Beta 2, the .Net framework 2.0 beta 2 and  on Windows XP Pro SP2 on laptop with a Pentium 4 3200 and Mobility Radeon 9600 graphics chip with the most up-to-date drivers (I updated the drivers right after it happened the first time with no luck).

Anyways,
If anyone has any idea what might be the cause of this and the strange way in which it dissapates or how I can remedy it or if I probably just need to stop using the betas I would overwhelmingly appreciative.

--Brian


Answer this question

VC++ 2005 beta 2 and directx9 = screen corruption?

  • NKovner

    As ZMan suggested... I'd go with a hardware problem - definitely look into the heating issues. The one time I got similar things (and a couple of times I've seen it on other machines) it was a hardware fault - random colours on the screen, incorrect pixels etc...

    Try seeing if you can cool the machine down - lift the laptop off the surface to allow better airflow... use it in a cooler room etc...

    One thing to try, in order to verify, is run your software against the reference rasterizer - that should bypass the hardware (apart from displaying the final image). If there are driver/hardware problems, the refrast usually confirms this Smile

    hth
    Jack



  • Werner_001

    Very odd, sometimes the latest drivers are not *always* the best - sometimes you need the WHQL certified ones.

    The only other thing I can think of is a bad connection or a heat problem Its hard with a laptop but try opening the case or pointing a fan inside so see if it improves.

    I've not seen any issues like like this with VS2005 beta, and if its happening with Open GL and non development code that really leaves a driver/hardware issue.

  • Mauro Regio

    Thank you very much for the responses.

    I'll have to give the reference rasterizer a try.  I'm still confused as to why it only seems to start after I run a program I have personally compiled and not after running other programs using DirectX (especially ones more complex than my rotating cube/polygon/landscape). 

    Also, as an aside, I haven't seen anything commenting on the order of attributes in an FVF struct, I've been putting mine in the order of the flags for defining them (as examples tend to show) but I was curious if the order mattered (since attributes would end up at different memory locations).
    ie. is


    struct fvfCustom { float x, y, z; DWORD color; };
     


    equivalent to:


    struct fvfCustom {DWORD color; float x, y, z; };
     


    as far as DirectX is concerned or is 'color' going to end up being my x-coordinate and 'z' my color

    Many thanks,

    Jaa.

  • forwheeler

    it *might* be :-)

    The CLR is allowed to lay out structs in whatever way it feels is best. If you need to control it then you should use the StructLayout attribute

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpref/html/frlrfsystemruntimeinteropservicesstructlayoutattributeclasstopic.asp


  • VC++ 2005 beta 2 and directx9 = screen corruption?