Demos/TestChooser problem - escape not working properly

When I run the demos from the console (Kubuntu Linux), the window listing the demos appears and I can run one demo. When I press escape the demo window opens but nothing else happens. The program doesn't exit and the demo list window doesn't appear again. The program appears to still be running but I can't use CTRL+C to interrupt the process at the command line. I can put the program in the background using CTRL+Z, which will let me kill the main demo application and the Java VM.



What is supposed to happen when I press escape? Is it supposed to re-display the demo window list (TestChooser I think) or is it supposed to completely exit the application?



This is on Kubuntu 5.10, with Java SDK 1.5.



Thanks

stodge said:

What is supposed to happen when I press escape? Is it supposed to re-display the demo window list (TestChooser I think) or is it supposed to completely exit the application?

That depends on the selected test. Most of them call System.exit - so the vm should terminate. It would be possible to simply close the window and return from the main method of the test. In this case the TestChooser would display again. If neither of these happen the test does not exit the main method and does not destroy the vm - an issue of the specific selected test.

I tried four or five demos and they all do the same thing. One was the terrain demo.

TestTerrain exits normally (vm destroyed) over here  :?

Yeah it's weird. It used to exit when I ran it on Fedora Core 4 + GNOME, but now I'm running Kubuntu + KDE it doesn't work properly.  :?

Definitely something weird going on. When I run my application in NetBeans (essentially loads and displays a terrain based on code from the Wiki), when I hit escape, control returns to NetBeans but the Java VM for my app is still running. If I quit NetBeans it asks if I want to terminate this rogue Java process.



It didn't do this under Fedora, so something really weird is going on!

What happens if you run the chooser, but then click cancel?  If that works then perhaps it's some handle to the native libs that is forcing things to stay open?

If I run chooser and then click cancel it exits correctly.

Not a good sign - it works fine under Fluxbox.

Go figure now it works!!! Odd. I'll have to see if it still works after I switch on tomorrow night.