Monday, November 2, 2015

C++ Access Violation errors

C++ Access Violation errors are always a sign of a invalid or null pointer.

While debugging in VS, you should be careful with the arrow VS uses to indicate the failing line. It can be one line lower on screen then the actual failing line.

Also, these errors can be generated by violating required command order.
For example , if one calls :


GLuint textureID;
glGenTextures(1, &textureID);

before gl is initialized, it will fail with Access Violation error, as the function cannot find the variables it rely on.

No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...