| ben1996123 (31) | |||
|
When I try to create some variables (array of GLfloats, not sure about other types), I get this error: Unhandled exception at 0x02c6ee05 in gltools_4.exe: 0xC0000005: Access violation reading location 0x10624dd3. Here's the program code:
I have linked to the GLTools library and added gltools.lib and freeglut_static.lib to the project (I have the opengl superbible 5th edition and that's what it said to do, but I still get this error). Anyone know how to fix it? | |||
|
|
|||
| Moschops (5961) | |
|
Build with debug symbols, run under debugger, identify the line of your code that attempts to use memory that does not belong to you, fix that code. Example of finding exactly this kind of problem (more commonly known as a segFault) using the gdb debugger: http://www.cplusplus.com/articles/iwTbqMoL/ | |
|
Last edited on
|
|
| ben1996123 (31) | |
It's shaderManager.UseStockShader(GLT_SHADER_IDENTITY);, but when you say "fix that code", that's what I'm asking how to do...Also, it happened before on line 23, but I made a new project and copied and pasted the code into it and it worked then. Edit: Never mind, I managed to fix it. For some reason it wasn't working because I was trying to debug it :p As soon as I changed Debug to Release, it worked. | |
|
Last edited on
|
|