Jump to content
  • Advertisement
Sign in to follow this  
Programmer101

Directx behaving very strangely

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

I have just added input to my directx powered program and it is being VERY strange. The problem is that when I initialize input my program crashes on exit. So I played around with it for a while to isolate the problem. Eventually I found that if I don't load my effect file with the D3DXSHADER_OPTIMIZATION_0,1,2,or 3 flag the program does not crash on exit. This works both ways, I can use D3DXSHADER_OPTIMIZATION_0,1,2,or 3 as long as I don't initialize input. Is there any relation between the two? I didn't think there was but apparently... I could just go without optimization but when I do my effects with multiple passes cause the program to crash on exit. This whole thing is really maddening because I have no idea why this is happening. Thats not the only thing that is weird. I also get an error on exit when I don't use the D3DXSHADER_DEBUG flag. I don't get it! Can anyone please help me. I guess an error on exit is better than on startup but this is insane and it will eventually drive me insane. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
So you're saying that DirectInput and Direct3D appear to be inter-related somehow and that changes to one creates/solves a crash in another?

There isn't any reason for this and I've never heard of any known issues, bugs or reasons for this to happen. Hate to say it, but 99.9% likely that the bug is in your codes usage of the respective API's [headshake]

A crash on exit is very often due to bad resource management - failing to clear something up for example.

  • Have you stepped through your code to verify everything works as expected?
  • Are you checking all appropriate HRESULT's?
  • Run with debug runtimes (for both API's) and checked for error messages?
  • Run usual Visual Studio memory leak detection?
  • Is it reproducible on other systems?
  • Can you integrate your DInput code into a D3D SDK sample and reproduce the same characteristics?


hth
Jack

Share this post


Link to post
Share on other sites
Yeah that probably is the problem. I would think it was the result of bad resource management too but the two components work in my program fine when they are used by themselves. I'll try that stuff though.

Loading that effect has caused me worlds of problems on exit so maybe I'm doing that wrong and thats the problem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!