Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6791790

Server VM causes OOME in New Plug-In

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Future Project
    • Icon: P4 P4
    • 7-pool
    • 6u12
    • deploy
    • None
    • x86
    • windows

      Originally report from: http://forums.java.net/jive/thread.jspa?messageID=324660

      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 --

      <PARAM NAME="java_arguments" VALUE="-server -Xms384m -Xmx512m -Dsun.java2d.noddraw=true -Xcomp -Xbatch">

      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);


      Submitter's Applet sample (DashServer.htm) has the following attributes:
      <APPLET CODE="pancyl.PanCylApplet.class" ARCHIVE="jars/PanCylApplet.jar"
      WIDTH="800" HEIGHT="600" ALIGN="MIDDLE" NAME="Mammoth Lakes"
      MAYSCRIPT="MAYSCRIPT"> <PARAM NAME="boxbgcolor" VALUE="black">
      <PARAM NAME="boxfgcolor" VALUE="black">
      <PARAM NAME="image" VALUE="images/black964.gif">

      <PARAM NAME="backgroundcolor" VALUE="#000000">
      <PARAM NAME="bordercolor" VALUE="#500000">
      <PARAM NAME="pano" VALUE="images/LongShot4.jpg">
      <PARAM NAME="arc" VALUE="100">
      <PARAM NAME="autopan" VALUE="true">
      <PARAM NAME="autodirection" VALUE="left">
      <PARAM NAME="autospeed" VALUE="2">
      <PARAM NAME="horizon" VALUE="0">
      <PARAM NAME="draggable" VALUE="true">
      <PARAM NAME="java_arguments" VALUE="-server -Xms384m -Xmx512m -Dsun.java2d.noddraw=true -Xcomp -Xbatch">
      <PARAM NAME="attribution" VALUE="Mammoth Lakes, CA">
      <!--PARAM NAME="horizonRaster" VALUE="400"> <PARAM NAME="arc" VALUE="270"-->
      </APPLET></TD>

            nam Nam Nguyen (Inactive)
            ryeung Roger Yeung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: