Slick Forums
http://slick.ninjacave.com/forum/

java.lang.IllegalArgumentException: Buffer size <= 0
http://slick.ninjacave.com/forum/viewtopic.php?f=1&t=5506
Page 1 of 1

Author:  Squeakbox [ Tue Sep 11, 2012 10:27 pm ]
Post subject:  java.lang.IllegalArgumentException: Buffer size <= 0

Here's the error:
Code:
    Exception in thread "main" java.lang.IllegalArgumentException: Buffer size <= 0
            at java.io.BufferedInputStream.<init>(BufferedInputStream.java:193)
            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:277)
            at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:231)
            at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:184)
            at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:64)
            at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:37)
            at LetterList.letterSearch(LetterList.java:284)


It is called from a Texture object using TextureLoader:
Code:
letterTex = TextureLoader.getTexture("PNG",letterFile,true);


Apparently someone in the irc channel I was in pointed out that is.available() is used as a buffered size. Perhaps this can be changed?

Author:  MightyPork [ Thu Feb 28, 2013 6:32 pm ]
Post subject:  Re: java.lang.IllegalArgumentException: Buffer size <= 0

I had the same problem when I sent my game to a friend with Windows. It worked for me on Linux though...
I am still trying to find why it happened.

Author:  MightyPork [ Thu Feb 28, 2013 9:20 pm ]
Post subject:  Re: java.lang.IllegalArgumentException: Buffer size <= 0

Now I sent it to him again, and it worked.
Apparently there was some problem with the loaded texture file, although I would expect it to throw IOException instead... this crash remains a mystery to me.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/