Long delay when creating device object.

Started by
4 comments, last by jamesxli 9 years, 8 months ago

I have a pretty strange problem with one of our applications. The application is a .Net+WinForms application, it uses SlimDX to access DX9 and DX11 interface to do some 3D rendering. Recently, for unknown reason, the application always stops for about 4 seconds when it tries to create the second Device object ( for DX9 or DX11 interface). The applications doesn't stop at the first time or any time after the second device object. The problem happens regardless whether the application creates DX9 device or DX11 device; I have checked with a GPU monitor, the GPU and the CPU are not having high load during this 4 seconds. Also, I have not changed our SlimDX or DirectX library, but the OS (Windows 7) could have been changed by regular Windows OS update.

Has anybody had experience with this kind of problem? I would appreciate very much any advice to track down this problem.

thanks in advance.

Advertisement

That sounds like a dead lock somewhere then if there isn't high GPU or CPU load. Is it possible you're waiting on any tasks to finish? Or multiple threads are trying to use the same context?

Perception is when one imagination clashes with another

Thanks for the message. I have checked potential deadlocks in the code and can not find any such problem. I could avoid the apparent blocking by create a second dummy Device object from a separate background thread, but this is really a dirty work-around.

Hmm I don't have any direct idea what may be causing it, it definitely sounds like some sort of contention for the resources. It may be waiting on a flush from the GPU before it creates the second device, is there a chance you don't call swap buffers until four seconds or so into the process?

Perception is when one imagination clashes with another

Can you check if you received a driver update recently? If so, try going back to an older driver and see if the problem still occurs. If it's a driver issue then you can push that bug to the hardware vendor via the developer relations contacts on their website usually. Also, it'd be great for me to know what hardware & driver you're running.

Max McMullen

Direct3D Development Lead

Microsoft

Thanks Max. I indeed got the graphic card driver updated recently. The graphics driver is NVidia, 04/04/2014; version 9.18.13.3523; My hardware is: AMD Phenom 1045T (CPU); 2.7 GHz. Nvidia GeForce GTX 650. I have just tried the software on a different machine (with different graphics card) and the the problem did not happen on that machine. So, there seems to be hardware or driver related issue with my computer.

This topic is closed to new replies.

Advertisement