Hello Guest

[SOLVED] glfwTerminate causes freeze

  • 2 Replies
[SOLVED] glfwTerminate causes freeze
« on: July 30, 2017, 14:26:06 »

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?
« Last Edit: July 30, 2017, 20:26:21 by Optimus »



Re: [BUG] glfwTerminate causes freeze
« Reply #1 on: July 30, 2017, 18:59:50 »
Could you post a single-file Minimal, Complete and Verifiable Example which demonstrates the issue?

Re: [BUG] glfwTerminate causes freeze
« Reply #2 on: July 30, 2017, 20:26:05 »

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.