Vm crash on exit in linux

I keep getting this nasty vm crashes when exiting the test apps on linux.

I think this appeared in cvs this week.

Any ideas ?

EDIT: ok, now i'm still more confused as this happens for jmetest.awt.swinggui.TestJmeDesktop but not for jmetest.awt.swinggui.HelloJmeDesktop

You might post that error log file so we can get an idea of what might be happening.


Stack: [0x46781000,0x46802000),  sp=0x4680142c,  free space=513k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0x46854c74
C  [libpthread.so.0+0x52a5]

Not an expert on these things, but this seems to indicate that the crash occurs when the VM is dealing with threads, not something somewhere originating from a method called in your code.

Can anyone confirm this crashes ? linuxers please run above mentioned tests and report if jmetest.awt.swinggui.TestJmeDesktop (and many others) crashes the vm on exit.

EDIT: … and by checking some apps on win xp this works but i found that TestGameStateSystem does not end the vm but leaves a running java.exe til manual process termination

My guess is the AWT thread is not giving up control when the JVM exits on Linux. Try making use of Irrisor's new dispose() method on JmeDesktop.

A dispose() is already in at the end of TestJmeDesktop.

 protected void cleanup() {

And they should all be hitting the System.exit(0) in the quit() on SimpleGame anyway, right?  If System.exit(0) is still hanging on to the VM then you've got bigger issues. :-p


Yeah, but it's BaseSimpleGame the System.exit(0) is in, should be ok, shouldn't it ?

What do You mean with exit(0) hanging on to the VM ?

By nature the purpose of System.exit(0) is to force a shutdown of the VM.  If the VM process stays alive you've got a serious problem or perhaps an issue with the JNI stuff (not sure how System.exit(0) handles the killing of JNI connections).


Ok, so it would be really nice if someone else could doublecheck this on linux to see if we can change this from i have a problem to we have a problem

Buy me my Athlon 64 processor and I'll switch back to linux. :-p

Until then you'll have to get someone else to test it.  :roll:


Ok, can you investigate some things for me?

Find a couple demos that do crash on exit and a couple that don't.

  1. Is there a difference between the texture formats used? I'm wondering if those formats using ImageIO might be doing something odd.

  2. Adjust the demos to not display the start-up dialog, instead just start the demo.

    (I'm still stuck on the AWT part of the dump).

Hello mojo, thanks for Your attention, heres my findings so far:

1a) Demos that DON'T crash on exit: HelloJMEDesktop, RenControlEditor, TestOBBPick, TestCameraMan

1b) Demos that DO crash on exit:

hehe, but I need a 64-bit in order to play all the games as well as I can on Windows now since I will have to use WINE. :-p


I am using java 1.5.0_06 and ubuntu breezy with fluxbox, I ran the anisotropic test and got no crashes.Ill test more later.

edit: also tested with gnome and got no crashes.

edit: I tested all the demos you mentioned and got no crashes. I am using latest jme from CVS.

The crashes occur when the application ends, so the only thing You'll notice is a message on stdout / stderr after ending the app, and an errorlogfile in the directory from which You started the vm !

mud2005 please verify that this is not the case for You.

If You can confirm, then it looks like linux tweaking day for me  :expressionless:

ok, now that I look in directory there are many error logs similar to yours so it looks as if I have the same problem.

I hoped You would not say that :(. Thanks however for verifying this as a general linux problem.

just happened to see this on LWJGL forum.


Ok, lets wait for the lwjgl guys to sort this out then.