Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segement Fault in c_pcb_View:main() 326:glGenVertexArrays() #12

Open
Davidlihuang opened this issue Feb 21, 2023 · 2 comments
Open

Comments

@Davidlihuang
Copy link

Davidlihuang commented Feb 21, 2023

Env:
Ubuntu18.04, vmware
OpenGL version string: 3.3 (Compatibility Profile) Mesa 20.0.8

Error:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000000000 in ?? ()

solve:
start GLEW extension handler after glfwMakeContextCurrent(window) called;
such as:

        auto window = glfwCreateWindow(width, height, "PCB Viewer", NULL, NULL);
	if (!window)
	{
		glfwTerminate();
		exit(EXIT_FAILURE);
	}
	glfwMakeContextCurrent(window);

	    // start GLEW extension handler huangli  add successful
  	√ glewExperimental = GL_TRUE;
  	√ glewInit();

         glfwSetKeyCallback(window, key_callback); 
         ```
    
@Davidlihuang Davidlihuang changed the title Segement Fault in c_cpp_View:main() 326:glGenVertexArrays() Segement Fault in c_pcb_View:main() 326:glGenVertexArrays() Feb 21, 2023
@vygr
Copy link
Owner

vygr commented Mar 9, 2023

I'll try get time to update things. Thanks.

@Davidlihuang
Copy link
Author

You're welcome. Your works help me a lot. Thanks too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants