0

I have a little test program written in JRuby that makes a black window with lwjgl and libGDx. It all works fine and dandy if I run it from the command line but, if I use warble to pack it in a jar it gives gives me this error AL lib: alc_cleanup: 1 device not closed and closes. No window. No anything.

I have the directories set up properly. Does anyone know anything about this?

benbot
  • 1,217
  • 1
  • 12
  • 28
  • That particular error message is "normal", it just means the OpenAL library was cleaning up things that it normally doesn't clean up. You'll need to get more detail somehow. (Install an uncaught exception handler?) – P.T. Aug 13 '13 at 21:42
  • That message usually doesn't appear when I just run the .rb file with jruby. I'll try the exception handler. – benbot Aug 13 '13 at 22:21
  • I tried looking for an exception but there was none. This is confusing :( – benbot Aug 13 '13 at 23:00
  • Can you run the JVM with arguments that print more info (like "-XX:-PrintCompilation")? (Or run it under a debugger or method profiler?) – P.T. Aug 14 '13 at 17:16
  • I got it. Read the answer I posted. Thanks for all the help guys :D – benbot Aug 14 '13 at 20:55

1 Answers1

0

LibGDX runs certain actions on different threads and for some reason the warbled jar doesn't wait for all threads to complete so the program would kill the program before letting the libgdx threads finish. There was no error because the program would just be killed normally but while threads were still running.

The only odd thing is if I put an infinite while loop in the main thread to keep it going the program closes if I close the game window... which runs on a different thread

benbot
  • 1,217
  • 1
  • 12
  • 28