Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Inexplicable Freezing  (Read 3087 times)
0 Members and 1 Guest are viewing this topic.
Offline Eliwood

Junior Member




Stencyl


« Posted 2007-01-03 04:54:55 »

For one user with the following setup, my project worked fine about a month ago. Then the exact same code (he tried the exact same versions, previous versions) did not work. He says that the only thing he did between then and now is a game installation. He tried updating his drivers AFTER the problem occured, and that didn't help either.

The exact problem is that the LWJGL window is created, and then everything stops right there. It doesn't even reach the game code.

Here are his specs. Yes they aren't optimal, but keep in mind that the project ran perfectly fine just a month ago with the exact same code.

Compaq Desktop
500 MHz Athlon K7
128 MB RAM
Voodoo 3 video card
Windows 98
Sound Blaster PCI 128

Sorry if I can't be more specific because this is definitely a user-specific issue if it's this wacky in nature. None of my nearly 50 other testers experience this issue.

Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #1 - Posted 2007-01-03 05:07:04 »

It's most likely the graphics card.

Tell him that he should change the desktop bit depth from 24/32 to 16 or vice versa. Not sure if that will help tho, but it's worth a try, I guess.

弾幕 ☆ @mahonnaiseblog
Offline Eliwood

Junior Member




Stencyl


« Reply #2 - Posted 2007-01-03 05:16:37 »

He started on 32. Switching to 16 has no effect. He has no 24-bit setting.

I just find it utterly odd that the same thing would work a month ago and not work now.


Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #3 - Posted 2007-01-03 07:19:54 »

somekind of stacktrace or log of where in the java code things stop working would probably help alot.

Offline Eliwood

Junior Member




Stencyl


« Reply #4 - Posted 2007-01-03 08:51:46 »

somekind of stacktrace or log of where in the java code things stop working would probably help alot.

I can get the latter. The former is harder since no error is thrown. It just kinda stops for him right after window creation but around display mode selection (this is not the same guy as the one who got 10 second load times).

This is GTGE's code (where the problem is occurring thanks to my output statements).

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
long start = System.currentTimeMillis();
      try {
         DisplayMode best = (fullscreen) ?
                        getBestDisplay(size) :
                        new DisplayMode(size.width, size.height);
         if (best == null) {
            throw new Exception();
         }

         Display.setDisplayMode(best);

      } catch (Exception e) {
         e.printStackTrace();

         throw new RuntimeException("LWJGL Error: "+
                              "Unable to set desired display " +
                              "mode ("+size.width+"x"+size.height+"x"+16+")");
      }

      try {
         Display.setTitle("Stencyl");
         Display.setFullscreen(fullscreen);
         Display.setVSyncEnabled(vsync);
         Display.create();
      } catch (Exception e) {
         e.printStackTrace();

         throw new RuntimeException("LWJGL Error: Unable to initialize display");
      }
     
      long end = System.currentTimeMillis();
      System.out.println("Display Selection Time = " + (end - start) + "ms"); //DOES NOT REACH HERE

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #5 - Posted 2007-01-03 11:21:03 »

since Display.create(); has nested calls, it would be a lot easier if you had some idea what specific line was causing the "hang" - something like a stacktrace.
I realise you would need to add some debug info to the lwjgl stuff, but it's pretty much impossible to guess where the error is.
have you tried running with -Dorg.lwjgl.util.Debug=true ?

Offline Ken Russell

JGO Coder




Java games rock!


« Reply #6 - Posted 2007-01-03 18:19:08 »

FYI, you can capture a thread dump of a running Java process using the "jstack" command in the JDK, supplying the process ID of the Java process on the command line. On Windows this is supported first in JDK 6.
Offline Eliwood

Junior Member




Stencyl


« Reply #7 - Posted 2007-01-04 01:17:56 »

Turning on the debug flag yielded this interesting tidbit.

Initial Mode: 1024 x 768 x 32 @0Hz
Insufficient Color Precision

What does that mean and why is it 0 Hz?

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #8 - Posted 2007-01-04 07:37:49 »

0Hz is usually on linux - but then it only has 24bits (alpha is ignored)
At any rate, try to create a default resolution 640x480x16x60Hz - if that works, then its a matter of the drivers not liking one of the modes you select.

Offline Eliwood

Junior Member




Stencyl


« Reply #9 - Posted 2007-01-09 21:16:52 »

Did exactly that, and it still doesn't work. I used the example off your site, and when it displays all the display modes, ALL of them are 0 Hz for this user.

So when I force 640x480x16x60 or 640x480x32x60, it just bumps the 60Hz to 0 because none of his display modes are above 0Hz to begin with.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
protected boolean setDefaultDisplayMode() {
   try {
       DisplayMode[] dm = org.lwjgl.util.Display.getAvailableDisplayModes(640, 480, -1, -1, -1, -1, 60, 60);

       /*org.lwjgl.util.Display.setDisplayMode(dm, new String[] { "width=" + 640, "height=" + 480, "freq=" + 60,
       "bpp=" + org.lwjgl.opengl.Display.getDisplayMode().getBitsPerPixel()});*/

       
       org.lwjgl.util.Display.setDisplayMode(dm, new String[] { "width=" + 640, "height=" + 480, "freq=" + 60,
             "bpp=16"});
       return true;
      } catch (Exception e)
      {
        e.printStackTrace();
   
        }
      return false;

        }

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #10 - Posted 2007-01-09 22:34:27 »

to be honest, I have no clue as to what is going on - however it IS a voodoo3 card... - no telling whats going on, its legacy!

Offline EgonOlsen
« Reply #11 - Posted 2007-01-10 21:01:01 »

I wonder that it ever worked. I asked some "retro" guys to test Paradroidz on Voodoo-cards once and the result was, that it didn't work at all, except when you are using a dual monitor setup, start the game on graphics-card 1 (non-Voodoo) and move the Window to the Voodoo.
Abouzt the video mode: A Voodoo3 can't do 32bit in 3D anyway.

Offline Eliwood

Junior Member




Stencyl


« Reply #12 - Posted 2007-01-11 00:21:22 »

I wonder that it ever worked. I asked some "retro" guys to test Paradroidz on Voodoo-cards once and the result was, that it didn't work at all, except when you are using a dual monitor setup, start the game on graphics-card 1 (non-Voodoo) and move the Window to the Voodoo.
Abouzt the video mode: A Voodoo3 can't do 32bit in 3D anyway.

Unless he was mistaken, he said that it worked before and pushed 60 FPS. So I take it that there's no solution at all due to hardware limitations?

Offline Eliwood

Junior Member




Stencyl


« Reply #13 - Posted 2007-01-11 22:34:27 »

So I asked the user again about the one time it ran properly, and he recalls that it ran properly when he shut off backgrounds, and then it makes sense all of a sudden because none of the other textures are over 256 x 256 in size, and I read somewhere (LWJGL forums?) that voodoo cards supported a small "subset" of OpenGL functionality and only supported textures up to that size, which is fine in a 3D game since low-res textures are the norm, but not fine for a 2D game.

Of course, it's no fun to play a game with no backgrounds, but I guess that the way out of this one unfortunately is to develop some algorithm for slicing any textures that are over 256 x 256 into textures of that size and recombining them. A bit annoying, but that's the only solution I can think of at this point.

Has anybody written code that already does that?

Offline nva225

Junior Member





« Reply #14 - Posted 2007-01-12 02:17:04 »

Isn't it true in some cases 4 smaller textures will display faster than one larger texture anyway? (please correct me if I'm wrong, I thought I read problems like this before however)
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (25 views)
2014-07-24 01:59:36

Riven (25 views)
2014-07-23 21:16:32

Riven (19 views)
2014-07-23 21:07:15

Riven (22 views)
2014-07-23 20:56:16

ctomni231 (51 views)
2014-07-18 06:55:21

Zero Volt (46 views)
2014-07-17 23:47:54

danieldean (37 views)
2014-07-17 23:41:23

MustardPeter (40 views)
2014-07-16 23:30:00

Cero (56 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!