Sign in to follow this  
Mike.Popoloski

Thread Problem

Recommended Posts

Mike.Popoloski    3258
I seem to be having a problem with multithreading that I just can't figure out. My program crashes when it hits IDirect3DDevice9::SetIndices. I know it is a problem with my threads because if I disable them, it works fine. Also, my new thread that I am spawning doesn't even do anything. I have tried both a blank thread and a thread that just contains Sleep( 0 ). I don't know why Direct3D is crashing, when I am not even touching it on the other thread. I am not settings the MULTITHREAD flag when creating the device, but I thought that was only if I would be using DirectX across multiple threads. What's the deal?

Share this post


Link to post
Share on other sites
Armadon    1091
I know you said that you haven't created the device with the MULTITHREAD flag but have you tried doing it. If it works then you know your problem does occur when a new thread is created.

It's the only suggestion that I can give you.

I hope this helps.
Take care.

Share this post


Link to post
Share on other sites
Mike.Popoloski    3258
I have tried starting and then stopping the thread right in a row, and then continuing as normal. This works fine. However, if I leave the thread running, when I make the call to SetIndices, I get an exception at address 0x00000000, and the dissasembly is all question marks. This isn't the first call I make to DirectX though. Why is this happening?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this