There seems to be a threading bug in GLFW. My program now crashed for the second time in
1 _GLFWthread * _glfwGetThreadPointer( int ID )
3 _GLFWthread *t;
5 for( t = &_glfwThrd.First; t != NULL; t = t->Next )
7 if( t->ID == ID )
13 return t;
at the line 7. t is not a valid pointer (was 0xeeefeeef or 0xfeeefeee). I recognized that this function is called from the new thread wrapper function _glfwNewThread. The problem might be that functions modifying _glfwThrd are atomic in main thread, but glfwGetThreadPointer might access the _glfwThrd at any time.
This bug is hard to reproduce. It occured two times for me when creating a lot of thread (~300) in a short period of time.
Is there quick workaround? Should i open a bug in the bug tracker?