Slick Forums

Discuss the Slick 2D Library
It is currently Wed May 22, 2013 7:02 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Thu Dec 16, 2010 11:31 pm 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 619
Location: Iceland
If I start a game in windowed mode, and then change it to fullscreen, then load a jpeg, the game window will crash and give me no errors or exception.

I'm on Windows 7.

Here's a test code, press spacebar to produce the error:

Code:
package testing;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;

public class TestJpegGame extends BasicGame {

   private Image img;

   public TestJpegGame(String title) {
      super(title);
   }

   @Override
   public void init(GameContainer container) throws SlickException {
   }

   @Override
   public void update(GameContainer container, int delta) throws SlickException {
   }

   @Override
   public void render(GameContainer container, Graphics g) throws SlickException {
      if(img != null)
         img.draw();
   }
   
   @Override
   public void keyPressed(int key, char c) {
      if(key == Input.KEY_SPACE && img == null) {
         try {
            img = new Image("resources/mapdata/squeeze_terrain.jpg");
         } catch (SlickException e) {
            e.printStackTrace();
         }
      }
   }
   
   public static void main(String[] args) throws SlickException {
      TestJpegGame game = new TestJpegGame("Testing");
      AppGameContainer container = new AppGameContainer(game);
      container.setDisplayMode(1920, 1200, true);
      container.setAlwaysRender(true);
      container.start();   
   }

}


The image is here:
http://gamadu.com/temp/towerfield/squeeze_terrain.jpg

Change the resolution and image path to match your setup.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 16, 2010 11:37 pm 
Offline
Game Developer
User avatar

Joined: Wed Feb 17, 2010 12:24 am
Posts: 594
Does it happen if you load the Image in init() instead of main()?

Also please post the console output. It should have an exception or other info.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 16, 2010 11:41 pm 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 619
Location: Iceland
dime wrote:
Does it happen if you load the Image in init() instead of main()?

Also please post the console output. It should have an exception or other info.


I said "give me no errors or exception". There's nothing in the console besides the usual.

Code:
Thu Dec 16 23:27:27 GMT 2010 ERROR:Unable to determine Slick build number
Thu Dec 16 23:27:27 GMT 2010 INFO:LWJGL Version: 2.5
Thu Dec 16 23:27:27 GMT 2010 INFO:OriginalDisplayMode: 1920 x 1200 x 32 @59Hz
Thu Dec 16 23:27:27 GMT 2010 INFO:TargetDisplayMode: 1920 x 1200 x 32 @59Hz
Thu Dec 16 23:27:28 GMT 2010 INFO:Starting display 1920x1200
Thu Dec 16 23:27:28 GMT 2010 INFO:Use Java PNG Loader = true
WARNING: Found unknown Windows version: Windows 7
Attempting to use default windows plug-in.
Loading: net.java.games.input.DirectAndRawInputEnvironmentPlugin
Thu Dec 16 23:27:28 GMT 2010 INFO:Found 1 controllers
Thu Dec 16 23:27:28 GMT 2010 INFO:0 : G9 Laser Mouse


And it works if I load it in the init().


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 19, 2010 6:20 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Is there a vm crash log in java/bin or in the running directory?

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 20, 2010 8:21 pm 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 619
Location: Iceland
Sorry, couldn't find any crash logs anywhere.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2011 10:04 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Can't reproduce, is this still happening?

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 23, 2011 3:13 pm 
Offline
Site Admin

Joined: Mon Dec 08, 2008 2:17 pm
Posts: 140
Could not reproduce the crash with build #274 and latest from svn
running on linux.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 28, 2011 11:55 pm 
Offline

Joined: Mon Feb 16, 2009 11:33 am
Posts: 16
Hello,

I am having the exact same issue: crash while in full screen and loading JPEG images under Windows 7 64bits.

I tried loading a lot of different JPEG images from different sources and different size (very small to very big) and the issue keeps happening. I have no issue when loading GIF, PNG or TGA images.

I also tried to use JRE 32 bits instead of 64 bits and it doesn't change anything.

I also confirm that the issue is not happening if the image is loaded during the init() method.

I'm using Slick Build #274 and LWJGL verion 2.7.1.

It's true that we don't get any error message but we do get an exit code other than 0. It's never the same exit code but it is always very big and negative like for example "-1073741819" or "-805306369".

I tried to run the code from appel and I get the error as you can see: http://img820.imageshack.us/i/slickjpegfullscreenissu.jpg/

I will make some additionnal tests on my side (under Windows Vista 32 bits for example) and give you as much information as possible.

Thx


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

All times are UTC


Who is online

Users browsing this forum: No registered users 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