Cleanup on exit

Hi,



I’m having problem with my simple benchmark app running from NetBeans. It’s very simple: 2500 boxes of random height to test speed on different computers.

But if I want to quit application, I press Escape several times. Window disappears, but process is still running (it it listed in Netbeans process list). I can terminate it but next time I run the application, it is incredible slow. I must quit netbeans, so VM can cleanup everything.



Any idea? I really need run my application more than once :slight_smile:

Many thanks.


import com.jme.app.SimpleGame;
import com.jme.scene.shape.Box;
import com.jme.math.Vector3f;
import com.jme.renderer.ColorRGBA;

public class Benchmark extends SimpleGame {

    public static void main(String[] args) {
        Benchmark app = new Benchmark();
        app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);
        app.start();
    }
   
    protected void simpleInitGame() {
        randomNodes(50, 50);
    }
   
    public void randomNodes(int xCount, int yCount) {
        int size = 1;
        float space = 0.2f;
       
        for (int x = 0; x < xCount; x++) {
            for (int y = 0; y < yCount; y++) {
                double value = 5*Math.random();
                String name = "node"+String.valueOf(x)+String.valueOf(y);
                Box b=new Box(name, new Vector3f(x, 0, y), new Vector3f(x+size-space, (float)value, y+size-space));
                b.setRandomColors();
                rootNode.attachChild(b);
            }
        }
    }
}

Do you have the same problem running from the command line?

"mojomonk" wrote:
Do you have the same problem running from the command line?
Yes, I do. Even if I run for example jmetest.effects.TestDynamicSmoker. Application starts, but if I press Esc, window disappears, but I don't get prompt again and I need to kill all java processes.

My configuration:
Gentoo Linux
2.6.8-gentoo-r3
i686 AMD Duron(tm) processor AuthenticAMD GNU/Linux
Latest jME version from CVS (checkout today).

java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)

Same problem with



java version "1.4.2_05"

Java™ 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)

Java HotSpot™ Client VM (build 1.4.2_05-b04, mixed mode)

hmm, my friend is having the same problem…but he has Win ME.



Its most definetly a LWJGL problem, because the quit() method in simply calls “Display.close()” (Display being the LWJGL display, not the jME display) and System.exit(0);



well, 0.93 is out, so when the devs change over, we’l see if the bug fixes make a difference.



DP

Hmm, same problem with LWJGL 0.93 :frowning:



Hope, this problem will be solved soon. I’m going to be good at killing java processes :slight_smile:

This is definately odd, as I don’t have this issue, and as DP said, System.exit(0) is called on quit. Perhaps Display.close() is causing some sort of issue where the exit call cannot be reached. Have you tried the LWJGL demos?

Good! It seems, the problem is really with LWJGL.



I’ll try LWJGL forum.

Thanks mojo!