1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Access violation in C++

Discussion in 'C++' started by bubblesppf, Jul 14, 2011.

  1. bubblesppf

    bubblesppf New Member

    Joined:
    Jul 14, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    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.
     

Share This Page