Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


m_pD3D crash and burn

This topic is 6302 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

Hey all! Up until just recently my prog had been running fine, then I decided to restructure it a bit and put the D3D device (m_pD3D) and the D3D Rendering device (m_pd3dDevice) into a class called CDirect3D_Devices. The idea was to make the devices accessable to any of my functions and classes that would want to render or load something using them. The class is tiny - it has only those two member variables, a constructor (which sets both of the D3D variables to "NULL") and a "CleanUp" function that releases them. Both member variables are public. When I ran the program it caused a general protection fault. Damn. The offending bit of code was the first line in the program where it accessed the m_pD3D variable of the Direct3D_Devices class. It just happened to be the one where Direct3DCreate is called on the object. I slapped in a NULL test before that line, and because this test accessed the m_pD3D object the program produced another GPF. I wondered if it was the m_pD3D object itself that was at fault, or the class that was accessing it, so I tried accessing it from another class and then from its own CDirect3D_Devices class, both times causing a GPF. I''m completely stumped, and I''m not well-versed enough in debugging and don''t know enough about the DX8 system to work out why it''s crashing. I hope someone can help me! Thanks, Gareth

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!