On Mac OS X El Capitan, OpenGL version 4.1, my LWJGL 3.0 app hangs when calling the Slick2D function TextureLoader.getTexture()
Here's the code I'm attempting to use to load the texture. It is run on the same thread as the main loop, and is called after the window is set up.
FileInputStream file = new FileInputStream("src/AppIcon.png");
texture = TextureLoader.getTexture("PNG", file);
The file does exist, and the code works fine when I comment out the code for texturing, which is this method
public int loadTexture(String filename){
Texture texture = null;
try{
FileInputStream file = new FileInputStream(filename + ".png");
//The app freezes here
texture = TextureLoader.getTexture("png", file);
//"LOADED" is never printed to the console.
System.out.println("LOADED");
}
catch(FileNotFoundException e){
e.printStackTrace();
}
catch(IOException e){
e.printStackTrace();
}
return texture.getTextureID();
}
The texture I'm attempting to use is a 1024 x 1024 PNG image,
I've also tried using a much smaller 16 x 16 pixel image,
but I get the same result.
Both images are physically okay, no errors are logged, and the last thing that is printed in console is from Slick2D, stating
INFO:Use Java PNG Loader = true
Is this an OS specific bug, or am I doing something wrong?