[SOLVED] glfwTerminate causes freeze

Started by Optimus, July 30, 2017, 14:26:06

Previous topic - Next topic

Optimus

Hello,

I am using lwjgl 3 for my program on my desktop computer, and everything was fine.
I moved to a laptop and everything work fine except for glfwTerminate() which causes freeze. It freezes during about 10-15 seconds then it does its job (I guess).

I moved to a ASUS- ZenBook Plus, which does not have a classical graphics card. It is using Intel HD Graphics (not sure what it is). And I moved from Windows 7 to Windows 10 (probably not the problem).

I tested two things :
- The program terminates properly if I remove everything except the creation of the window, the creation of the shaders and glfwTerminate(). It begins to have issues when I had the vertex arrays.
- If I remplace glfwTerminate() with glfwDestroyWindow(window), it also freezes.

I could simply remove glfwTerminate(), but I guess that it's not the good way to solve my problem.

I can give you any other informations. Do anyone have an idea to solve this?

Kai


Optimus

Well..

After seeing you post, I decided to reproduce the freeze with a minimum a line. And it seams that I find what was happening.

This afternoon, I removed glfwTerminate(), and I worked to optimise the memory I use. I made so my program create a lot less vertex arrays. And it seams to solve the problem. The freeze was probably due to the time wasted on freeing memory for all the vertex arrays.

I'm still not totally used on how opengl works.