Fullscreen API bugs, JVM crashes

Is there a way to get a stacktrace or something similar out of a bad JVM crash? My fullscreen game sometimes freezes, badly enough that I have to reboot. I can’t get back to my IDE, DOS window, or Error logs. When I reboot, the first two are gone and the log is blank. The result is that I can’t even begin to know what caused the crash. Very upsetting. Any suggestions?

I can post code if it would help. Thanks all!

You forgot a handfull of details… wich vm version, os, graphic card, driver version… are we supposed to guess? :slight_smile:

For the log… use flush() to actually write everything wich is currently in the buffer. The performance is then usually a bit lower but that doesnt really matter right now does it? :wink:

Heh, sorry. If it would help, here’s the details:

(Sorry, couldn’t figure out VM version. :-[ Whatever comes with 1.4.1_03?) :slight_smile:
WinME,
GeForce2 GTS Pro,
nVidia 95/98/Me Driver v.44.03

I had tried the flush thing. I was flushing at the end of my main loop, which is what makes it so confusing. If I don’t get the crash, I get a complete log. If I do crash, adios. Nothing. Thank you for the suggestion tho.

A bit late for a reply, but what the heck.

You can always determine the version of the Sun VM you are using by typing: java -version

The reason flush is not working for you when you crash is because your code never reaches the call because of the crash. What you need to do is flush each time you write to the log. This ideally will be configured in a way so that you can enable it when needed and disable it otherwise.

Hey, thanks for the info aldacron. I’m just going to develop in Swing while I wait for 1.5. :stuck_out_tongue:

It might be worth upgrading your OS to WIndows XP — it is much harder to crash than ME which is a great help when developing. It is also possible that while the UI has hung, the JVM is still alive in the sense that background threads are still running. In this case it can help if you have a thread which does nothing more than flush your trace file every x milliseconds. This will secure most of your trace without having to go through adding flush calls everywhere (and it imposes significantly smaller performance penalties).