Hello all, working on an assignment for a class and I'm encountering something strange.
After I'm getting a bad memory allocation exception upon exiting my program. After debugging the problem it appears to be a result of trying to make vector with negative length. The program runs fine until it exits, upon exit it's trying to call glUseProgram, then it tries to print the log. The error is caused because I didn't think I would have to sanity check the output of glGetShaderiv(programID, GL_INFO_LOG_LENGTH, &size) after confirming that an error had occurred.
It is giving a size of -858993460. Although I can just check for this to avoid the exception I am very interested in why it is doing so. I have googled and received no explanations. Does anyone know what could be happening?