Jump to content
  • Advertisement
Sign in to follow this  
StaticAres

[help request] Possible NULL Pointer.

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

PBVideo.cpp http://pastebin.com/mf610e9f PBVideo.h http://pastebin.com/mf6f5dda Description These files are part of a bigger solution. These files will compile as a dll and export all functions of the class. When you build PBVideo then include PBVideo.h and link to PBVideo.lib you should be able to use them from another project. Problem is, when calling PBVideo::addSprite the d3ddev device class point seems to be corrupt. (Show Debug Info Below) Any idea how this can be fixed? Debug Info Unhandled exception at 0x00341154 (PBVideo.dll) in Demo.exe: 0xC0000005: Access violation reading location 0x0000000c.

Share this post


Link to post
Share on other sites
Advertisement
When you get that exception, use the debugger to inspect the values of the pointers instead of guessing. That'll tell you what pointer is null.

Then, you can use the Debug Runtimes to see if there's any errors creating resources, and then track down why your code is using a null pointer instead of checking for errors and exiting.

Share this post


Link to post
Share on other sites
Sorry, but I don't want to encourage this rent-a-coder style of posting in this forum. We're not code-monkeys for hire here [smile]

Please go read Introduction to Debugging, its a great article if you're not familiar with how to solve problems yourself with the tools you have available.

A simple step-through of your code should reveal quite quickly which variable is broken and you can trace it backwards from there - find out which state the application is in at each given point in time for example.

Once you've narrowed it down further, please feel free to post back with specific DirectX code that you don't understand or can't figure out the problems.


Happy hunting,
Jack

Share this post


Link to post
Share on other sites

This topic is 3677 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.

Guest
This topic is now closed to further replies.
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!