Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Access violation in C++ (http://www.go4expert.com/forums/access-violation-cpp-t26285/)

bubblesppf 14Jul2011 19:45

Access violation in C++
 
I have been trying to resolve the access violation in the program for bounding volume hierarchy. Which takes an 3-D object "statue.ply" and creates a bounding volume hierarchy through which a ray tracer is used. I get an access violation error while running it. I have used SDL and lib3d packages.
I'm using visual studio 2010 on windows 7

>Error: Unhandled exception at 0x00fa2e80 in bvh.exe: 0xC0000005: Access violation reading location 0x00000004.

Call Stack :> `bvh.exe!Triangle::Triangle(const Vertex * vertexA, const Vertex * vertexB, const Vertex * vertexC, unsigned int r, unsigned int g, unsigned int b, bool twosided, bool triNormalProvided, Float3 triNormal)` Line 393 + 0x150 bytes C++


can anyone help with it.

Thank you

xpi0t0s 19Jul2011 12:14

Re: Access violation in C++
 
If there's really only one entry in the call stack then this means something has trashed the stack, probably a memory corruption of some sort. Check for buffer overflows and use of uninitialised or freed pointers.


All times are GMT +5.5. The time now is 09:20.