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

[mac] Plugin2Manager incorrectly disposes Applet window on JreSelectException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P4 P4
    • 9
    • 9
    • deploy
    • None
    • os_x

      This may result in that some window events might be dispatched to the disposed window which may result in NPE in sun.lwawt.macosx.CEmbeddedFrame.getLayerPtr (see the original bug: JDK-8043229)

      This exception is thrown when JVM relaunch happens due to 'unhealthy' current JVM which is in process of starting the applet.
      At this stage the EmbededFrame for this applet is already created: PluginMain.handleStartAppletMessage() invokes first AppletFrameCreator and then StartAppletRunner, the first one creates an EmbeddedFrame the second one starts the Applet execution. While the applet execution is being started the Applet2Manager.checkRunningJVMArgsSatisfying() finds out that the current JVM we are running in is 'unhealthy' for some reasons (too many Threads are started or too few memory left) and throws JreSelectException
      The exception is handled and processed in the Plugin2Manager.AppletExecutionRunnable.run(), which calls parentWindow.dispose(). This disposal of the Applet frame is a bit different than in a normal Applet lifecycle and it doesn't ignore such calls as setSize() in the future.
      The above means that this exception normally shouldn't affect the workflow of an applet because the Frame which generates exception is already disposed in favor of a new Applet Frame in another JVM.

      See more details in JDK-8021383 description.

            ddehaven David Dehaven (Inactive)
            anashaty Anton Nashatyrev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: