The OpenGL binding uses withCAStringLen where it should use withCAString
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).
Trac metadata
Trac field | Value |
---|---|
Version | 6.8.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries (other) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | bkomuves@gmail.com |
Operating system | Unknown |
Architecture | Unknown |