• Advertisement
Sign in to follow this  

DirectX Problem: Black Screen

This topic is 3957 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, i've got a problem with one of my games, which causes a black screen after starting it on a friends machine. On my pc it's running perfectly and also on a lot other PCs too. But only ony PC shows up a black screen, without entering the menu of the game. The PC, on which a black screen is displayed, has a 8800 GTX with the newest drivers installed (my PC also has a 8800 GTX, so that's shouldn't ne the problem). The OS is XP/SP2, with the newest DX installed. BTW. the game uses Managed DirectX and .NET 2.0 (also installed on each machine) After googling around, I've read that there are also a lot of other games, which have the same problem on several PCs. Some guys told me, that the reason could be the refresh rate of the monitor. If anybody knows, what the reason could be ... well ... then help me plz ;) If you need more information about the PC with the black screen, just tell me Thanks a lot cdx

Share this post


Link to post
Share on other sites
Advertisement
I have no idea what your problem might be but if this was me I would just install the DX SDK on the target PC and set it to Debug Mode in the control panel. Then I could run DebugView and examine for any DirectX errors and rule out (or not) D3D-related issues. If your device creation code is failing for some reason (which is likely given your symptoms) then this method will tell you precisely what the problem is.

Share this post


Link to post
Share on other sites
Hi,

well that's a good idea, I was also thinking of. But the thing is, that the app doesn't throw any exception. The creation of the device doesn't fail anyway, because of the splash screen, that will be displayed. After that the intro follows with a title screen. After that the game menu is entered. And at thhis point, the screen turn black! So the device must be ok :( ...

But maybe, there is no other choice than debugging on that system anyway ...

Thx
cdx

Share this post


Link to post
Share on other sites
It's possible that it's throwing an 'unhandled' exception. If you've got a debugger on that machine, start up the game, hook the debugger to the running app, set your debugger to break on unhandled exceptions, then create the situation that causes your black screen. If you also make the source code available to the debugger, you can have it break into the code so you can trace its execution on that machine.

My intuition though says that the cause of the problem is actually the video driver on that particular machine. Make sure it's the latest available, or check for any known issues that driver release might have.

Cheers,

Timkin

Share this post


Link to post
Share on other sites
Hi,

finally I've found the problem about that black screen. I also found out, that there are a lot of popular games out there (Half Life 2, Starcraft, WOW etc.), which causes the same problem on several machines!

In my situation, thy problem had luckily nothing to do with the video driver. It had to do with the frame time calculations inside our engine. I will try to explain it:

Within the Update method there is a comparison of the ticktime with the fixedframetime. And this was the problem, because on some machines the ticktime was ZERO (0).

public static void Update(Duration elapsedTime)
{
GameTime.Update(elapsedTime);
tickTime += elapsedTime;

while (tickTime >= GameTime.FixedFrameTime)
{.......

Therefore there must be an error inside the Timer class, which calculates the elapsed time and passes it over to the above Update method:

time = new Duration((endTick - startTick) * ticksToNanos);

The problem here was the tickToNanos calculation, as shown below:

QueryPerformanceFrequency(out temp);
ticksToNanos = 1000000000 / temp;

-> temp is defined as long, whereas ticksToNanos is defined as a double!
On some CPUs we get a double with correct values after the komma.
On some other CPUs, we get just ZERO (0).
Therefor the next line of code shows the solvation:

ticksToNanos = 1000000000.0 / temp;

So thanks anyway to everybody who have replied to this post!

greetz,
cdx


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement