This problem may not be LWJGL, but it only occurs when it is present. I'm experiencing something really strange, and I don't know what's causing it at all. This is the problematic line of code:
BufferedImage out = new BufferedImage(256, 256, BufferedImage.TYPE_INT_RGB);
This code can be called anywhere, in any thread, and instantly all threads freeze. If it is called before GLFW is bound, the thread doesn't freeze, everything gets called, but the GLFW window never opens. Note: I am using Mac, so I have -XstartOnFirstThread
as a JVM argument, but I don't think that would cause it.
Actually, it is not related to that argument, it runs perfectly fine with and without it in another test project without LWJGL.