Skip to main content

The -server JVM argument causes an OOME when running applet.

1 reply [Last post]
demonduck
Offline
Joined: 2008-03-14

Environment: Windows 2000 SP4; Java Plug-in 1.6.0_12; IE6

I can get a small speed up of my applet using -server as a JVM argument but I see a
strange Out Of Memory Exception that only occurs when I use the -server argument
with the new plugin -- plugin2.

As you see below, I specify a lot of memory so I shouldn't get the out of memory error.
This only happens with 6u12b03 when I use IE6 or FF3. In other words, the new plugin -- plugin2.

If I use FF2 with 6u12b03, the OOME does not happen. So it is strictly a new plugin issue.

Using the following java_arguments param --

I get:

java.lang.OutOfMemoryError: Java heap space
at pancyl.PanCylFS.setFullScreenMode(PanCylFS.java:100)
at pancyl.PanCylApplet$4.keyReleased(PanCylApplet.java:654)

If I remove -server from the java_arguments param then the OOME does not happen.

Test with the URL's below in IE6 or FF3. Press F1/ESC to
enter/exit fullscreen mode. If it goes black, you can still
access the browser from the task bar and kill the page/browser.

http://pancyl.com/NoDashServer.htm
http://pancyl.com/DashServer.htm

The OOME happens when I try to allocate a large int array.
Here is a snippet from around the area where the OOME happens:

this.setBounds(0, 0, fsW, fsH);
this.setVisible(true);
this.toFront();
this.requestFocusInWindow();
if(misFS == null)
{
pixelsFS = new int [fsW * fsH]; <<<<<<<<<<< RIGHT HERE IS OOME

misFS = new MemoryImageSource(fsW, fsH, ColorModel.getRGBdefault(), pixelsFS, 0, fsW);
misFS.setAnimated(true);
misFS.setFullBufferUpdates(true);
imageFS = this.createImage(misFS);
}
this.createBufferStrategy(2);
bsFS = this.getBufferStrategy();
projector.setFullScreenMode(this,pixelsFS,fsW,fsH);
this.setIgnoreRepaint(false);

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rogyeu
Offline
Joined: 2006-07-30

Thanks for reporting the issue. I have created a bug report for your issue. Bug ID: 6791790

-- RY