liamg / darktile

:waning_crescent_moon: Darktile is a GPU rendered terminal emulator designed for tiling window managers.
MIT License
3.04k stars 112 forks source link

GL error GL_INVALID_OPERATION message #153

Closed vadymeng0 closed 3 years ago

vadymeng0 commented 5 years ago

Describe the bug When Aminal is running with -debug option, on each resize of the window, the following messages appearing in the log:

2019-01-16T21:34:03.331+0700    INFO    gui/gui.go:531  GL debug message: Error has been generated. GL error GL_INVALID_OPERATION in (null): (ID: 173538523) Generic error
2019-01-16T21:34:03.331+0700    INFO    gui/gui.go:531  GL debug message: Error has been generated. GL error GL_INVALID_OPERATION in (null): (ID: 173538523) Generic error
2019-01-16T21:34:03.344+0700    INFO    gui/gui.go:531  GL debug message: Error has been generated. GL error GL_INVALID_OPERATION in (null): (ID: 173538523) Generic error
2019-01-16T21:34:03.344+0700    INFO    gui/gui.go:531  GL debug message: Error has been generated. GL error GL_INVALID_OPERATION in (null): (ID: 173538523) Generic error

To Reproduce Steps to reproduce the behavior:

  1. Run Aminal with -debug option
  2. Try to resize the window
  3. See the error messages in the log

Environment (please complete the following information):

Additional context

  1. I'm suspecting that this may lead to leaks of OpenGL memory
  2. When testing on my Debian Stretch VM, there is no such a message
  3. These error messages caused by calls to gl.DisableVertexAttribArray() in glfont/truetype.go, lines 56 and 61. Commenting out those calls eliminates the error messages.
  4. According to the documentation (https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glEnableVertexAttribArray.xhtml),

GL_INVALID_OPERATION is generated by glEnableVertexAttribArray and glDisableVertexAttribArray if no vertex array object is bound.

But there is a call to gl.BindVertexArray().

So this bug seems strange and needs investigation...

liamg commented 3 years ago

Closed due to complete rewrite as part of bringing the project back to life, please create a new issue if still relevant. Thank you!