Slick Forums

Discuss the Slick 2D Library
It is currently Mon Aug 19, 2019 10:54 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Feb 28, 2013 2:31 pm 
Offline

Joined: Thu Feb 28, 2013 2:23 pm
Posts: 3
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.


Top
 Profile  
 
PostPosted: Fri Mar 01, 2013 10:09 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
Post the texture file that is causing the crash. Also make sure that your path is case-sensitive and all that jazz.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group