Slick Forums

Discuss the Slick 2D Library
It is currently Thu Jun 20, 2013 4:17 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri May 28, 2010 8:47 pm 
Offline

Joined: Sat Oct 04, 2008 3:58 am
Posts: 99
Not 100% sure this is a bug, but it looks like it.

Code:
System.out.println("Loading " + i.TextureFilename);
image = new BigImage(i.TextureFilename, Image.FILTER_NEAREST, 512);

produces
Code:
Loading assets\gfx\backgrounds\black.png
Loading assets\gfx\walls\wall3.png
Exception in thread "main" java.nio.BufferUnderflowException
   at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:221)
   at org.newdawn.slick.BigImage.build(BigImage.java:230)
   at org.newdawn.slick.BigImage.build(BigImage.java:151)
   at org.newdawn.slick.BigImage.<init>(BigImage.java:102)
   at net.fireslash.holonic.world.OMObject.init(OMObject.java:71)
   at net.fireslash.holonic.world.OMLayer.init(OMLayer.java:38)
   at net.fireslash.holonic.world.ObjectMap.init(ObjectMap.java:215)
   at net.fireslash.holonic.world.OMEnvironment.init(OMEnvironment.java:120)
   at net.fireslash.holonic.states.LevelState.setLevel(LevelState.java:65)
   at net.fireslash.holonic.Holonic.initStatesList(Holonic.java:48)
   at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:157)
   at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:390)
   at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
   at net.fireslash.holonic.Holonic.main(Holonic.java:83)

Some notes:
black.png is 4721x5316 and loads without exception
wall3.png is 256x795 and raises the exception

I'm guessing this is because the x dimension doesn't violate the tilesize I've set of 512, but the y dimension does.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2010 7:48 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Fixed in SVN

Could you retest this one, it's fine in my test scenario.

Kev


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: Bing [Bot] and 0 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:  
Powered by phpBB® Forum Software © phpBB Group