Java VM crashing on load

I am a developer of quite a large web application and one of the tools in this application uses a java applet. This applet, on loading, does quite a lot of work (one of which is calling a piece of CGI that streams in some gzipped data). The applet works fine and has been in production for over a year.

The problem we are experiencing is that if a user clicks on a link in the webpage while the applet is loading (i.e. during the Java Splash screen) then the browser locks up completely and you have to CTRL-ALT-DEL to kill it off in Task Manager.

This problem only seems to occur in Firefox. I have posted this on a Firefox forum, but was interested to hear if anyone has any insights on here?

I'm not sure if its an issue with the VM being stopped before it's fully loaded or my code being interrupted by the click away and then going haywire. Are there any signals/events I can capture in the applet that occur when a user tries to navigate away?

Many thanks,

Simon

[1007 byte] By [slyadamsa] at [2007-10-3 1:12:23]
# 1
Try activating trace and debug in the applet - see the documentation in the Java Plug-in Developer Guide.
ChuckBinga at 2007-7-14 18:09:25 > top of Java-index,Desktop,Runtime Environment...
# 2
How do I enable tracing and debugging? I use Borland JBuilder and in the Java Build options the Debug is set to "Source, line and variable information', which is the highest setting.
slyadamsa at 2007-7-14 18:09:25 > top of Java-index,Desktop,Runtime Environment...
# 3

Ok, found out. Typed 5 in the console and then watched and tried to break it. It appears the problem occurs if you navigate away when the applet performs an HTTP request to a servlet that then streams GZIP'ed data into the applet.

Must be something to do with the network connection to the servlet causes the JVM to want to stay alive until the connection is stopped and this then causes the web browser to hang?

slyadamsa at 2007-7-14 18:09:25 > top of Java-index,Desktop,Runtime Environment...