Skip to main content

Java.exe suddenly exits memory need pointers how to troubleshoot.

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-05-19

Out application employs an applet to move large amounts of data over TCP and UDP sockets. When we run multiple instances (different tabs in the browse but share the same VM) the applets will run for a while then Java.exe will exit memory (i.e. disappear from the active process list). Note that we predominantly run on windows.
I attached a debugger to Java.exe and noticed that just before it exits, it reports a large number of Access Violation exceptions:

First-chance exception at 0x01f96c92 in java.exe: 0xC0000005: Access violation reading location 0x00150100.

Followed by several lines like:

The thread 'Win32 Thread' (0x86c) has exited with code 0 (0x0).

The program '[4060] java.exe: Native' has exited with code 0 (0x0).

As far as the applets are concerned, the first sign of trouble is that the socket returns a disconnect (e.g. a read returns -1). The applet goes through its shut down sequence but encounters many exceptions as it tries to make callbacks into our JavaScript code that is responsible for displaying status messages. For example: namedPipe shutdown
at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.flush(Unknown Source)
at sun.plugin2.message.transport.NamedPipeTransport.signalDataWritten(Unknown Source)
at sun.plugin2.message.transport.SerializingTransport.write(Unknown Source)
at sun.plugin2.message.Pipe.send(Unknown Source)
at sun.plugin2.main.client.PluginMain.sendAppletAck(Unknown Source)
at sun.plugin2.main.client.PluginMain.access$1700(Unknown Source)
at sun.plugin2.main.client.PluginMain$StartAppletListener.appletReady(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.fireAppletReady(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.stopWaitingForAppletStart(Unknown Source)
at sun.plugin2.main.client.MessagePassingExecutionContext.getJSObject(Unknown Source)
at sun.plugin2.applet2.Plugin2Host.getJSObject(Unknown Source)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$AppletContextImpl.getJSObject(Unknown Source)
at netscape.javascript.JSObject.getWindow(Unknown Source)


at sun.plugin2.applet.Plugin2ClassLoader$ Source)
at Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
(when the applet attempts to execute the following line:
AccessController.doPrivileged(new PrivilegedAction


I would appreciate any pointer on how to proceed to troubleshoot this behaviour and see what are we doing to make the JVM behave this way.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2011-05-19

Forgot to mention that this behaviour is not correlated to the amount of data transferred. I can transfer a really huge amount with a single applet without problem. But the more applets that share the same VM, the quicker the crash.
Increasing the JVM memory did not help either.