I have a problem with
TextureLoader packed in
Slick-util.
I use it to load textures like this:
Code:
Texture texture = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream(resourcePath));
This works perfectly on Linux, but when I sent the project to my friend who uses Windows 8, he got this crash:
Code:
java.lang.IllegalArgumentException: Buffer size <= 0
at java.io.BufferedInputStream.<init>(Unknown Source)
at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:53)
at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:43)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:363)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:342)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:288)
at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:64)
at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:24)
... some more ...
(I sent the entire Eclipse project, so there is no way how some parts of it might get missing.)
The texture file does exist, and I can't find any reason why it should not on windows.
Also the natives are set up properly.
What should I do to fix it? I really want to continue using Slick-Util for my project.