Skip to main content
gamedev.net
🔒 Locked

CreateDevice hangs

Started by kUfa 2 replies 1.6k views
Original Post
kUfa
kUfa
Hi, I'm working on a multithreaded renderer on DX9. I've ensured that the window used by the device is created on the same thread that is calling CreateDevice to avoid the deadlocks mentioned in the SDK documentation. I have one very weird behaviour: the very first time (read the first one after a computer reboot) i launch my application on a multicore machine (running 2000/XP/Vista), the CreateDevice will hang if want a fullscreen presentation. If i want a windowed presentation, it's all fine. Everytime i'll restart the app it will work fine. Any idea why i could get this weird behaviour? Thanks in advance, /kufa
don
don
Are you making any D3D calls from your WndProc?

kUfa
kUfa
Nope, but even if i did shouldn't it work fine since the window was created on the same thread?

/kufa
don
don
I'm assuming that your app only creates a single device. Since the call to CreateDevice is hanging, it also means that your app doesn't have a valid IDirect3DDevice9 interface pointer yet, so I can't see how multithreading plays into this particular problem, *unless* you're calling through an uninitialized interface pointer in another thread and that is causing the hang. Just as a test, you could try blocking the other threads until CreateDevice has returned and see if that succeeds.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.