Slick Forums

Discuss the Slick 2D Library
It is currently Sun Apr 20, 2014 10:47 am

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Tue Apr 21, 2009 12:09 pm 
Offline

Joined: Tue Apr 21, 2009 12:06 pm
Posts: 8
Hello,

I was at school and wanted to make slick working on my computer for a project. I did this tuto to configure slick with eclipse http://www.cs.bsu.edu/homepages/pvg/mis ... torial.php and it works at home but not at school.

This is my error

Code:
Tue Apr 21 14:12:43 CEST 2009 INFO:Slick Build #257
Tue Apr 21 14:12:43 CEST 2009 INFO:LWJGL Version: 2.0b1
Tue Apr 21 14:12:43 CEST 2009 INFO:OriginalDisplayMode: 1280 x 1024 x 32 @75Hz
Tue Apr 21 14:12:43 CEST 2009 INFO:TargetDisplayMode: 800 x 600 x 0 @0Hz
Tue Apr 21 14:12:43 CEST 2009 ERROR:Could not find a valid pixel format
org.lwjgl.LWJGLException: Could not find a valid pixel format
   at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
   at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
   at org.lwjgl.opengl.WindowsDisplayPeerInfo.initDC(WindowsDisplayPeerInfo.java:54)
   at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:158)
   at org.lwjgl.opengl.Display.createWindow(Display.java:299)
   at org.lwjgl.opengl.Display.create(Display.java:848)
   at org.lwjgl.opengl.Display.create(Display.java:800)
   at org.newdawn.slick.AppGameContainer.tryCreateDisplay(AppGameContainer.java:299)
   at org.newdawn.slick.AppGameContainer.access$000(AppGameContainer.java:34)
   at org.newdawn.slick.AppGameContainer$2.run(AppGameContainer.java:364)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:345)
   at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
   at gameObject.pkg.SimpleTest.main(SimpleTest.java:75)
org.newdawn.slick.SlickException: Failed to initialise the LWJGL display
   at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:375)
   at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
   at gameObject.pkg.SimpleTest.main(SimpleTest.java:75)


I think the error is that i'm working with windows XP on VirtualPC 2007. So I thought opengl doesn't work but I can launch an OpenGL Application coded with SFML for example.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 21, 2009 12:47 pm 
Offline
Regular
User avatar

Joined: Tue Apr 03, 2007 9:27 pm
Posts: 100
Location: Canada
I'm not sure what the problem is, but here is what you can try to debug the problem.

Have you tried some sample slick web start from the website. If they work then you are simply trying to set a invalid resolution. The display size appears to be correct, but perhaps your bit dept is not support.

I know that some video card do not support certain refresh rate/bit dept/resolution combination. Try experimenting with the permutation and changing the window' resolution as well.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 21, 2009 12:59 pm 
Offline

Joined: Tue Apr 21, 2009 12:06 pm
Posts: 8
BenoitGirard wrote:
I'm not sure what the problem is, but here is what you can try to debug the problem.

Have you tried some sample slick web start from the website. If they work then you are simply trying to set a invalid resolution. The display size appears to be correct, but perhaps your bit dept is not support.

I know that some video card do not support certain refresh rate/bit dept/resolution combination. Try experimenting with the permutation and changing the window' resolution as well.


Tue Apr 21 15:04:41 CEST 2009 INFO:OriginalDisplayMode: 800 x 600 x 32 @75Hz
Tue Apr 21 15:04:41 CEST 2009 INFO:TargetDisplayMode: 800 x 600 x 0 @0Hz

I tried 16x bits and 32x bits, it doesn't work. I can launch without probs the webstart demos.

The card of the virtual machine is S3 Tri32/64, I try new drivers


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 21, 2009 1:01 pm 
Offline
Regular
User avatar

Joined: Tue Apr 03, 2007 9:27 pm
Posts: 100
Location: Canada
If the webstart demo work correctly, try to pull up the source code for them from the site and initialize your game the same way. If the webstart work with that resolution you should be able to get your game to work with that same initialization sequence.

After that you can try to increase the resolution slowly until it work (or stops working).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 21, 2009 1:47 pm 
Offline

Joined: Tue Apr 21, 2009 12:06 pm
Posts: 8
Hello again.

I can't launch at school the webstart demos, sorry.

It downloads and nothing happens.

EDIT: I can launch applet like pulpcore http://www.interactivepulp.com/pulpcore/images/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 21, 2009 5:45 pm 
Offline

Joined: Sat Oct 04, 2008 3:58 am
Posts: 99
I can't launch slick apps under VMWare Fusion either, and it uses the same video driver.

I suspect it's a limitation of lwjgl, or a limitation of how slick implements it. Run it outside of a virtual machine and you'll have no problems.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 22, 2009 3:18 am 
Offline

Joined: Wed Apr 22, 2009 3:05 am
Posts: 4
Mindless, i follow your tutorial but i had to add the lwjgl.dll to the project in eclipse.
if i don't add the file i get an error.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 22, 2009 5:11 am 
Offline

Joined: Tue Apr 21, 2009 12:06 pm
Posts: 8
I added native-win32.jar to the projects, so I got the dll in the folder too.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 22, 2009 12:39 pm 
Offline

Joined: Tue Apr 21, 2009 12:06 pm
Posts: 8
Problem solved.

I must add "-Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true" to VM arguments


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 22, 2009 4:10 pm 
Offline

Joined: Wed Apr 22, 2009 3:05 am
Posts: 4
good to know :D


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 27, 2009 1:34 am 
Offline

Joined: Mon Apr 27, 2009 1:30 am
Posts: 1
So, google searching for the same error as the OP, I came across this thread. However, even once I've added "-Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true" to my VM arguments I get essentially the same error (I uh.. think...)

Any ideas? I've got the libs for all three operating systems included, in case there was a cross-dependency.

Code:
Sun Apr 26 21:32:54 EDT 2009 INFO:Slick Build #257
Sun Apr 26 21:32:54 EDT 2009 INFO:LWJGL Version: 2.0b1
Sun Apr 26 21:32:54 EDT 2009 INFO:OriginalDisplayMode: 1920 x 1200 x 24 @60Hz
Sun Apr 26 21:32:54 EDT 2009 INFO:TargetDisplayMode: 640 x 480 x 0 @0Hz
Sun Apr 26 21:32:55 EDT 2009 ERROR:X Error - disp: 0xffffffff90ad2150 serial: 56 error: BadMatch (invalid parameter attributes) request_code: 1 minor_code: 0
org.lwjgl.LWJGLException: X Error - disp: 0xffffffff90ad2150 serial: 56 error: BadMatch (invalid parameter attributes) request_code: 1 minor_code: 0
   at org.lwjgl.opengl.LinuxDisplay.globalErrorHandler(LinuxDisplay.java:286)
   at org.lwjgl.opengl.LinuxDisplay.nCreateWindow(Native Method)
   at org.lwjgl.opengl.LinuxDisplay.createWindow(LinuxDisplay.java:431)
   at org.lwjgl.opengl.Display.createWindow(Display.java:299)
   at org.lwjgl.opengl.Display.create(Display.java:848)
   at org.lwjgl.opengl.Display.create(Display.java:800)
   at org.newdawn.slick.AppGameContainer.tryCreateDisplay(AppGameContainer.java:299)
   at org.newdawn.slick.AppGameContainer.access$000(AppGameContainer.java:34)
   at org.newdawn.slick.AppGameContainer$2.run(AppGameContainer.java:364)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:345)
   at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
   at SimpleTest.main(SimpleTest.java:21)
org.newdawn.slick.SlickException: Failed to initialise the LWJGL display
   at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:375)
   at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
   at SimpleTest.main(SimpleTest.java:21)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 30, 2009 10:32 am 
Offline
User avatar

Joined: Fri Dec 28, 2007 3:37 pm
Posts: 87
Location: bremen, germany
try to replace the lwjgl.jar, liblwjgl.so and liblwjgl64.so files with the new files from lwjgl 2.1.0 (download the archive here: http://lwjgl.com/download.php).
[edit: wrong, take the version from the current svn trunk, that'll work]

I had /have a similar error, cause I'm using a new XServer (7.4) on my Kubuntu 9.04 machine. If it doesn't help, ask the developers of lwjgl. (http://lwjgl.com/contact.php)

Cheers, kulpae


Last edited by cenarius on Tue Sep 22, 2009 12:34 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: If it doesn't help ...
PostPosted: Thu Apr 30, 2009 7:40 pm 
Offline

Joined: Thu Apr 30, 2009 7:34 pm
Posts: 2
Try also downloading the latest build for the module from here:

https://www.newdawnsoftware.com/hudson/view/LWJGL/

This worked for my ATI Radeon Mobile under latest Ubuntu.


Top
 Profile  
 
PostPosted: Fri Jun 12, 2009 11:36 pm 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
I had the same/similar problem upon upgrading to Ubuntu 9.04 from Ubuntu 8.10

Any time I tried to compile one of my apps that was using Slick, it would conk out and throw an error. I just downloaded the nightly build of LWJGL from the link provided in the previous post and replaced the native libs. Now all is well.


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

All times are UTC


Who is online

Users browsing this forum: HariboTer and 1 guest


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