Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Long delay when creating device object.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 jamesxli   Members   -  Reputation: 303

Like
0Likes
Like

Posted 22 July 2014 - 12:31 PM

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.

 



Sponsor:

#2 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 22 July 2014 - 01:32 PM

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

#3 jamesxli   Members   -  Reputation: 303

Like
0Likes
Like

Posted 23 July 2014 - 09:34 AM

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. 



#4 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 23 July 2014 - 10:14 AM

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

#5 Max McMullen   Members   -  Reputation: 240

Like
2Likes
Like

Posted 23 July 2014 - 12:41 PM

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


#6 jamesxli   Members   -  Reputation: 303

Like
0Likes
Like

Posted 23 July 2014 - 02:24 PM

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.


Edited by jamesxli, 23 July 2014 - 07:17 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS