Sign in to follow this  
StaticAres

[help request] Possible NULL Pointer.

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
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
Guest
This topic is now closed to further replies.
Sign in to follow this