LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Smarto on May 29, 2005, 02:11:46

Title: [RESOLVED] LWJGL Programs Don't Close on Linux!
Post by: Smarto on May 29, 2005, 02:11:46
Hiya everyone!

I am currently using Ubuntu Linux 5.04.  I installed the Java SDK 1.5.0 update 3 and Eclipse.  I also downloaded LWJGL, 0.97 and 0.96.

My problem is that whenever I run an LWJGL program, most of them don't end when they are supposed to.  I have tried my own programs, Robotron (from Puppygames), the Java NeHe code from the Wiki, and the Basic Game Framework.

On all of these programs, when the Display is closed either by pressing the proper button (usually Escape) or otherwise, the process stays open, usually at  100% CPU usage.

I have tried changing code around, different versions of LWJGL, different Java SDK versions, and I am just plain flustered.  I cannot figure out how to get these programs to exit correctly.  Not even a System.exit() works!

One thing I noticed, however, is that code AFTER the Display.destroy() method does not get run. For example:


public void cleanup() {
System.out.println("Cleanup Initiated");
Display.destroy();
System.out.println("Display Destroyed");
}


Only cleanup initated would be displayed in the console; "Display Destroyed" is not, even though the Display closes.

Thanks so much for your help!
Title: [RESOLVED] LWJGL Programs Don't Close on Linux!
Post by: Smarto on May 29, 2005, 23:17:43
Ahh, sorry, but I think the problem managed to fix itself!!!

Really!! After logging on today and seeing if the problem is still there, it has been gone all day!  I really don't know how I fixed it though, so sorry if anyone else is having this problem.  Now all LWJGL programs work correctly!