I am trying to run one of the simplest OpenGL 3.3 programs one can ever run but it wouldn't run successfully. The program always returns with negative integer.
Here is how I got to this situation. I did nothing on my own but following this guide LearnOpenGL - Creating a window.
Important notice: When you first build the program and then run it the first time, I can see the OpenGL window's opening but within a second it closes automatically; without any KB and/or Mouse interaction and then I get a negative integer as return in the console window. If I keep running the program again and again, I don't see that new UI Window again unless I rebuild it and then run it again.
When I use the debug, it invokes the following exception:
Exception Unhandled
Unhandled exception at 0x0000000010002203 (EZFRD64.dll) in opengl1.exe: 0xC0000005: Access violation reading location 0x00000000731A0090.
What wrong am I doing? Where did I go wrong?
Following is my system configuration:
CPU: Intel Xeon-E3 1246 v3 (This is Intel's 4th Geneartion/Haswell architecture),
GPU: Integrated Intel HD P4600/P4700 (basically it is Intel HD 4600 like all those 4th gen i5s and i7s have)
Latest Graphics Driver (Driver Date under Device Manager: 21-Jan-2020) has been installed.
"OpenGL Extension Viewer" is showing the following core feature support:
OpenGL 3.0: 100% support.
OpenGL 3.1: 100% support.
OpenGL 3.2: 100% support.
OpenGL 3.3: 100% support.
OpenGL 4.0: 100% support.
OpenGL 4.1: 100% support.
OpenGL 4.2: 100% support.
OpenGL 4.3: 100% support.
OpenGL 4.4: 80% support.
OpenGL 4.5: 18% support.
OpenGL 4.6: 9% support.
OpenGL ARB 2015: 8% support.
Following is the code I am trying to run:
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <iostream>
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void processInput(GLFWwindow* window);
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;
int main()
{
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "LearnOpenGL", NULL, NULL);
if (window == NULL)
{
std::cout << "Failed to create GLFW window" << std::endl;
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
{
std::cout << "Failed to initialize GLAD" << std::endl;
return -1;
}
while (!glfwWindowShouldClose(window))
{
glfwSwapBuffers(window);
processInput(window);
glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glfwPollEvents();
}
glfwTerminate();
return 0;
}
void processInput(GLFWwindow* window)
{
if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS)
glfwSetWindowShouldClose(window, true);
}
void framebuffer_size_callback(GLFWwindow* window, int width, int height)
{
glViewport(0, 0, width, height);
}
RE: that mysterious EZFRD64.dll
, a post on Reddit:
According to google "EZFRD64.dll" mentioned there is a driver for some generic/off-brand "USB Vibration Controller" and appears to be known to cause issues at least on Windows 10.
See 1 2 3 and many more posts just on the first page of results for that dll.
Janky code running in/near the kernel can cause problems, film at 11 :)
User contributions licensed under CC BY-SA 3.0