Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#2144 closed bug (invalid)

The OpenGL binding uses withCAStringLen where it should use withCAString

Reported by: guest Owned by:
Priority: normal Milestone:
Component: libraries (other) Version: 6.8.2
Keywords: Cc: bkomuves@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


In the module Graphics.Rendering.OpenGL.GL.Shaders (and possibly in other parts of the OpenGL binding, I didn't check) when passing a string to the OpenGL drivers, the library always uses withCAStringLen to marshal the strings, which does not put the required the zero byte at the end of the string. This causes the functions getAttribLocation, bindAttribLocation and uniformLocation to fail randomly (it was a real pain to localize this bug...). The solution is to use withCAString in these cases instead (and meantime, as a workaround, to put the zero character there manually in the client code).

Change History (3)

comment:1 Changed 8 years ago by igloo

  • difficulty set to Unknown
  • Resolution set to invalid
  • Status changed from new to closed

Thanks for the report; however, bugs in OpenGL should be reported to its maintainer, Sven Panne <sven.panne@…>.

comment:2 Changed 7 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:3 Changed 7 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.